vbenjs / vite-plugin-svg-icons

Vite Plugin for fast creating SVG sprites.
MIT License
838 stars 112 forks source link

@crxjs/vite-plugin doesn't work with the vite-plugin-svg-icons in dev mode #113

Open tomdyqin opened 2 weeks ago

tomdyqin commented 2 weeks ago

https://github.com/crxjs/chrome-extension-tools/issues/654

tomdyqin commented 2 weeks ago

because crxjs will change the url like '/@id/virtual:svg-icons-register?t=1731562337593'

solution:

    configureServer: ({ middlewares }) => {
      middlewares.use(cors({ origin: "*" }));
      middlewares.use(async (req, res, next) => {
        const url = normalizePath(req.url).split('?')[0]; <====
boburxj commented 1 week ago

@tomdyqin can u share the full plugins section of ur vite config file, please ? cant understand what should i do with that url