Add ES6 compatibility (Babel-Polyfill)
1. Import ‘babel-polyfill’ from main.js
2. In webpack.base.conf.js in the build directory
entry: {
app: './src/main.js'
},
Copy the code
Change to
entry: {
app: ["babel-polyfill","./src/main.js"]
},
Copy the code
Pay attention to cache, it may not take effect