-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Create bugfix plugin for classes in computed keys in Firefox #16390
Conversation
overwrite: { | ||
// TODO: Once Firefox releases the fix, write the correct version here. | ||
firefox: undefined, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For tiny browser bugs this is probably easier than having to go through compat-table.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56589 |
async function* f() { | ||
class A { | ||
#x; | ||
[(() => class {}).call()]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add .call()
here to prevent Terser from undoing the work done by this plugin: terser/terser#1514
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, because it is possible that more than just terser will do this (or may do so in the future).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I'm preparing a docs PR. |
This PR adds a plugin to compile
to
in Firefox, so that it doesn't throw a syntax error.