想在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配置文件成功。