VUe Eelement-ui 兼容es6 兼容IE9+ 报错:SCRIPT1003: 缺少 ':’

正确方法:
下载依赖:babel-polyfill
(1)、安装依赖:npm install --save babel-polyfill
(2)、在main.js中引入;import ‘babel-polyfill’
(3)、在build文件夹的webpack.base.conf.js文件中修改成以下代码

{
test: /.js$/,
loader: ‘babel-loader’,
include: [
resolve(‘src’),
resolve(‘test’),
resolve(‘node_modules/webpack-dev-server/client’),
resolve(’/node_modules/^2.6.1@element-ui/src’), //说明:2.6.1是你引入element-ui的版本号
resolve(’/node_modules/^2.6.1@element-ui/packages’),
resolve(’/static/js/commonFun.js’)
]
},

你可能感兴趣的:(VUe Eelement-ui 兼容es6 兼容IE9+ 报错:SCRIPT1003: 缺少 ':’)