Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for other devtool options for development mode #175

Open
daveisfera opened this issue Oct 18, 2019 · 6 comments
Open

Support for other devtool options for development mode #175

daveisfera opened this issue Oct 18, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@daveisfera
Copy link

  • 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

@alexander-akait alexander-akait added the enhancement New feature or request label Oct 19, 2019
@alexander-akait
Copy link
Member

alexander-akait commented Oct 19, 2019

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.

@daveisfera
Copy link
Author

That makes sense. Go ahead and close this out, if there's not a good way to do this.

@fabiosantoscode
Copy link
Contributor

@evilebottnawi is Terser not behaving as it should in the face of eval for some reason? Please do let me know.

@alexander-akait
Copy link
Member

@fabiosantoscode because we have code + source maps inside eval function, so it is normal what terser doesn't handle that 😄

@fabiosantoscode
Copy link
Contributor

@evilebottnawi Terser can minify new Function(...) in some situations, given the unsafe_Function option is enabled. If required, we can minify eval as well.

@alexander-akait
Copy link
Member

@fabiosantoscode it will be great 😄 , just do simple example webpack config with devtool: 'eval' and look how at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants