如何使用 Vite 创建一个 Angular 应用程序?

huangapple go评论52阅读模式
英文:

How to create an Angular application using Vite?

问题

我想使用Vite创建一个带有基本路由、最少选项和无测试文件的Angular应用,并在端口5000上打开。

到处搜索,没有找到。

英文:

I want to use Vite for creating an Angular app with basic routing, minimal options, and no testing files and open in port 5000

Searched all over and not got.

答案1

得分: 4

Vite不支持Angular,反之亦然。原因在于Angular CLI的功能比React CLI更多,并且还使用自己的编译器称为ngc

英文:

Vite does not support Angular and vice-versa. The reason being, that the Angular CLI does more than the React CLI, for example, and also uses its own compiler called ngc.

答案2

得分: 0

是的,确实在angular项目中没有对vite的默认支持,别忘了这是因为正如@forbiddencodding所提到的,angular需要使用自定义的angular编译器ngc来编译其模板和其他功能。但是在启动angular项目时,你仍然可以尝试并使用vite点击这里阅读整篇文章。

英文:

Yeah it's true that there is no default support for vite in angular project, and not to forget it is because of the fact as @forbiddencodding has mentioned that angular needs the the custom angular compiler ngc to compile its templates and other features. But how ever you can play around while starting up an angular project and can use vite. Click here to read the whole article.

huangapple
  • 本文由 发表于 2023年3月31日 19:13:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/75897883.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定