mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 01:12:27 +00:00
Set TerserPlugin to not minify *Error classes/functions (#3615)
Set the `keep_classnames` and `keep_fnames` options for TerserPlugin, to keep OError and subclass names intact so they can be accessed by this.constructor.name GitOrigin-RevId: 109fb81558b977ccc4acdb69f8544f7693940919
This commit is contained in:
parent
260b878b7d
commit
b611c307d7
1 changed files with 9 additions and 1 deletions
|
@ -42,7 +42,15 @@ module.exports = merge.smart(
|
|||
|
||||
optimization: {
|
||||
// Minify JS (with Terser) and CSS (with cssnano)
|
||||
minimizer: [new TerserPlugin(), new OptimizeCssAssetsPlugin()]
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
keep_classnames: /Error$/,
|
||||
keep_fnames: /Error$/
|
||||
}
|
||||
}),
|
||||
new OptimizeCssAssetsPlugin()
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
|
|
Loading…
Reference in a new issue