Skip to content

Commit 601b484

Browse files
cleanup common rollup
1 parent 8a911b7 commit 601b484

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/common/rollup.config.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import json from '@rollup/plugin-json';
44
import nodeResolve from '@rollup/plugin-node-resolve';
55
import terser from '@rollup/plugin-terser';
66

7+
/**
8+
* @returns {import('rollup').RollupOptions}
9+
*/
710
export default (commandLineArgs) => {
8-
const sourcemap = (commandLineArgs.sourceMap || 'true') == 'true';
11+
const sourceMap = (commandLineArgs.sourceMap || 'true') == 'true';
912

1013
// Clears rollup CLI warning https://github.com/rollup/rollup/issues/2694
1114
delete commandLineArgs.sourceMap;
@@ -15,7 +18,7 @@ export default (commandLineArgs) => {
1518
output: {
1619
file: 'dist/bundle.mjs',
1720
format: 'esm',
18-
sourcemap: sourcemap
21+
sourcemap: sourceMap
1922
},
2023
plugins: [
2124
json(),
@@ -27,7 +30,7 @@ export default (commandLineArgs) => {
2730
// Used by can-ndjson-stream
2831
TextDecoder: ['text-encoding', 'TextDecoder']
2932
}),
30-
terser()
33+
terser({ sourceMap })
3134
],
3235
// This makes life easier
3336
external: [

0 commit comments

Comments
 (0)