Skip to content

Commit

Permalink
updated rollup to use terser
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk committed Aug 11, 2020
1 parent 7d5b156 commit a9951bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"eslint": "^7.2.0",
"jest": "^25.2.1",
"rollup": "^2.23.1",
"rollup-plugin-terser": "^7.0.0",
"rollup-plugin-typescript2": "^0.27.2",
"ts-jest": "^25.5.0",
"tslib": "^2.0.1",
Expand Down
8 changes: 8 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@
//import commonjs from "@rollup/plugin-commonjs";
import typescript from "rollup-plugin-typescript2";
import pkg from "./package.json";
//import resolve from "@rollup/plugin-node-resolve";
import { terser } from "rollup-plugin-terser";

export default [
// UMD, CJS, ESM
{
input: "src/index.ts",
plugins: [
//resolve(),
typescript({
typescript: require("typescript"),
}),
terser({
output: {
comments: false,
},
}),
],
output: [
{ exports: "default", file: pkg.main, format: "cjs" },
Expand Down

0 comments on commit a9951bf

Please sign in to comment.