本文主要是介绍babel 报regeneratorRuntime is not defined的错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
.babelrc 文件
{"plugins": ["@babel/plugin-proposal-optional-chaining","@babel/plugin-transform-runtime"],"presets": [["@babel/preset-env", {"useBuiltIns": "usage","corejs": 3,"targets": {// https://jamie.build/last-2-versions"browsers": ["> 0.25%", "not ie 11", "not op_mini all"]}}]]}
npm install @babel/plugin-proposal-optional-chaining --save-dev
npm install @babel/plugin-transform-runtime --save-dev
Can't resolve '@babel/runtime/helpers/classCallCheck' 错误
npm i @babel/runtime --save-dev
这篇关于babel 报regeneratorRuntime is not defined的错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!