diff --git a/Gruntfile.js b/Gruntfile.js index 62fb44fbd0..6d0d02922f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1126,6 +1126,26 @@ module.exports = function(grunt) { dest: BUILD_DIR + 'wp-includes/' } ] + }, + sourceMaps: { + options: { + patterns: [ + { + match: new RegExp( '//# sourceMappingURL=.*\\s*' ), + replacement: '' + } + ] + }, + files: [ + { + expand: true, + flatten: true, + src: [ + BUILD_DIR + 'wp-includes/js/underscore.js' + ], + dest: BUILD_DIR + 'wp-includes/js/' + } + ] } }, _watch: { @@ -1569,6 +1589,7 @@ module.exports = function(grunt) { 'includes:emoji', 'includes:embed', 'replace:emojiBannerText', + 'replace:sourceMaps', 'verify:build' ] ); } diff --git a/package-lock.json b/package-lock.json index 617197a555..45ab762835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23053,9 +23053,9 @@ "dev": true }, "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" }, "underscore.string": { "version": "3.3.5", diff --git a/package.json b/package.json index 0441ab0fb3..5be8c4b276 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "react": "16.13.1", "react-dom": "16.13.1", "twemoji": "13.0.2", - "underscore": "1.8.3", + "underscore": "1.12.1", "whatwg-fetch": "3.0.0" }, "scripts": {