登錄出現(xiàn)的錯誤提示:Module build failed: ReferenceError: Unknown plugin "transform-remove-strict-mode" specified in "C:\\Users\\liuke\\Desktop\\vue-demo-master\\.babelrc"
這個可能是去除嚴(yán)格模式的時候出現(xiàn)的問題
第一,在處理過程中去掉 "use strict",這里不用我們自己去寫了,借助這個插件 transform-remove-strict-mode
安裝這個插件:npm install babel-plugin-transform-remove-strict-mode
如果沒有修改babelrc文件需要把plugins里面的內(nèi)容改為:"plugins": [
? ? ? ? "transform-remove-strict-mode"
? ? ]
弄好之后運行 npm run dev就成功了
如果出現(xiàn)如下錯誤:
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 就可以了