Make WordPress Core

Changeset 44282 for trunk


Ignore:
Timestamp:
12/18/2018 03:13:58 AM (6 years ago)
Author:
SergeyBiryukov
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.
Merges [43931] and [43932] to trunk.
See #45201.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Gruntfile.js

    r44252 r44282  
    106106            plugins: [BUILD_DIR + 'wp-content/plugins'],
    107107            themes: [BUILD_DIR + 'wp-content/themes'],
    108             all: cleanFiles,
     108            all: [
     109                cleanFiles,
     110                SOURCE_DIR + 'wp-includes/js/dist',
     111                SOURCE_DIR + 'wp-includes/css/dist'
     112            ],
    109113            js: [BUILD_DIR + 'wp-admin/js/', BUILD_DIR + 'wp-includes/js/'],
    110114            dynamic: {
     
    139143                            '!.{svn,git}', // Exclude version control folders.
    140144                            '!wp-includes/version.php', // Exclude version.php
     145                            '!**/*.map', // The build doesn't need .map files.
    141146                            '!index.php', '!wp-admin/index.php',
    142147                            '!_index.php', '!wp-admin/_index.php'
  • trunk/tools/webpack/packages.js

    r44262 r44282  
    269269    }
    270270
     271    if ( env.forceBuildTarget ) {
     272        delete config.devtool;
     273        config.mode = 'production';
     274        config.optimization = {
     275            minimize: false
     276        };
     277    }
     278
    271279    if ( config.mode === 'development' ) {
    272280        config.plugins.push( new LiveReloadPlugin( { port: process.env.WORDPRESS_LIVE_RELOAD_PORT || 35729 } ) );
Note: See TracChangeset for help on using the changeset viewer.