Skip to content

Commit 6c5f30e

Browse files
authored
build: minify bundles (#30)
1 parent 7beb636 commit 6c5f30e

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.size-limit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
{
2020
"path": "dist/index.js",
21-
"limit": "7.45 kB",
21+
"limit": "9.2 kB",
2222
"import": "{ BarChart }"
2323
},
2424
{

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
"puppeteer": "^14.0.0",
124124
"rollup": "^2.70.1",
125125
"rollup-plugin-swc": "^0.2.1",
126+
"rollup-plugin-terser": "^7.0.2",
126127
"sass": "^1.50.1",
127128
"sass-loader": "^10.0.0",
128129
"simple-git-hooks": "^2.7.0",

pnpm-lock.yaml

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rollup.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import swc from 'rollup-plugin-swc';
22
import { nodeResolve } from '@rollup/plugin-node-resolve';
3+
import { terser } from 'rollup-plugin-terser';
34
import pkg from './package.json';
45

56
const extensions = ['.js', '.ts', '.tsx'];
@@ -22,7 +23,8 @@ const plugins = targets => [
2223
type: 'es6'
2324
},
2425
sourceMaps: true
25-
})
26+
}),
27+
terser()
2628
];
2729

2830
export default [

0 commit comments

Comments
 (0)