Starter template for unplugin.
To use this template, clone it down using:
npx degit sxzz/unplugin-starter unplugin-my-plugin
And do a global replacement of unplugin-starter
with your plugin name.
Then you can start developing your unplugin 🔥
To run unit tests, run: pnpm run test
.
To release a new version, run: pnpm run release
.
npm i -D unplugin-starter
Vite
// vite.config.ts
import UnpluginStarter from 'unplugin-starter/vite'
export default defineConfig({
plugins: [UnpluginStarter()],
})
Rollup
// rollup.config.js
import UnpluginStarter from 'unplugin-starter/rollup'
export default {
plugins: [UnpluginStarter()],
}
Rolldown
// rolldown.config.js
import UnpluginStarter from 'unplugin-starter/rolldown'
export default {
plugins: [UnpluginStarter()],
}
esbuild
// esbuild.config.js
import { build } from 'esbuild'
build({
plugins: [require('unplugin-starter/esbuild')()],
})
Webpack
// webpack.config.js
module.exports = {
/* ... */
plugins: [require('unplugin-starter/webpack')()],
}