This repository was archived by the owner on Feb 15, 2025. It is now read-only.
This repository was archived by the owner on Feb 15, 2025. It is now read-only.
Add webpack.debug config to create a more debuggable production build #336
Closed
Description
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 disablecompress
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 thewebpack.uglify
options and there was no way to conditionally enableNamedModulesPlugin
while keeping other production build features)