Skip to content

Commit

Permalink
Update rollup config to strip comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnesfield committed Mar 22, 2024
1 parent c159a32 commit 7d52616
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import eslint from '@rollup/plugin-eslint';
import typescript from '@rollup/plugin-typescript';
import { createRequire } from 'module';
import { RollupOptions } from 'rollup';
import cleanup from 'rollup-plugin-cleanup';
import dts from 'rollup-plugin-dts';
import esbuild from 'rollup-plugin-esbuild';
import outputSize from 'rollup-plugin-output-size';
Expand All @@ -21,7 +22,14 @@ export default defineConfig([
{
input,
output: { file: pkg.module, format: 'esm', exports: 'named' },
plugins: [esbuild({ target: 'esnext' }), outputSize()]
plugins: [
esbuild({ target: 'esnext' }),
cleanup({
comments: ['some', 'sources', /__PURE__/],
extensions: ['js', 'ts']
}),
outputSize()
]
},
{
input,
Expand Down

0 comments on commit 7d52616

Please sign in to comment.