Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2fbb684

Browse files
arturovtmhevery
authored andcommitted
perf(core): usengDevMode to tree-shakecheckNoChanges (#39964)
This commit adds `ngDevMode` guard to run `checkNoChanges` onlyin dev mode (similar to how things work in other parts of Ivy runtime code).The `ngDevMode` flag helps to tree-shake this code from production builds(in dev mode everything will work as it works right now) to decrease production bundle size.PRClose#39964
1 parentadeeb84 commit2fbb684

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

‎goldens/size-tracking/aio-payloads.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"master": {
1313
"uncompressed": {
1414
"runtime-es2015":3033,
15-
"main-es2015":447343,
15+
"main-es2015":446749,
1616
"polyfills-es2015":52493
1717
}
1818
}

‎goldens/size-tracking/integration-payloads.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"master": {
44
"uncompressed": {
55
"runtime-es2015":1485,
6-
"main-es2015":140899,
6+
"main-es2015":134899,
77
"polyfills-es2015":36571
88
}
99
}

‎packages/core/src/application_ref.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ export class ApplicationRef {
573573
private_bootstrapListeners:((compRef:ComponentRef<any>)=>void)[]=[];
574574
private_views:InternalViewRef[]=[];
575575
private_runningTick:boolean=false;
576-
private_enforceNoNewChanges:boolean=false;
577576
private_stable=true;
578577
private_onMicrotaskEmptySubscription:Subscription;
579578

@@ -602,8 +601,6 @@ export class ApplicationRef {
602601
private_exceptionHandler:ErrorHandler,
603602
private_componentFactoryResolver:ComponentFactoryResolver,
604603
private_initStatus:ApplicationInitStatus){
605-
this._enforceNoNewChanges=isDevMode();
606-
607604
this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({
608605
next:()=>{
609606
this._zone.run(()=>{
@@ -740,7 +737,9 @@ export class ApplicationRef {
740737
for(letviewofthis._views){
741738
view.detectChanges();
742739
}
743-
if(this._enforceNoNewChanges){
740+
// Note that we have still left the `isDevMode()` condition in order to avoid
741+
// creating a breaking change for projects that still use the View Engine.
742+
if((typeofngDevMode==='undefined'||ngDevMode)&&isDevMode()){
744743
for(letviewofthis._views){
745744
view.checkNoChanges();
746745
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp