Skip to content

Commit

Permalink
Merge pull request #55 from Timodie/taddai/turn-off-merge-vars
Browse files Browse the repository at this point in the history
build: Disable merge_vars in Gruntfile uglify process
  • Loading branch information
onebytegone authored Sep 19, 2024
2 parents dbf8f7d + 238def7 commit 62e15a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ module.exports = function(grunt) {
sourceMap: DEBUG,
sourceMapIncludeSources: DEBUG,
mangle: !DEBUG,
compress: !DEBUG,
// Disable the `merge_vars` option in the compression phase.
// `merge_vars` aggressively reuses variable names, which can lead to
// unexpected behavior or runtime errors in certain cases.
compress: DEBUG ? false : { merge_vars: false }, // eslint-disable-line camelcase
beautify: DEBUG,
},
},
Expand Down

0 comments on commit 62e15a3

Please sign in to comment.