Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 如何在弹出网页包配置后使用ngcli?_Angular_Webpack_Angular Cli - Fatal编程技术网

Angular 如何在弹出网页包配置后使用ngcli?

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 ==

我需要在Angular cli项目中定制webpack包构建。为了进行配置,我弹出webpack配置文件

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这样的命令仍然有效。

这可能会有帮助:可能会重复