【iView与Vue,在IE下ES6语法不兼容】

package.json--"devDependencies"中添加

"devDependencies": {
    "autoprefixer": "^7.1.2",
    "babel-core": "^6.22.1",
    "babel-helper-vue-jsx-merge-props": "^2.0.3",
    "babel-jest": "^21.0.2",
    "babel-loader": "^7.1.1",
    "babel-plugin-dynamic-import-node": "^1.2.0",
    "babel-plugin-syntax-jsx": "^6.18.0",
    "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
    "babel-plugin-transform-runtime": "^6.22.0",
    "babel-plugin-transform-vue-jsx": "^3.7.0",
    "babel-preset-env": "^1.7.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-stage-2": "^6.22.0",
    "babel-register": "^6.22.0",
    "bootstrap": "^4.0.0",
    "babel-plugin-jsx-v-model": "^2.0.3",
    "babel-polyfill": "^6.26.0",
  },

然后在.babelrc文件中添加

未命名1556507158.png

{
  "presets": ["es2015"],
  "plugins": ["jsx-v-model", "transform-vue-jsx"]
}

然后在webpack.base.conf.js中添加

entry: {
        app: ['./node_modules/babel-polyfill/dist/polyfill.js','./src/main.js']
    },

然后去npm install就可以了

仅为自己做笔记使用。

你可能感兴趣的:(【iView与Vue,在IE下ES6语法不兼容】)