gpt4 book ai didi

angular - 我应该将 @angular/compiler 保留在 dependencies 还是 devDependencies 中?

转载 作者:太空狗 更新时间:2023-10-29 19:35:52 24 4
gpt4 key购买 nike

我应该将@angular/compiler 保留在 dependencies 中,还是将 devDependencies 保留在 package.json 中?如果我的生产代码已经编译,为什么我需要依赖它?

最佳答案

package.json 分为两组包:

  • 依赖性对于运行应用程序至关重要。
  • DevDependencies 仅是开发应用程序所必需的。

你应该将 @angular/compiler 保留在依赖项中,因为它在其官方文档中提到如下

Angular's template compiler. It understands templates and can convert them to code that makes the application run and render. Typically you don’t interact with the compiler directly; rather, you use it indirectly via platform-browser-dynamic when JIT compiling in the browser. For more information, see the Ahead-of-time Compilation guide.

有关更多详细信息,您可以查看其 official document .

关于angular - 我应该将 @angular/compiler 保留在 dependencies 还是 devDependencies 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54883701/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com