pakholeung37 / vite-plugin-vue2-svg

load SVG files as Vue components, for Vue2.x only.
MIT License
19 stars 9 forks source link

ignore query params when checking the filename #1

Closed drslump closed 3 years ago

drslump commented 3 years ago

When used in a Nuxt project with nuxt-vite the dependency name might come with a query string since that's used by the default webpack based loader (i.e. assets/icon.svg?inline). So in order to be compatible with both build systems we'll need this plugin to ignore any query params included in the filename.

Also as part of the changes I had to do include the dom api in the tsconfig file for the build to succeed.