We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWC correctly transpiles unicode code point escapes when minification is true, but leaves them as is without it. This results in invalid ES5 syntax.
const x = "\u{20BB7}";
{ "jsc": { "parser": { "syntax": "ecmascript" }, "target": "es5" }, "minify": false }
https://play.swc.rs/?version=1.10.15&code=H4sIAAAAAAAAA0vOzysuUahQsFVQiimtNjJwcjKvVbIGAHMWJboWAAAA&config=H4sIAAAAAAAAA1WPSw7DIAwF9zkF8rrbdtE79BAWdSIifrKJVBTl7iUE0maH3xsz8jooBbNoeKq1PMsQkYX4nEsi2Sf8lARIOxTNJia49XaWvRrRCtVoOxpIyBOluiX3hoMNQajjLXPGmzH%2FC3VwkUnkCu4o%2BsnSVTc0JbjwXmrZDkk50qF%2FwA%2FqsvNjMPLqm4kXGrYvhlQioBQBAAA%3D
No response
Output should be the same as with minification:
var x= "\uD842\uDFB7";
ES6 unicode escape code point
var x = "\u{20BB7}";
1.10.15
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
SWC correctly transpiles unicode code point escapes when minification is true, but leaves them as is without it. This results in invalid ES5 syntax.
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.10.15&code=H4sIAAAAAAAAA0vOzysuUahQsFVQiimtNjJwcjKvVbIGAHMWJboWAAAA&config=H4sIAAAAAAAAA1WPSw7DIAwF9zkF8rrbdtE79BAWdSIifrKJVBTl7iUE0maH3xsz8jooBbNoeKq1PMsQkYX4nEsi2Sf8lARIOxTNJia49XaWvRrRCtVoOxpIyBOluiX3hoMNQajjLXPGmzH%2FC3VwkUnkCu4o%2BsnSVTc0JbjwXmrZDkk50qF%2FwA%2FqsvNjMPLqm4kXGrYvhlQioBQBAAA%3D
SWC Info output
No response
Expected behavior
Output should be the same as with minification:
Actual behavior
ES6 unicode escape code point
Version
1.10.15
Additional context
No response
The text was updated successfully, but these errors were encountered: