一、vue-cli2 兼容ie
参考网址:https://blog.csdn.net/weixin_...
具体步骤:
(1)
image.png

   <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
   <meta http-equiv="X-UA-Compatible" content="IE=edge,IE=IE9">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">

(2)
1655090209883.png
npm install --save babel-polyfill
(3)
1655090240276.png
import 'babel-polyfill'
(4)
image.png
entry: ["classlist-polyfill","babel-polyfill", "./src/main.js"],
(5)
转换语句:npm i babel-preset-es2015
(6)
安装 npm i classlist-polyfill,并且在webpack.base.conf.js中,添加'classlist-polyfill'
然后,npm run dev,可以了!


张丽娟
19 声望0 粉丝

工作笔记