-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
core-js@3, babel and a look into the future #496
Comments
I'm almost crying from happiness :) Great article, we need it. Year ago I wrote the article about the components creation and "polyfill" management topic for biggest Russian developers community- https://habr.com/ru/post/416235/ - I din't get any replies, so I was depressed both by the complexity of the problem and because of "there is nobody who try to reflect on it". Now at least I know who have a complete vision and will return to this text many times. Thank you again. P.S. Check https://github.com/SebastianS90/webpack-polyfill-injector , author has a lot of experience in dynamic loading of polyfills (on demand). |
If I want all features from |
@otakustay it's an interesting issue. If you don't understand the difference, just use the main entry point. If you will want to optimize polyfills size in the future, just read |
What about element polyfills?
Any plans to support? |
@zloirock this your note was in form of open question... so if you are still need to disccuss it, my opinion is : "it depends on your priorities" :) async dynamic loading and runtime browser detection in webpack runtime is much more complex task which I would personally avoid (since there is early mentioned https://github.com/SebastianS90/webpack-polyfill-injector - in ideal world cooperation should be possible). Then building web standart polyfils set is a good choice (but I guess boring). |
Previously @babel/polyfill provided an umd build |
Sure, it's a separate |
I am setting up a new project using the latest babel and webpack, but while your article is very informative I must admit that I still have a question 😄
I am using It's a bit unclear to me from reading https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#usebuiltins-entry-with-corejs-3 is I have something else to do or if I need to add: import "core-js/stable";
import "regenerator-runtime/runtime"; to my entrypoint (and of course add Thanks :) |
Updating of this documentation still in progress.
With |
Hi Zloirock, Thanks for this great library. I have a question about IE11 support. Currently import core-js like so:
Then I set corejs to 2 in babelrc. This works fine for IE11. However, when I put it to 3 it doesn't work anymore, although I don't get any errors in the console. Is core-js@3 supposed to support IE11? |
Sure, IE11 is supported. Even IE8- should be supported.
I can't say anything without more info or a reproducible example. Please, create a separate issue. |
Thanks for the reply, I adjusted the order of the imports and I see an error now: Unable to get property 'iterator' of undefined or null reference. It does work in chrome and firefox though. Should I make a new issue about this? |
@nvdlug yes. And, please, with a reproducible example or at least a stack trace. |
We've seen our time to interactive metric tank in our app, across multiple pages, after migrating. Note we are using Tweaking a bit more with babel-env to see if we can optimize it. |
If someone has the latest working with babel can you post the full solution please. I've been searching/trying stuff posted in github issues and stack overflow for hours now and keep going in circles. |
@poorpaddy What problems are you running into? |
In other words: Any timeline on when we can expect this problem to be fixed? |
@rjgotten now I lost any motivation to work on it or another Anyway, if your target includes old engines like IE11, you will not see any serious difference even it will be done. |
Why a single target? You can easily use build tooling to produce a down-level build for IE11 and an up-level build for modern browsers, or even go more granular if you want and have several levels. That's the beauty of tools like Webpack and Babel, backed by high quality polyfills like CoreJS. The same source can be made to work at several levels against little additional developer effort. Practically all of it can be hidden behind write-once-use-many automation.
That though, is honestly a sad way to respond. Are you attempting to guilt-trip me because I'm critical of the work that was done? Just for the record: I'm not saying the effort was for naught, because it certainly was not. There are and will be many projects that can benefit from these updates. Just not the segment consisting of high-performance public facing websites, where download-size is a hugely important factor. And that's sad, because that's quite a big chunk of the market. There's a risk/benefits decision there and most developers will opt to forego integration with Yes; 'going global' works -- I'm using it now as well, actually. So credit where it's due 👍 -- but it brings its own problems. I'm already not looking forward to having to deal with corner cases of global polyfills failing or causing havoc 'somewhere.' But I know it's still the lesser of evils. I'd just like not to have to make that choice to begin with. |
Nope. It was related to my current burnout and problems, see #548 (comment)
For this case, the global version is much more applicable.
Yes, for this case separate bundles and browsers targeting for As I wrote in the article, it can be implemented enough simple, but, as I wrote above, no concrete timeline. @nicolo-ribaudo has own vision of future of polyfilling in |
Ouch. Ok. I was not aware of that. o_O
Well; that atleast is something. Thanks. 👍 |
Yup! You can find my ideas at babel/babel#10008 |
This comment has been minimized.
This comment has been minimized.
My project is using object.assign in node_modules. where to add the babel core-js to handle the "Object.assign is not a function" error? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
core-js@3, babel and a look into the future
The text was updated successfully, but these errors were encountered: