想在react项目中暴露webpack配置文件,命令行即:yarn eject 或 npm run eject,结果报了一个以前没有出现过的错误:Remove untracked files, stash or commit any changes, and try again.如下图:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
查了下资料,发现是git地址的问题,输入下面命令行就行了:
1 git add . 2 git commit -am "Save before ejecting" 3 npm run eject
命令结束后出现Ejected successfully!即暴露webpack配置文件成功。