3.75 GB
76,734 files
Updated about 1 month ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| dist | 3 items | ||
| node_modules | 2 items | ||
| src | 6 items | ||
| types | 1 items | ||
| LICENSE | 1.15 kB xet | 30168896 | |
| README.md | 1.88 kB xet | bfe55d5e | |
| package.json | 1.85 kB xet | 308e7a89 |
@rollup/plugin-terser
🍣 A Rollup plugin to generate a minified bundle with terser.
Requirements
This plugin requires an LTS Node version (v14.0.0+) and Rollup v2.0+.
Install
Using npm:
npm install @rollup/plugin-terser --save-dev
Usage
Create a rollup.config.js configuration file and import the plugin:
import terser from '@rollup/plugin-terser';
export default {
input: 'src/index.js',
output: {
dir: 'output',
format: 'cjs'
},
plugins: [terser()]
};
Then call rollup either via the CLI or the API.
Options
The plugin accepts a terser Options object as input parameter, to modify the default behaviour.
In addition to the terser options, it is also possible to provide the following options:
maxWorkers
Type: Number
Default: undefined
Instructs the plugin to use a specific amount of cpu threads.
import terser from '@rollup/plugin-terser';
export default {
input: 'src/index.js',
output: {
dir: 'output',
format: 'cjs'
},
plugins: [
terser({
maxWorkers: 4
})
]
};
Meta
- Total size
- 3.75 GB
- Files
- 76,734
- Last updated
- Sep 11
- Pre-warmed CDN
- US EU US EU