🍣 The one-stop shop for official Rollup plugins
Installations
npm install @rollup/plugin-terser
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Min. Node Version
>=14.0.0
Node Version
20.8.0
NPM Version
10.1.0
Score
88.7
Supply Chain
91.2
Quality
80.4
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Languages
JavaScript (75.1%)
TypeScript (24.89%)
Shell (0.01%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
rollup
Download Statistics
Total Downloads
77,608,428
Last Day
273,140
Last Week
1,709,801
Last Month
6,963,612
Last Year
56,597,737
GitHub Statistics
MIT License
3,676 Stars
1,210 Commits
597 Forks
36 Watchers
5 Branches
267 Contributors
Updated on Feb 15, 2025
Bundle Size
622.07 kB
Minified
169.83 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.4.4
Package Id
@rollup/plugin-terser@0.4.4
Unpacked Size
28.03 kB
Size
5.53 kB
File Count
12
NPM Version
10.1.0
Node Version
20.8.0
Published on
Oct 05, 2023
Total Downloads
Cumulative downloads
Total Downloads
77,608,428
Last Day
1.8%
273,140
Compared to previous day
Last Week
4.1%
1,709,801
Compared to previous week
Last Month
42.2%
6,963,612
Compared to previous month
Last Year
179.8%
56,597,737
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Peer Dependencies
1
Dev Dependencies
3
@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:
1npm install @rollup/plugin-terser --save-dev
Usage
Create a rollup.config.js
configuration file and import the plugin:
1import terser from '@rollup/plugin-terser'; 2 3export default { 4 input: 'src/index.js', 5 output: { 6 dir: 'output', 7 format: 'cjs' 8 }, 9 plugins: [terser()] 10};
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.
1import terser from '@rollup/plugin-terser'; 2 3export default { 4 input: 'src/index.js', 5 output: { 6 dir: 'output', 7 format: 'cjs' 8 }, 9 plugins: [ 10 terser({ 11 maxWorkers: 4 12 }) 13 ] 14};
Meta

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
18 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
binaries present in source code
Details
- Warn: binary detected: packages/wasm/test/fixtures/complex.wasm:1
- Warn: binary detected: packages/wasm/test/fixtures/imports.wasm:1
- Warn: binary detected: packages/wasm/test/fixtures/sample.wasm:1
Reason
Found 13/30 approved changesets -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/node-windows.yml:1
- Warn: no topLevel permission defined: .github/workflows/pr-title.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Warn: no topLevel permission defined: .github/workflows/validate.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-windows.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/node-windows.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-windows.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/node-windows.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-windows.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/node-windows.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-title.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/pr-title.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/release.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/validate.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/validate.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/validate.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/validate.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/rollup/plugins/validate.yml/master?enable=pin
- Info: 0 out of 8 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 14 are checked with a SAST tool
Reason
16 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-9pv7-vfvm-6vr7
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-vm32-9rqf-rh3r
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
3.9
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to @rollup/plugin-terser
rollup-plugin-terser
Rollup plugin to minify generated es bundle
@wwa/rollup-plugin-terser
[](https://github.com/sjinks/rollup-plugin-terser/actions/workflows/ci.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?projec
@ducanh2912/rollup-plugin-terser
Rollup plugin to minify generated bundle with Terser
@chiogen/rollup-plugin-terser
Rollup plugin to minify generated es bundle