1. Babel configuration in App

  1. @babel/preset-env

    module.exports = {
      presets: [
        [
          "@babel/preset-env",
          {
            useBuiltIns: "usage",
            corejs: 3
          }    ]
      ]
    }
    Copy the code

2. Babel configuration in Library

  1. @babel/plugin-transform-runtime

    module.exports = {
      plugins: [
        [
          "@babel/plugin-transform-runtime",
          {
            helper: true,
            regenerator: true,
            corejs: 3
          }
        ]
      ]
    }
    Copy the code

3. Babel configuration in the test

  1. To be added

4. @babel/polyfill Depreciate

This library has been abandoned

5. Use of Babel API

Refer to the official documentation Tooling Packages

6. Reference

Babeljs. IO/docs/en/bab…