openverse-frontend icon indicating copy to clipboard operation
openverse-frontend copied to clipboard

Replace @nuxtjs/svg `.svg?inline` components with native `svg`s

Open obulat opened this issue 3 years ago • 0 comments
trafficstars

Problem

@nuxtjs/svg provides a convenient way of creating a component out of any SVG file. However, the components it creates raise TS errors. The module also does not support Vite/Nuxt3.

Description

We should replace the inline components with SVG elements.

Alternatives

Keep using the inline components. That would require fixing types (using the docs from https://github.com/damianstasik/vue-svg-loader/blob/4c41b89246fa366c3214ebd56b183645b0e732e5/docs/faq.md#how-to-use-this-loader-with-typescript) and adding Vite/Nuxt3 support to the module in the future.

Additional context

First raised in https://github.com/WordPress/openverse-frontend/pull/1350

Implementation

  • [ ] 🙋 I would be interested in implementing this feature.

obulat avatar Aug 22 '22 04:08 obulat