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

Add webpack.debug config to create a more debuggable production build #336

Closed
insin opened this issue Jun 23, 2017 · 0 comments
Closed

Add webpack.debug config to create a more debuggable production build #336

insin opened this issue Jun 23, 2017 · 0 comments

Comments

@insin
Copy link
Owner

insin commented Jun 23, 2017

Where a "production build" is a build which has development-only and other dead code removed.

Using this should:

  • Trigger use of NamedModulesPlugin
  • Configure UglifyJSPlugin with {mangle: false} (don't disable compress as it's what removes dead code)

Docs should encourage use of this via a --webpack.debug argument.

Always emit a warning when this is enabled via a user config file, so it's harder for someone to forget to remove it after adding it temporarily.

Inspired by playing about with nwb web build for webpack/webpack.js.org#1331 to figure out how tree shaking actually works - it was fiddly to pass all the webpack.uglify options and there was no way to conditionally enable NamedModulesPlugin while keeping other production build features)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant