14

I use babel 7.8.3 together with @babel/preset-env, useBuiltIns: 'usage' and corejs: 3. The documentation for @babel/preset-env is not clear to me.

Do I need to add the following lines at the top of my entry file or is it done automatically by babel?

import 'core-js/stable';
import 'regenerator-runtime/runtime';
wube
  • 923
  • 2
  • 10
  • 22

2 Answers2

1

Don't need to add import code by yourself when use usage.

And no more need to manually include the regenerator-runtime helper when compiling generators after babel/core >= 7.18

taoliujun
  • 69
  • 4
0

According to babel-preset-env docs you should import those modules by yourself

NirG
  • 746
  • 5
  • 12
  • I'm sorry. I made a typo in the description. I meant `useBuiltIns: 'usage'` not `useBuiltIns: 'entry'` – wube Feb 20 '20 at 14:52