From: Jérôme Benoit Date: Fri, 28 Jul 2023 23:44:22 +0000 (+0200) Subject: refactor: cleanup rollup configuration X-Git-Tag: v1.2.20~98 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=92bee070af6c66a62db8ef8f66e9e1e374b7e899;p=e-mobility-charging-stations-simulator.git refactor: cleanup rollup configuration Signed-off-by: Jérôme Benoit --- diff --git a/rollup.config.mjs b/rollup.config.mjs index 83c2e009..e06f14d0 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -24,6 +24,7 @@ const availableParallelism = () => { const isDevelopmentBuild = process.env.BUILD === 'development'; const isAnalyzeBuild = process.env.ANALYZE; +const sourceMap = !!isDevelopmentBuild; export default { input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'], @@ -32,7 +33,7 @@ export default { { dir: 'dist', format: 'esm', - sourcemap: !!isDevelopmentBuild, + sourcemap: sourceMap, plugins: [terser({ maxWorkers: Math.floor(availableParallelism() / 2) })], }, ], @@ -73,7 +74,7 @@ export default { typescript({ tsconfig: 'tsconfig.json', compilerOptions: { - sourceMap: !!isDevelopmentBuild, + sourceMap, }, }), del({