nuxt-community / svg-module

Super simple svg loading module for Nuxt.js
MIT License
340 stars 35 forks source link

Dynamic import for external urls #94

Closed OlesyaKlochko closed 2 years ago

OlesyaKlochko commented 2 years ago

We receive svg images from CMS and dynamic import doesn't works in this case, works only for svg images stored in the project. So is it possible to use external urls somehow?

image

manuelodelain commented 2 years ago

You can't require() external URL. If you need an inline SVG from a CMS, you have to fetch the SVG data and then inject it with the v-html directive.