请问 ,我npm run eject 后,config文件夹下怎么只有一个webpack.config.js文件? 我看教程和其他文章都写的是有2个文件的,一个是webpack.config.dev.js 开发环境下的配置项,另一个是webpack.config.prod.js 生产环境下的配置项. 如果这是由于更新后的正常现象,那么请问怎么添加less配置代码?另外,执行npm run eject 暴露配置文件后, 执行npm run start 就一直报错, 缺少几种loader.按照错误提示安装'@babel/plugin-transform-react-jsx-source' 后,又找不到is-wsl. 安装了is-wsl 又再次提示找不到 @babel/plugin-transform-react-jsx-source. 最后重新 npm install ,在执行 npm run start 还是不能成功编译.提示错误:Starting the development server...Failed to compile../node_modules/react-dev-utils/formatWebpackMessages.jsModule not found: Can't resolve 'F:\react-test\my-app\node_modules\babel-preset-react-app\node_modules\@babel\runtime/helpers/slicedToArray' in 'F:\react-test\my-app\node_modules\react-dev-utils'Compiling...Failed to compile../node_modules/react-dev-utils/formatWebpackMessages.jsModule not found: Can't resolve 'F:\react-test\my-app\node_modules\babel-preset-react-app\node_modules\@babel\runtime/helpers/slicedToArray' in 'F:\react-test\my-app\node_modules\react-dev-utils'Compiling...Failed to compile../node_modules/react-dev-utils/formatWebpackMessages.jsModule not found: Can't resolve 'F:\react-test\my-app\node_modules\babel-preset-react-app\node_modules\@babel\runtime/helpers/slicedToArray' in 'F:\react-test\my-app\node_modules\react-dev-utils'请前帮我看看怎么解决这几个问题?
添加回答
举报
0/150
提交
取消