Skip to content

Commit

Permalink
build: add terser config
Browse files Browse the repository at this point in the history
  • Loading branch information
nmsn committed Feb 28, 2023
1 parent 33de614 commit e71725b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"rollup": "^2.79.1",
"rollup-plugin-clear": "^2.0.7",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "^28.0.8",
"typescript": "^4.9.5"
Expand Down
30 changes: 30 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// rollup.config.js
import clear from 'rollup-plugin-clear';
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
import { terser } from 'rollup-plugin-terser';
import typescript from 'rollup-plugin-typescript2';

import commonjs from '@rollup/plugin-commonjs';
Expand All @@ -26,5 +27,6 @@ export default {
typescript(),
commonjs(),
nodeResolve(),
terser(),
],
};
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"declaration": true
},
"include": ["src/**/*", "typings.d.ts"],
"exclude": ["node_modules", "dist", "**/__tests__/**/*"]
"exclude": ["node_modules", "dist", "**/__tests__/**/*", "**/demo.tsx", "**/*.test.ts"]
}

0 comments on commit e71725b

Please sign in to comment.