Skip to content

Commit 0391218

Browse files
committed
fix: attempt to reduce bundlesize with rollup-plugin-cleanup
1 parent b844916 commit 0391218

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"remark-gfm": "^4.0.1",
7878
"rimraf": "^6.0.1",
7979
"rollup": "^4.42.0",
80+
"rollup-plugin-cleanup": "^3.2.1",
8081
"rollup-plugin-typescript2": "^0.36.0",
8182
"semantic-release": "^24.2.5",
8283
"storybook": "8.6.8",

pnpm-lock.yaml

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

rollup.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import commonjs from '@rollup/plugin-commonjs';
22
import resolve from '@rollup/plugin-node-resolve';
33
import typescript from 'rollup-plugin-typescript2';
4+
import cleanup from 'rollup-plugin-cleanup';
45

56
import pkg from './package.json' assert { type: 'json' };
67

@@ -24,6 +25,10 @@ export default {
2425
clean: true,
2526
tsconfig: 'tsconfig.build.json',
2627
}),
28+
cleanup({
29+
comments: 'none',
30+
extensions: ['ts', 'tsx', 'js', 'jsx'],
31+
}),
2732
],
2833
external: ['react', 'react-dom', 'react/jsx-runtime'],
2934
};

0 commit comments

Comments
 (0)