Want to start documenting things we need to do when Babel 7 is ready.
{ polyfill: false, useBuiltIns: true, useESModules: true }, see https://github.com/babel/babel/pull/5442 for context and https://github.com/babel/babel/issues/4418 for why we couldn't do it beforetransform-inline-elements in production and bundle Symbol polyfill (?).We'll want to import babel-polyfill by default if we turn useBuiltIns to true.
Which features would depend on them? I just want to externalize helpers without bringing the whole core-js with them.
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.
To clarify, I made the suggestion to make the development experience nicer; not that we need it.
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 (https://github.com/babel/babel/issues/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?
This works in Babel 7 from what I was told. As does many other really obscure cases:
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-polyfills
Now might be a good time to start trying Babel 7 and looking out for issues.
https://babeljs.io/blog/2018/08/27/7.0.0 looks like the moment is finally there 馃挴
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?
Most helpful comment
Now might be a good time to start trying Babel 7 and looking out for issues.