-
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
Add an ASCII-only output mode #70
Comments
Thanks for the awesome project btw. It builds all of Framer in 500ms (instead of 40s with webpack/ts). We'll keep experimenting to see if we can use it in production. |
If you force the browser to utf-8 it does work:
|
Thanks for trying esbuild out on the Framer codebase. Feedback like this is very helpful, especially with attached repro code like this.
Wow, that's awesome! Glad to hear it's such a big improvement. Does it actually already work for your use case? Or are there other webpack loaders that would need to work too? Do you happen to have any output size comparisons too?
Given that this is the case, and that other minifiers such as terser do the same thing as esbuild here, I'm not sure this is a bug in esbuild. I'm deliberately using UTF-8 output to be as compact as possible since Unicode escape sequences are more verbose. It seems reasonable to add an |
Cool! It'd be really helpful to know if this works out for you or not. Heads up that we're not using this at Figma in production yet. Also keep in mind that esbuild's support for converting newer syntax into older syntax for older browsers (what Babel does) isn't complete yet. So it might not be ready for your use case depending on what older browsers you need to support. If you're using newer syntax and use |
I’m making good progress, but have not been able to build it successfully yet. I’m running into random reference errors that I think are caused by circular imports in our code. I’ll dig a bit deeper and report back. |
If you build anything containing fbjs you run into an exotic regex that looks like this:
Which results in a broken regex if you build it with esbuild.
I made a repro here. Just run
yarn build
to rebuild.The text was updated successfully, but these errors were encountered: