-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
https://github.com/optoolco/tonic/blob/master/HELP.md under the heading "Webpack 4+ Mangling Error" suggests that a "Mangling" error in the console when using webpack is fixable by adding the keep_fnames option to the UglifyJS config in your webpack config. However, Webpack now comes with TerserPlugin out of the box, and it's that that's mangling the names by default; it may be worth adding to those docs to suggest making a change as follows:
...
optimization: {
minimizer: [ // needed for Tonic
new TerserPlugin({
terserOptions: {
keep_fnames: true
}
})
]
}
...to the webpack configuration. (This is exactly what's there already, except for Terser, not UglifyJS).
This isn't a PR because there may be other better Tonic-ish options that should also be set for Terser and I don't know what they would be.
Metadata
Metadata
Assignees
Labels
No labels