-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for Angular 17 #1127
base: master
Are you sure you want to change the base?
Conversation
Hi, can we somehow help so that this PR gets merged? The declared npm version in package.json seems to not match the one used in circle ci:
|
@michaeljota Looks like the problem is, that But node 20.3 is used in the docker image: https://github.com/nestjs/ng-universal/blob/master/.circleci/config.yml#L20 Should be fixed by updating the docker image to |
So, basically this PR has to be merged first: #1062 Is there someone else besides @kamilmysliwiec who can do this? |
The only reason why this PR isn't merged yet is that I'm not sure whether using this package still makes sense given the state of |
Valid point. So you would suggest just using an express server directly, as proposed by the Angular team? |
I copied this PR into my fork to try it out. Had to change the templatePath to make it work: qupaya@d4c333b If someone else wants to give it a try, I published it as npm package: https://www.npmjs.com/package/@qupaya/nestjs-ng-universal You can install it as drop-in replacement in package.json: |
It still makes sense for those who prefer run Nest on top of Angular, regardless of if the And also, if this project is abandoned, perhaps it should be officially communicated and repo archived? More clarity would help current users who plan to keep Angular upgraded and also warn new potential adopters |
Hi! I'm sorry, I forgot about this a little bit. I just pushed my latest changes, but this is not working, as it is right now. I'll post additional information about this. The library can be built, tested, and installed. But, when the application consuming this tries to be built, it fails — something about modules not being what is expected. Also, in my latest tests, this wasn't updating the If you want to use this as your base to migrate this to Angular, I'll thank you! If you want to help me figure out how the right approach would be to make this work, I'll thank you as well! If you want to use another approach to change this, consider these changes when you are working with Angular 17. |
I once switched from SSR with express to SSR with nest.js because it was less boilerplate and I could add some controllers to the SSR application. And given the amount of code that @angular/ssr generates I hope that this package could be further maintained either by nest or by community and that maybe long standing embarrassing bugs like #573 could be fixed. |
Anyone working on upgrading to angular 18? UPDATE: got it working without needing the module: https://github.com/cskiwi/bun-test still WIP, but the essential stuff is working |
This! Most of my projects are NestJS+Angular monorepos. It would be a shame to see support officially dropped. While it's good that Angular migrated its Universal code under We would very much like to see Angular 17 and 18 support! |
For me and my company, it makes more sense to keep the NestJS module so we can use a monorepo and single container rather than three repos (we use prisma with autogenerated model definitions, which if not monorepoed would require us to create a third repo just for models). |
For anyone wondering i have successfully setup a Angular SSR with Nestjs. will further improve the repo while developing my separate app. I still have to add some documentation for the build script because now it pre-renders the routes, however if you have a login, it's actually slows down the time to finished page because the login has to happen on client side. so then normal SSR is just fine and you can login your user on the server. I also dabbled with the https://www.rx-angular.io/docs/isr. I got it fully up and running and even lowered the time to first byte. but as my app has a login, this also has that "problem" as pre-rendering does as does the same but more on a request based. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Angular 17 dropped support for
@nguniversal
and is now using the@angular/ssr
instead. Builders of@nguniversal
are still available, but are not added by default.This PR updates dependencies to Angular 17 and removes features that are no longer used by default in the
@angular/ssr
builder.Also,
@nguniversal
was configured on an engine level, but@angular/ssr
provides a new way to render and hydration. Because of this, the setup universal function was updated and a render universal function was created.What is the current behavior?
Angular 17 is not supported.
Issue Number: #1125
What is the new behavior?
Angular 17 is supported.
Does this PR introduce a breaking change?
The API exposed doesn't change, but this is not compatible with earlier versions of Angular.
Other information