具体报错:
ERROR in ./src/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
ReferenceError: Unknown plugin "transform-remove-strict-mode" specified in "C:\\Users\\computer\\WebstormProjects\\sanyecao\\.babelrc" at 1, attempted to resolve
relative to "C:\\Users\\computer\\WebstormProjects\\sanyecao"
解决办法:
- 安装 npm install babel-plugin-transform-remove-strict-mode -D
- 在.babelrc文件中添加如下代码:
{ "plugins": ["transform-remove-strict-mode"] }
问题解决。