@zhengyuzi/rollup-build
v1.1.1
Published
An ES module bundler based on Rollup
Downloads
4
Readme
@zhengyuzi/rollup-build
An ES module bundler based on Rollup.
Install
npm install --save-dev @zhengyuzi/rollup-build
Usage
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',
],
})
Configuration
entries
Build entries.
outDir
Output directory.
clean
Clean dist dirs.
declaration
Generates .d.ts declaration file.
emitCJS
Minify build.
externals
View rollup-plugin-node-externals
plugins
Add rollup plugin.
Command
dir
The directory to build/stub.
{
"scripts": {
"build": "robuild output"
}
}
stub
Stub dist link your project during the development.
{
"scripts": {
"build": "robuild --stub"
}
}