vue project configuration ie8 or more adaptation

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

Published 34 original articles · won praise 0 · Views 3634

Guess you like

Origin blog.csdn.net/qq_43469899/article/details/102969776