Angular 如何在弹出网页包配置后使用ngcli?
我需要在Angular cli项目中定制webpack包构建。为了进行配置,我弹出webpack配置文件Angular 如何在弹出网页包配置后使用ngcli?,angular,webpack,angular-cli,Angular,Webpack,Angular Cli,我需要在Angular cli项目中定制webpack包构建。为了进行配置,我弹出webpack配置文件 ng eject 一旦我这样做了,我就不能再运行webpack build和service命令了,因为我得到了以下错误 An ejected project cannot use the build command anymore 如果弹出后无法使用生成命令,那么在弹出后使用webpack的最佳方式是什么。当您运行ng eject命令时,这是在提示符处显示的输出: ng eject ==
ng eject
一旦我这样做了,我就不能再运行webpack build和service命令了,因为我得到了以下错误
An ejected project cannot use the build command anymore
如果弹出后无法使用生成命令,那么在弹出后使用webpack的最佳方式是什么。当您运行
ng eject
命令时,这是在提示符处显示的输出:
ng eject
==========================================================================================
Ejection was successful.
To run your builds, you now need to do the following commands:
- "npm run build" to build.
- "npm run test" to run unit tests.
- "npm start" to serve the app using webpack-dev-server.
- "npm run e2e" to run protractor.
Running the equivalent CLI commands will result in an error.
==========================================================================================
Some packages were added. Please run "npm install".
你需要知道的一切,就在那里
查看package.json
以查看脚本
部分的更新。还有几个命令没有显示在上面的输出中
希望这有帮助
更新:
如果有人不知道,即使在弹出完成后,CLI仍然可以用来生成代码
像ng generate component blah这样的命令仍然有效。这可能会有帮助:可能会重复