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