1.首先需要在根目录的index.html文件加入如下代码

<meta http-equiv="X-UA-Compatible" content="IE=edge">

2.npm安装依赖

安装babel-polyfill 插件

指令:
npm install babel-polyfill --save-dev

3.在入口文件main.js文件中引入插件

import 'babel-polyfill'

4.需要在webpack.base.config.js配置文件中做如下修改

module.exports = { 
entry: { 
app: ["babel-polyfill", "./src/main.js"] 
} 
}; 
替代 
module.exports = { 
entry: { 
app: './src/main.js' 
} 
} 

到此就配置完成了

相关文章:

  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2022-01-15
相关资源
相似解决方案