英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论