1. Babel configuration in App
-
@babel/preset-env
module.exports = { presets: [ [ "@babel/preset-env", { useBuiltIns: "usage", corejs: 3 } ] ] } Copy the code
2. Babel configuration in Library
-
@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
- 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…