---plugin-name--- for unplugin.
Forked from antfu/unplugin-starter
example use @vtrbo/cli
example use @vtrbo/ni
Clone this template
vtr
# select Unplugin
# or
# vtr vtrbo/starter-unplugin my-plugin
Globally replace ---plugin-name---
with your plugin name.
Globally replace ---PluginName---
with your plugin name (big camel case).
Then you can start developing your plugin.
To test your plugin, run nr dev
.
To release your plugin, run nr release
.
npm i ---plugin-name---
Vite
// vite.config.js
import ---PluginName--- from '---plugin-name---/vite'
export default defineConfig({
plugins: [---PluginName---({ /* options */ })],
})
Rollup
// rollup.config.js
import ---PluginName--- from '---plugin-name---/rollup'
export default {
plugins: [---PluginName---({ /* options */ })],
}
Webpack
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('---plugin-name---/webpack')({ /* options */ })
]
}
Nuxt
// nuxt.config.js
export default {
buildModules: [
['---plugin-name---/nuxt', { /* options */ }],
],
}
This module works for both Nuxt 2 and Nuxt Vite
Vue CLI
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('---plugin-name---/webpack')({ /* options */ }),
],
},
}
Esbuild
// esbuild.config.js
import { build } from 'esbuild'
import ---PluginName--- from '---plugin-name---/esbuild'
build({
plugins: [---PluginName---({ /* options */ })],
})