Skip to content

Commit

Permalink
Build/Test Tools: Configure UglifyJS to preserve previous behavior.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
desrosj committed Feb 6, 2025
1 parent d5c9ae5 commit 76a89c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,14 @@ module.exports = function(grunt) {
},
uglify: {
options: {
parse: {
module: false
},
compress: {
module: false
},
output: {
module: false,
ascii_only: true
}
},
Expand Down

0 comments on commit 76a89c2

Please sign in to comment.