Skip to content
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

refactor: Use new angular/build and modern compiler options #1860

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

muuvmuuv
Copy link

@muuvmuuv muuvmuuv commented Oct 29, 2024

Hey, since NG19 is close to the doors and custom-esbuild still does not use the new @angular/build (and therefore no Vite directly) I started working on migrating these.

Just look at the code not the tools I added or removed, I couldn't get yarn running (it didn't added @angular/build in node_modules and other errors) or the tests without the modifications. I have also added my changes from #1730. The full codes runs and tests are successful. Only indexHtmlTransformer is not exported from Angular itself for some reason.

The final build-dist was also tested against an enterprise application I work on, build and dev-server run better than before on ng19. Ng18 was not tested because I think it would be a good start to deprecate or remove some things now.

I don't know why it is the case but tsNodeRegister and patchBuilderContext were no longer required in my case.

@muuvmuuv
Copy link
Author

Just forked your project and modified it a bit to my needs just that you are aware of: https://github.com/muuvmuuv/angular-extended-builders. It will mainly focus on my end to test beta releases on Angular.

@just-jeb
Copy link
Owner

just-jeb commented Nov 5, 2024

Amazing, thanks for the effort 🙏🏿. It's a great timing for this change, so that we can release it as part of the major version.
Also thanks for the heads up about your fork. Of course if you implement in your repo anything that you think can be good for everyone you're welcome to back port it here.

@muuvmuuv
Copy link
Author

muuvmuuv commented Nov 5, 2024

Yeah ofc! Once you implement parts of it I will also back port stuff that I add on my end.

Index transformer is now working as before so compatibility is given to previous versions: https://github.com/muuvmuuv/angular-extended-builders/blob/main/projects/angular-extended-builder/src/application/index.ts#L38

@muuvmuuv
Copy link
Author

Just got something nice working here feel free to copy it: https://github.com/muuvmuuv/angular-extended-builders/blob/main/projects/angular-extended-builder/schemes.mjs

It generetes correct angular.json Schema (and imo works better than Angular's version)

Copy link
Collaborator

@arturovt arturovt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you go through all JSON files, it seems indentation is broken in dependencies.

@muuvmuuv
Copy link
Author

muuvmuuv commented Dec 1, 2024

Oh yeah ofc. I think I had Biome format on safe on and globally tabs activated. Will run the repo formatter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants