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.
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.