关于登录vuecli项目出现的问题:Module build failed

登录出现的错误提示:Module build failed: ReferenceError: Unknown plugin "transform-remove-strict-mode" specified in "C:\\Users\\liuke\\Desktop\\vue-demo-master\\.babelrc"

这个可能是去除严格模式的时候出现的问题

第一,在处理过程中去掉 "use strict",这里不用我们自己去写了,借助这个插件 transform-remove-strict-mode

安装这个插件:npm install babel-plugin-transform-remove-strict-mode

如果没有修改babelrc文件需要把plugins里面的内容改为:"plugins": [

        "transform-remove-strict-mode"

    ]

弄好之后运行 npm run dev就成功了

如果出现如下错误:

ERROR  Failed to compile with 1 errors                                                                                                                                  23:11:49

This dependency was not found:

* vue-resource in ./src/main.js

To install it, you can run: npm install --save vue-resource

就按照错误提示运行:npm install --save vue-resource

接下来再运行:npm run dev 就可以了

你可能感兴趣的:(关于登录vuecli项目出现的问题:Module build failed)