unplugin-svg2solid
v0.0.2
Published
Register global imports on demand for Vite and Webpack
Downloads
2
Maintainers
Readme
unplugin-svg2solid
svg2solidcomp template for unplugin.
Install
npm i unplugin-svg2solid
// vite.config.ts
import svg2solidcomp from 'unplugin-svg2solid/vite'
export default defineConfig({
plugins: [
svg2solidcomp({
/* options */
}),
],
})
Example: playground/
// rollup.config.js
import svg2solidcomp from 'unplugin-svg2solid/rollup'
export default {
plugins: [
svg2solidcomp({
/* options */
}),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-svg2solid/webpack')({
/* options */
}),
],
}
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-svg2solid/webpack')({
/* options */
}),
],
},
}
// esbuild.config.js
import { build } from 'esbuild'
import svg2solidcomp from 'unplugin-svg2solid/esbuild'
build({
plugins: [svg2solidcomp()],
})