svg2solidcomp template for unplugin.
npm i unplugin-svg2solidcomp
Vite
// vite.config.ts
import svg2solidcomp from 'unplugin-svg2solidcomp/vite'
export default defineConfig({
plugins: [
svg2solidcomp({
/* options */
}),
],
})
Example: playground/
Rollup
// rollup.config.js
import svg2solidcomp from 'unplugin-svg2solidcomp/rollup'
export default {
plugins: [
svg2solidcomp({
/* options */
}),
],
}
Webpack
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-svg2solidcomp/webpack')({
/* options */
}),
],
}
Vue CLI
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-svg2solidcomp/webpack')({
/* options */
}),
],
},
}
esbuild
// esbuild.config.js
import { build } from 'esbuild'
import svg2solidcomp from 'unplugin-svg2solidcomp/esbuild'
build({
plugins: [svg2solidcomp()],
})