Starter template for unplugin.
To use this template, clone it down using:
npx degit yunsii/unplugin-starter my-unplugin
And do a global replacement of unplugin-starter
with your plugin name.
Then you can start developing your unplugin 🔥
To test your plugin, run: pnpm run dev
To release a new version, run: pnpm run release
npm i unplugin-starter
Vite
// vite.config.ts
import starter from 'unplugin-starter/vite'
export default defineConfig({
plugins: [
starter({
/* options */
}),
],
})
Example: playground/
Rollup
// rollup.config.js
import starter from 'unplugin-starter/rollup'
export default {
plugins: [
starter({
/* options */
}),
],
}
Webpack
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-starter/webpack')({
/* options */
}),
],
}
Nuxt
// nuxt.config.js
export default defineNuxtConfig({
modules: [
[
'unplugin-starter/nuxt',
{
/* options */
},
],
],
})
This module works for both Nuxt 2 and Nuxt Vite
Vue CLI
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-starter/webpack')({
/* options */
}),
],
},
}
esbuild
// esbuild.config.js
import { build } from 'esbuild'
import starter from 'unplugin-starter/esbuild'
build({
plugins: [starter()],
})