An ES module bundler based on Rollup.
npm install --save-dev @zhengyuzi/rollup-build
Add the build command to package.json
{
"scripts": {
"build": "robuild"
}
}
Create build.config.ts
import { defineConfig } from '@zhengyuzi/rollup-build'
export default defineConfig({
entries: [
'src/index',
],
})
Build entries.
Output directory.
Clean dist dirs.
Generates .d.ts declaration file.
Minify build.
View rollup-plugin-node-externals
Add rollup plugin.
The directory to build/stub.
{
"scripts": {
"build": "robuild output"
}
}
Stub dist link your project during the development.
{
"scripts": {
"build": "robuild --stub"
}
}