From 76a89c2f7298e25e6b333426858aedc5748a3027 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 6 Feb 2025 17:25:01 +0000 Subject: [PATCH] Build/Test Tools: Configure UglifyJS to preserve previous behavior. As of UglifyJS >= 3.18.0, the default behavior is to process input as an ES module. This updates the relevant configurations to ensure the build process continues to use the previous behavior to avoid JavaScript errors in the minified versions of files. Follow up to [58563], [58586], and [59509]. Props siliconforks, nataliat2004, poena, mai21, SergeyBiryukov. Fixes #62767. See #61519, #62220. git-svn-id: https://develop.svn.wordpress.org/trunk@59768 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index 1b58ac12b1..954d66599c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -774,7 +774,14 @@ module.exports = function(grunt) { }, uglify: { options: { + parse: { + module: false + }, + compress: { + module: false + }, output: { + module: false, ascii_only: true } },