ember-cli-babel icon indicating copy to clipboard operation
ember-cli-babel copied to clipboard

useBuiltIns not working

Open simonihmig opened this issue 8 years ago • 3 comments

Is useBuiltIns supposed to work here?

I guess no, because the polyfill is imported using ember-cli, so there is no import "babel-polyfill"; statement that this babel plugin is looking for, if I correctly understand that. Reducing the needed polyfill parts is probably tackled by https://github.com/babel/ember-cli-babel/pull/142, not using the useBuiltIns option, right?

If that is the case, this option should probably removed from the Readme, or mention that this is not working!?

simonihmig avatar Jul 12 '17 00:07 simonihmig

useBuiltIns still can't work in 2020

houfeng0923 avatar Jun 24 '20 12:06 houfeng0923

Still seems to be a problem with ember-cli-babel 8 (embroider safe) w/ core-js 3. Attempting to use useBuiltIns: 'usage' will add the imports, but gives a runtime error that the core-js files can't be found.

Trying to look into it a bit further...

I think useBuiltIns: 'entry' is basically a no-op at the moment? It seems to keep the core-js/stable (or whatever) import in-place which will import all the polyfills, meaning it's not run properly.

When I use core-js-builder with our browser targets I get a significantly smaller set of polyfills. I guess using that wrapped in a webpack plugin or whatever could be a temporary alternative to useBuiltIns: 'entry'.

'usage' would however probably be the more ideal solution...

nickschot avatar Nov 09 '23 14:11 nickschot