Rollup terser plugin
Rollup plugin to minify generated bundle. Uses terser under the hood.
Install
yarn add -D rollup-terser
# Or with npm:
npm i -D rollup-terser
Usage
import { rollup } from "rollup";
import { terser } from "rollup-terser";
rollup({
input: "main.js",
plugins: [terser(options?: MinifyOptions)],
});
Options
This plugin takes a configuration object for the Terser MinifyOptions.
Tests
Code origin: rollup-plugin-terser
License
MIT @Haikel Fazzani