nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.55k stars 2.35k forks source link

Add Vite support to Angular #14581

Closed alfaproject closed 1 year ago

alfaproject commented 1 year ago

Description

Vite has been in the spotlight for a while and I'm wondering if it's possible to use it for Angular so that a monorepo can fully switch from webpack if they choose to and get all the benefits of Vite.

Motivation

We are slowly moving away from webpack in our monorepo but since Angular requires it, it won't ever be really possible, I suppose. We are trying to move into the Vite ecosystem with Vitest as well, so it would be nice to have every project using the same tooling.

Suggested Implementation

I honestly don't know, and I'm not sure if it needs to be the Angular team that would need to add support for it, but I suspect they wouldn't so I'm wondering what are NX plans on it.

However, I've seen this recent article which leads me to believe that now with standalone components it might be easier to support: https://medium.com/@hiepxanh/angular-vite-example-is-crazy-fast-3ee4d730020c

AgentEnder commented 1 year ago

Hey @alfaproject! Thanks for the request. Adding Vite support to angular is a bit outside the scope of what we would provide, but if someone else successfully manages it its something we may then integrate. Similar to the react story.

That said, there are some cool projects on the horizon that have started to try to get this working, as noted in the medium link you included. One in particular is https://github.com/analogjs/analog. You may wish to give it a shot, as it should work in an Nx monorepo already.

That said, this is something that isn't a solved problem, and isn't something we are ready to add to Nx's first party plugins just yet.

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.