Skip to content

Commit 589e11c

Browse files
committed
Add uglify:emoji-loader to force top-level symbol minification
1 parent 050fa6f commit 589e11c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Gruntfile.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,17 @@ module.exports = function(grunt) {
838838
'!**/*.min.js',
839839
'!wp-admin/js/custom-header.js', // Why? We should minify this.
840840
'!wp-admin/js/farbtastic.js',
841+
'!wp-includes/js/wp-emoji-loader.js', // This is a module. See the emoji-loader task below.
841842
]
842843
},
844+
'emoji-loader': {
845+
options: {
846+
module: true,
847+
toplevel: true,
848+
},
849+
src: WORKING_DIR + 'wp-includes/js/wp-emoji-loader.js',
850+
dest: WORKING_DIR + 'wp-includes/js/wp-emoji-loader.min.js',
851+
},
843852
'jquery-ui': {
844853
options: {
845854
// Preserve comments that start with a bang.
@@ -1549,6 +1558,7 @@ module.exports = function(grunt) {
15491558

15501559
grunt.registerTask( 'uglify:all', [
15511560
'uglify:core',
1561+
'uglify:emoji-loader',
15521562
'uglify:jquery-ui',
15531563
'uglify:imgareaselect',
15541564
'uglify:jqueryform',

0 commit comments

Comments
 (0)