terser-webpack-plugin
terser-webpack-plugin copied to clipboard
Support for other devtool options for development mode
- Operating System: macOS 10.14.6
- Node Version: 12.11.1
- NPM Version: 6.11.3
- webpack Version: 4.41.0
- terser-webpack-plugin Version: 1.4.1
Feature Proposal
Support more options for devtool, in particular, the development friendly ones
Feature Use Case
Currently, only the slowest options for devtool are supported, but this makes development builds take longer than they need to and it would be nice to be able to use the cheaper options for devtool
Unfortunately, support for others is not possible for technical reasons, for example eval* can't be handled terser, also many of devtool for development mode, where unnecessary use minimizer. Anyway i mark this as enhancement if somebody have ideas how it can be implemented. PR welcome.
That makes sense. Go ahead and close this out, if there's not a good way to do this.
@evilebottnawi is Terser not behaving as it should in the face of eval for some reason? Please do let me know.
@fabiosantoscode because we have code + source maps inside eval function, so it is normal what terser doesn't handle that :smile:
@evilebottnawi Terser can minify new Function(...) in some situations, given the unsafe_Function option is enabled. If required, we can minify eval as well.
@fabiosantoscode it will be great :smile: , just do simple example webpack config with devtool: 'eval' and look how at this