mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43931 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e55da18ea2
commit
2a0319b577
@ -71,7 +71,11 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clean: {
|
clean: {
|
||||||
all: [BUILD_DIR],
|
all: [
|
||||||
|
BUILD_DIR,
|
||||||
|
SOURCE_DIR + 'wp-includes/js/dist',
|
||||||
|
SOURCE_DIR + 'wp-includes/css/dist'
|
||||||
|
],
|
||||||
dynamic: {
|
dynamic: {
|
||||||
dot: true,
|
dot: true,
|
||||||
expand: true,
|
expand: true,
|
||||||
@ -98,7 +102,8 @@ module.exports = function(grunt) {
|
|||||||
'!wp-includes/js/jquery/jquery.masonry.js',
|
'!wp-includes/js/jquery/jquery.masonry.js',
|
||||||
'!wp-includes/js/jquery/ui/*.js',
|
'!wp-includes/js/jquery/ui/*.js',
|
||||||
'!wp-includes/js/tinymce/tinymce.js',
|
'!wp-includes/js/tinymce/tinymce.js',
|
||||||
'!wp-includes/version.php' // Exclude version.php
|
'!wp-includes/version.php', // Exclude version.php
|
||||||
|
'!**/*.map' // The build doesn't need .map files.
|
||||||
],
|
],
|
||||||
dest: BUILD_DIR
|
dest: BUILD_DIR
|
||||||
},
|
},
|
||||||
|
@ -264,7 +264,7 @@ module.exports = function( env = { environment: 'production', watch: false, forc
|
|||||||
watch: env.watch,
|
watch: env.watch,
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( config.mode !== 'production' ) {
|
if ( config.mode !== 'production' && ! env.forceBuildTarget ) {
|
||||||
config.devtool = process.env.SOURCEMAP || 'source-map';
|
config.devtool = process.env.SOURCEMAP || 'source-map';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user