为了兼容IE github
build/webpack.base.conf.js
[vuex] vuex requires a Promise polyfill in this browser.
// app为 string,一直报错,之后改为函数便可以了
entry: () =>{
return { app: ['babel-polyfill', './src/main.js'] }
}
/* 还需要在main.js中引入 */
import 'babel-polyfill'
其他的引入方式,都可以进行测试一下
// ----
entry: {
'babel-polyfill': 'babel-polyfill',
app: './src/main.js'
},
// ------------
entry: {
app: [
'babel-polyfill',
'./src/main.js'
]
},
js转义 需要转义的第三方库
{
test: /.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client'), resolve('node_modules/element-ui-verify/dist')]
},
总结
- 需要考虑很多,虽然vue是支持ie9,但是引用的库,并不一定考虑ie9。