Skip to content

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Jul 15, 2025

This change updates applications to omit the ZoneJS dependency by
default.

This change also includes the addition of provideZoneChangeDetection
in the initTestEnvironment when ZoneJS is detected in the
configuration (either on window or in the polyfills).

@atscott atscott marked this pull request as draft July 15, 2025 22:42
@atscott atscott added target: major This PR is targeted for the next major release and removed area: @schematics/angular detected: feature PR contains a feature commit labels Jul 15, 2025
@atscott atscott force-pushed the zonelessdefaultv21 branch from b381f6b to 2381fc4 Compare July 16, 2025 18:01
@atscott atscott force-pushed the zonelessdefaultv21 branch from 2381fc4 to 79d6d09 Compare July 16, 2025 19:37
@atscott atscott force-pushed the zonelessdefaultv21 branch 4 times, most recently from ea4fb06 to 1a2767a Compare September 9, 2025 23:33
@atscott atscott force-pushed the zonelessdefaultv21 branch 9 times, most recently from 4b1459a to 1e10964 Compare September 18, 2025 19:29
@atscott atscott marked this pull request as ready for review September 18, 2025 21:51
@NgModule({
providers: [typeof window.Zone !== 'undefined' ? provideZoneChangeDetection() : []],
})
class TestModule {}
Copy link
Contributor Author

@atscott atscott Sep 18, 2025

Choose a reason for hiding this comment

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

Do I need to avoid the @NgModule here and use compileNgModuleDefs instead like in the karma/browser_builder?

Same question for karma/application_builder.ts web-test-runner/jasmine_runner.js

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these are fine when using esbuild.

This change updates applications to omit the ZoneJS dependency by
default.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @schematics/angular detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants