VUE——如何兼容IE9|IE10|IE11浏览器

前言

微软爸爸都把IE干掉了,还有客户在用,木得办法啊

内容

  1. 安装babel-polyfill插件
npm install --save babel-polyfill
  1. main.js中引入babel-polyfill
import 'babel-polyfill'
  1. 修改config中的webpack.base.conf.js配置
entry: { app: ['babel-polyfill', './src/main.js'] },

  1. 安装es6-promise兼容axios
npm install --save es6-promise
  1. main.js中引入es6-promise
import 'es6-promise/auto'
  1. 兼容element-ui

将element-ui组件的resolve进来

{ test: /\.js$/, loader: 'babel-loader', include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client'),resolve('/node_modules/element-ui/src'),resolve('/node_modules/element-ui/packages')] },

  转载:https://www.cnblogs.com/wangyang0210/p/13864749.html

posted @ 2022-02-14 10:58  文学少女  阅读(419)  评论(0编辑  收藏  举报