Make WordPress Core

Changeset 43932


Ignore:
Timestamp:
11/22/2018 03:11:22 AM (5 years ago)
Author:
pento
Message:

Build Tools: Tweak the webpack config for unminified files.

[43931] unintentionally caused the unminified files to wrap the code in an eval() call.

See #45201.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/tools/webpack/packages.js

    r43931 r43932  
    265265    };
    266266
    267     if ( config.mode !== 'production' && ! env.forceBuildTarget ) {
     267    if ( config.mode !== 'production' ) {
    268268        config.devtool = process.env.SOURCEMAP || 'source-map';
     269    }
     270
     271    if ( env.forceBuildTarget ) {
     272        delete config.devtool;
     273        config.mode = 'production';
     274        config.optimization = {
     275            minimize: false
     276        };
    269277    }
    270278
Note: See TracChangeset for help on using the changeset viewer.