Skip to content

Commit

Permalink
Scripts: Prevent mangle of translation functions (#28231)
Browse files Browse the repository at this point in the history
Reserve translation functions from mangling.
This should ensure that strings are correctly extracted for translation.
  • Loading branch information
sirreal authored and youknowriad committed Jan 15, 2021
1 parent 38b4c3e commit e7dbc2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ const config = {
compress: {
passes: 2,
},
mangle: {
reserved: [ '__', '_n', '_nx', '_x' ],
},
},
extractComments: false,
} ),
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ module.exports = {
compress: {
passes: 2,
},
mangle: {
reserved: [ '__', '_n', '_nx', '_x' ],
},
},
extractComments: false,
} ),
Expand Down

0 comments on commit e7dbc2d

Please sign in to comment.