- 安装 babel-polyfill (cnpm install babel-polyfill --save-dev)
- 在入口文件中引入 import "babel-polyfill" 或者 require("babel-polyfill")
- webpack.base.conf.js中配置
entry: {
app: ["babel-polyfill","./src/main.js"],
}
entry: {
app: ["babel-polyfill","./src/main.js"],
}