vite-svg-loader
vite-svg-loader copied to clipboard
Vite plugin to load SVG files as Vue components
"vite": "^2.9.2", "vite-svg-loader": "^3.2.0", tsconfig.json `{ "compilerOptions": { "target": "esnext", "useDefineForClassFields": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "strict": true, "jsx": "preserve", "sourceMap": true, "isolatedModules": false, "esModuleInterop": true, "allowSyntheticDefaultImports": true,...
Hi, Great plugin you have made. I have made a small extra plugin which is used in combination with yours. Unfortunately, I can't find a way to access the svg...
Hi, there're two folders with svg files. One folder contains icons, colors and inline styles should be cleared up there (using removeAttrs and inlineStyles svgo plugins). Another folder contains big...
I noticed that if I use `?url` (or not, if it's the default` the resulting thing is not a string but a object with a `__file` property instead - I...
I've set the default import to `url` in vite.config.ts ```typescript svgLoader({ defaultImport: 'url', }), ``` And then when I'm using dynamic import for a certain icon, it will cause an...
Vite supports virtual files like `virtual:public?%2Fimages%2Fvisa.svg`. This module attempts to load these files even if the default import type is `url` because of the `?` in the virtual filename. For...
Is that possible to use the vite-svg-loader in a CSS file ? For exemple in `background-image: url(mysvg.svg)`
Refactored to regex, allowing me to : - add a base64 output option - add an optional parameter to pass a custom class (for raw or base64 output), applied to...
Hey, I am adding a SVG as component to my tree, that works as expected. If I then manipulate that SVG (e.g. different fill for some rects) and add it...