-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Do I still need this package to polyfill ? #60
Comments
|
Oh thanks. I had thought But I just need to polyfill a specific api (Promise.any to be exact) what is the problem of |
The readme also said "These packages are highly experimental and they have not been tested in production applications yet.” |
@qiulang imo the best practice for package authors is not to rely on polyfills when possible. For Promise.any, I'd suggest depending on https://npmjs.com/promise.any and using that directly. In environments where it's natively available, it will use the native one. |
Might be necro'ing, but as a long-time user, thought I'd answer too since this wasn't closed and OP didn't quite respond.
I've used them in multiple production applications and libraries at this point 🙂
The collection of plugins here allow you to get the best of both worlds as a library author, as written in the History and Motivation section of the README.
As an application author, one could just use As a library author, one could use {
"targets": { "firefox": 42 },
"presets": ["@babel/preset-env"],
"plugins": [
["polyfill-corejs3", {
"method": "usage-pure"
}]
]
} The Migration docs offer various examples of different use-cases when moving from |
These packages are used in preset-env too, so they have been battle-tested. We should probably remove the "highly experimental" notice! |
Hi
I see Rethink polyfilling story was closed because of this project.
But I read here https://babeljs.io/docs/en/babel-polyfill/ "As of Babel 7.4.0, this package has been deprecated"
So my question is I do not need this package to do polyfill with the latest @babel/core (I use version "7.12.13" ), right ?
But since this package was deprecated what is latest document about polyfill using babel ? How much information in Rethink polyfilling story is invalid now ?
The text was updated successfully, but these errors were encountered: