WordPress.org

Make WordPress Core

Changeset 43931


Ignore:
Timestamp:
11/22/2018 02:04:51 AM (13 months ago)
Author:
pento
Message:

Build Tools: Don't include .map files in the build.

These files are fairly large, and while they're useful in development, they're not needed in the final build.

Props pento, mcsf.
See #45201.

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/Gruntfile.js

    r43905 r43931  
    7272        },
    7373        clean: {
    74             all: [BUILD_DIR],
     74            all: [
     75                BUILD_DIR,
     76                SOURCE_DIR + 'wp-includes/js/dist',
     77                SOURCE_DIR + 'wp-includes/css/dist'
     78            ],
    7579            dynamic: {
    7680                dot: true,
     
    99103                            '!wp-includes/js/jquery/ui/*.js',
    100104                            '!wp-includes/js/tinymce/tinymce.js',
    101                             '!wp-includes/version.php' // Exclude version.php
     105                            '!wp-includes/version.php', // Exclude version.php
     106                            '!**/*.map' // The build doesn't need .map files.
    102107                        ],
    103108                        dest: BUILD_DIR
  • branches/5.0/tools/webpack/packages.js

    r43919 r43931  
    265265    };
    266266
    267     if ( config.mode !== 'production' ) {
     267    if ( config.mode !== 'production' && ! env.forceBuildTarget ) {
    268268        config.devtool = process.env.SOURCEMAP || 'source-map';
    269269    }
Note: See TracChangeset for help on using the changeset viewer.