Skip to content
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
@insin

Description

@insin

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions