mishoo / UglifyJS

JavaScript parser / mangler / compressor / beautifier toolkit
http://lisperator.net/uglifyjs/
Other
13.1k stars 1.25k forks source link

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

Closed KimlikDAO-bot closed 1 week ago

KimlikDAO-bot commented 1 week ago

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 ü};

KimlikDAO-bot commented 1 week ago

The regression occurred with 3.16

alexlamsl commented 1 week ago

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 /*, … */ };
alexlamsl commented 1 week ago

See d67daa831