mishoo/UglifyJS

Regression: non-ascii named exports are wrapped in quotes producing invalid js

Closed this issue · 3 comments

Uglify version (uglifyjs -V)
uglify-js 3.19.3
JavaScript input

const u = "u"
export { u as ü };

The uglifyjs CLI command executed or minify() options used.
uglifyjs test.js

JavaScript output or error produced.
Invalid javascript is produced const u="u";export{u as"ü"};
Earlier versions of uglify produce the correct output const u="u";export{u as ü};

The regression occurred with 3.16

According to MDN, this is part of the standard:

// Export list
export { name1, /* …, */ nameN };
export { variable1 as name1, variable2 as name2, /* …, */ nameN };
export { variable1 as "string name" };
export { name1 as default /*, … */ };