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