简体   繁体   English

Angular Cli:弹出后我不能使用ng命令参数,是否可以使用ng params替代?

[英]Angular Cli: after eject i can't use ng commands parameters, any alternatives for ng params?

Angular Cli: after eject i can't use ng commands like ng build --prod --app 1 --output-hashing=false Angular Cli:弹出后我无法使用ng build --prod --app 1 --output-hashing=falseng build --prod --app 1 --output-hashing=false命令

  1. is there is a webpack alternative options for: 是否有一个webpack替代选项:
    • choosing app to build inside .angular-cli.json 选择要在.angular-cli.json中构建的应用
    • output hashing ture.false 输出哈希值ture.false
  2. i am thinking of using gulp alongside with angular cli without ejecting the webpack and avoid ejecting webpack out of angular , what do you think ? 我正在考虑在不退出webpack的情况下将gulp与角度cli一起使用,并避免将webpack退出角度,您如何看待?

have you checked these issues, 你检查过这些问题了吗

a workaround is being suggested ng eject --prod; 建议使用ng---prod解决方法; possibly you can try that. 可能您可以尝试一下。

for anyone having same problem, i found in this cli documentation https://github.com/angular/angular-cli/wiki/eject 对于任何有相同问题的人,我在此cli文档中找到https://github.com/angular/angular-cli/wiki/eject

you can pass parameters to ng eject that you pass for ng build with full documentation in this page 您可以在此页面中将完整的文档传递给传递给ng build参数ng eject

ng eject ejects your app and output the proper webpack configuration and scripts. ng eject弹出您的应用程序,并输出正确的WebPack配置和脚本。

This command uses the same flags as ng build , generating webpack configuration to match those flags. 此命令使用与ng build相同的标志,生成webpack配置以匹配这些标志。

You can use --force to overwrite existing configurations. 您可以使用--force覆盖现有配置。 You can eject multiple times, to have a dev and prod config for instance, by renaming the ejected configuration and using the --force flag. 通过重命名弹出的配置并使用--force标志,您可以多次弹出,例如具有dev和prod配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM