@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js_第1张图片
百度了很多次 大多数都要让运行命令 npm install babel-plugin-transform-vue-jsx --save-dev
可是对我来说还是不行 所以就有了以下方法

原本的文件名 .babelrc

{
  "presets": [
    ["env", {
      "modules": false,
      "targets": {
        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
      }
    }],
    "stage-2"
  ],
  "plugins": ["transform-vue-jsx", "transform-runtime"]
}

改成 babel.config.js 里面代码也要改加上module.exports 然后运行就好了…

module.exports = {
  "presets": [
    ["env", {
      "modules": false,
      "targets": {
        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
      }
    }],
    "stage-2"
  ],
  "plugins": ["transform-vue-jsx", "transform-runtime"]
  }

babel.config.js和.babelrc的区别点我进入
babel.config.js和.babelrc的区别点我进入

你可能感兴趣的:(vue,webpack,javascript,http)