1. First, add the following code to the index.html file in the root directory
<meta http-equiv="X-UA-Compatible" content="IE=edge">
2. npm install dependencies
Install the babel-polyfill plugin
指令:
npm install babel-polyfill --save-dev
3. Introduce the plugin into the main.js file
import ‘babel-polyfill’
4. Need to make the following modifications in the webpack.base.config.js configuration file
module.exports = {
entry: {
app: ["babel-polyfill", "./src/main.js"]
}
};
替代
module.exports = {
entry: {
app: './src/main.js'
}
}
ok finish