-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Bare unicode characters after bundle of json #977
Comments
FF60 says |
Huh. My compatibility table data says that this is supported since Firefox 53: https://github.com/kangax/compat-table/blob/c06fcd3387a5770708a452fb90dbc4e99bb37e4f/data-es6.js#L18988. If you want to use UTF-8 instead you can enable this: https://esbuild.github.io/api/#charset. |
Maybe Zotero has done something that caused a regression, but I have to say it is not very likely. But thanks, this will fix it for me. |
Setting the charset to utf-8 causes dict literals with unicode keys to be output unescaped, which also gives me errors in Zotero. Is there a target that is close to |
What is the current target list? This doesn't list |
(alternately, can I just convince esbuild not to use bare unicode escapes?) |
Or if I could replace the json loader, that would also work; I'd just use jsesc to output it in a way that works in Zotero, as the problem is limited to JSON files for me. |
If I delete |
It turns out this doesn't have to do with Firefox at all. The bug is that when validating whether esbuild can print an identifier without quotes, non-BMP characters always being treated as |
Sweet! |
This does fix it for me. |
If you don't mind me asking -- do you have a release planned that would include this? I understand no hard ETAs in open source work. |
No worries. I generally release changes within a day or two. |
I've migrated my project, and builds are not only amazingly fast (including type-checking using tsc), my bundler code is now significantly simpler because an increasing part of my bundler setup consisted of workarounds for webpack. Thank you! |
bundle script:
tt.ts:
ascii.json:
output:
I'm trying to run the results through jscodeshift and it doesn't like that bare
\u{1D7CE}
(I didn't know this was valid javascript)The text was updated successfully, but these errors were encountered: