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