chore: tweak terser options to improve debugging

This commit is contained in:
Pooya Parsa 2020-11-14 23:23:17 +01:00
parent d2e8c3bd78
commit 5bd6531f5d

View File

@ -217,8 +217,18 @@ export const getRollupConfig = (options: SLSOptions) => {
rollupConfig.plugins.push(analyze())
}
// https://github.com/TrySound/rollup-plugin-terser
// https://github.com/terser/terser#minify-options
if (options.minify !== false) {
rollupConfig.plugins.push(terser())
rollupConfig.plugins.push(terser({
mangle: {
keep_fnames: true,
keep_classnames: true
},
format: {
comments: false
}
}))
}
return rollupConfig