-
Notifications
You must be signed in to change notification settings - Fork 11.9k
feat(@schematics/angular): Applications are zoneless by default #30718
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
Conversation
b381f6b
to
2381fc4
Compare
2381fc4
to
79d6d09
Compare
ea4fb06
to
1a2767a
Compare
4b1459a
to
1e10964
Compare
packages/angular_devkit/build_angular/src/builders/jest/init-test-bed.mjs
Show resolved
Hide resolved
1e10964
to
dce2fad
Compare
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).
dce2fad
to
d7d946a
Compare
…schema The default should only be applied in the application schematic schema as otherwise the prompt will never be displayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
}, | ||
"zoneless": { | ||
"description": "Generate an application that does not use `zone.js`.", | ||
"x-prompt": "Do you want to create a 'zoneless' application without zone.js?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we keeping the prompt?
await setNPMConfigRegistry(true); | ||
|
||
await ng('new', 'test-project', '--skip-install'); | ||
await ng('new', 'test-project', '--skip-install', '--no-zoneless'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a followup we should likely try to have most of the our tests test the default behavior (IE: zoneless).
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 theconfiguration (either on window or in the polyfills).