You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useBuiltIns transforms babel-polyfill into only the language features used in the app, babel-polyfill would become a single core-js import of Map if that's the only feature used.
Hmm, that's not the part of useBuiltins I'm interested in. IMO trying to guess needed features by code is always lossy ([].includes) and we shouldn't attempt that.
The thing I'm interested in is deduplicating Babel helpers like _createClass. It's possible today with helpers: true but this brings in core-js due to how Babel worked (babel/babel#4418). As I understand this is now fixed.
IMO trying to guess needed features by code is always lossy ([].includes) and we shouldn't attempt that.
This works in Babel 7 from what I was told. As does many other really obscure cases:
'abc'['inclu' + 'des']('a')
I haven't actually tested this myself, but it would be sweet if it did.
Unfortunately, I don't think we can opt-out of this behavior for end-users that end up requiring babel-polyfill. Is useBuiltins required as part of deduping these helpers?
Now might be a good time to start trying Babel 7 and looking out for issues.
Reacted by Marko Trebizan, Raj Nigam, Steven Langbroek, Oliver Lassen, ekoneko, Marshall Ford, Jakub Kahovec, Clement Hoang, Oleg Lustenko, Iddan Aaronsohn and 7 more
Reacted by Michael Stramel, Dmitry Pytkin, Sebastian Andil, Serhii Sydoruk, jabsatz, Andrey (Andrii) Los, Furkan Tunalı, Alexandr Li and Christian Vadalà
I think that Babel 7 being in beta was the biggest blocker to release version 2.0.0.
Any chances to make version 2.0.0 happened this September?
I see there is a lot of tasks open, but can't they be postponed for future 2.x.x versions?
Reacted by Ronald Rey, jabsatz, Brett Jankord, Delwyn de Villiers, Erik Sytnyk, Alan Christensen, Massimo De Marchi, Alexandr Li, Vinh P. Dinh, Adam Močkoř and 1 more
Activity
Timer commentedon May 28, 2017
We'll want to import
babel-polyfillby default if we turnuseBuiltInstotrue.gaearon commentedon May 28, 2017
Which features would depend on them? I just want to externalize helpers without bringing the whole core-js with them.
Timer commentedon May 28, 2017
useBuiltInstransformsbabel-polyfillinto only the language features used in the app,babel-polyfillwould become a singlecore-jsimport ofMapif that's the only feature used.Timer commentedon May 28, 2017
To clarify, I made the suggestion to make the development experience nicer; not that we need it.
gaearon commentedon May 28, 2017
Hmm, that's not the part of
useBuiltinsI'm interested in. IMO trying to guess needed features by code is always lossy ([].includes) and we shouldn't attempt that.The thing I'm interested in is deduplicating Babel helpers like
_createClass. It's possible today withhelpers: truebut this brings incore-jsdue to how Babel worked (babel/babel#4418). As I understand this is now fixed.Timer commentedon May 28, 2017
This works in Babel 7 from what I was told. As does many other really obscure cases:
I haven't actually tested this myself, but it would be sweet if it did.
Unfortunately, I don't think we can opt-out of this behavior for end-users that end up requiring
babel-polyfill. IsuseBuiltinsrequired as part of deduping these helpers?badsyntax commentedon Nov 4, 2017
I put together an example project showing how this works, by using the
"useBuiltIns": "usage"option of@babel/env: https://github.com/badsyntax/babel-builtin-polyfillsgaearon commentedon Nov 15, 2017
Now might be a good time to start trying Babel 7 and looking out for issues.
robertvansteen commentedon Aug 28, 2018
https://babeljs.io/blog/2018/08/27/7.0.0 looks like the moment is finally there 💯
RIP21 commentedon Aug 28, 2018
I think that Babel 7 being in beta was the biggest blocker to release version 2.0.0.
Any chances to make version 2.0.0 happened this September?
I see there is a lot of tasks open, but can't they be postponed for future 2.x.x versions?