How can it be loaded on demand?
This scheme will write all svg to nuxticons.mjs file, my project has several thousand svg icons, nuxticons.mjs file will be over 5mb.
How can it be loaded on demand?
Hello! Currently it is not possible, I am still working on it and in the future I hope to succeed. In previous versions (without vite) it was much simpler
- create file
/server/api/getIcon.ts - create file
/components/icon.tsx
Get the content of the svg icon through the server-side getIcon.ts api. Render svg icon via component icon.txs.
Are there any downsides to this scheme?
@cdwmhcc New version on nuxt 3.0.0 is now available, I encourage you to test it 😄
@cdwmhcc New version on nuxt 3.0.0 is now available, I encourage you to test it 😄
Wow, crazy, I'll test it later 👍👍👍