Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

feat(angular-rspack): Add "zoneless" option to enable Angular's provideZonelessChangeDetection() usage#115

Merged
Coly010 merged 9 commits into
nrwl:mainfrom
Chlebamaticon:add-zoneless-support
Aug 5, 2025
Merged

feat(angular-rspack): Add "zoneless" option to enable Angular's provideZonelessChangeDetection() usage#115
Coly010 merged 9 commits into
nrwl:mainfrom
Chlebamaticon:add-zoneless-support

Conversation

@Chlebamaticon

@Chlebamaticon Chlebamaticon commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

Added "zoneless" property to AngularRspackPluginOptions, so PrerenderPlugin is capable of skipping "zone.js" initialisation.

I tried using rspack to build my Angular SSR application without "zone.js" and PrerenderPlugin did complain about missing dependency.

Suggestion

"zoneless" is about to be new default in Angular v20, so all e2e tests by default could become zoneless and for sake of backward compatibility tests that incl. zone.js could be prefixed instead.

vendorChunk: options.vendorChunk ?? false,
verbose: options.verbose ?? false,
watch: options.watch ?? false,
zoneless: options.zoneless ?? false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: I'm questioning a bit the requirement of a dedicated config option for zoneless support, as

  • running zoneless actually could be inferred by the absence of 'zone.js' in the polyfillsconfig option
  • additionally, based on your changes it seems to only affect SSR respectively pre-rendering. So if a dedicated config option would really be a requirement, maybe it fits better to add it to ssr or prerender ?

@Chlebamaticon Chlebamaticon Jun 17, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

running zoneless actually could be inferred by the absence of 'zone.js' in the polyfillsconfig option

That'd be better I think; wasn't sure If such implicit behaviour might be breaking, or not. I guess it will do a lot more good, then bad.

Will make this change, thanks for review.

@Chlebamaticon Chlebamaticon requested a review from vz-tl June 17, 2025 12:33
@nx-cloud

nx-cloud Bot commented Jun 27, 2025

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit e2bc3dd

Command Status Duration Result
nx-cloud record -- pnpm check-commit ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-05 09:15:36 UTC

@Coly010

Coly010 commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

Hey @Chlebamaticon ! Thanks for the PR, this is great 🎉

Can you rebase this on top of main and run pnpm i as there seem to be lockfile issues

@Chlebamaticon Chlebamaticon force-pushed the add-zoneless-support branch from 43881d7 to 9a65547 Compare June 27, 2025 09:20
@Chlebamaticon

Chlebamaticon commented Jun 27, 2025

Copy link
Copy Markdown
Contributor Author

Rebased and lockfile resolved! 🙌

@Chlebamaticon Chlebamaticon requested a review from Coly010 July 9, 2025 09:53
@Coly010 Coly010 merged commit 94e87de into nrwl:main Aug 5, 2025
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants