解决 vue-cli 3.0 兼容性问题

上代码

vue.config.js 为入口文件添加 polyfill

1
2
3
4
5
6
7
module.exports = {
...
chainWebpack: config => {
config.entry('index').add('babel-polyfill')
},
...
}

.browserslistrc 文件,我这里兼容到 ie10

1
2
3
4
5
# Browsers that we support

last 1 version
> 1%
IE 10 # sorry

以上三板斧操弄完,项目基本就可已跑在 ie 了