mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): tree-shake away a DI error message string in prod bundles (#45994)
This commit adds the `ngDevMode` check to tree-shake away an error message string (which also retains a reference to an extra function). PR Close #45994
This commit is contained in:
committed by
Jessica Janiuk
parent
db1b6fe657
commit
cd04588643
@@ -19,7 +19,7 @@
|
||||
"cli-hello-world-ivy-compat": {
|
||||
"uncompressed": {
|
||||
"runtime": 1102,
|
||||
"main": 133968,
|
||||
"main": 133416,
|
||||
"polyfills": 33957
|
||||
}
|
||||
},
|
||||
|
||||
@@ -48,5 +48,5 @@ export function throwProviderNotFoundError(token: any, injectorName?: string): n
|
||||
const injectorDetails = injectorName ? ` in ${injectorName}` : '';
|
||||
throw new RuntimeError(
|
||||
RuntimeErrorCode.PROVIDER_NOT_FOUND,
|
||||
`No provider for ${stringifyForError(token)} found${injectorDetails}`);
|
||||
ngDevMode && `No provider for ${stringifyForError(token)} found${injectorDetails}`);
|
||||
}
|
||||
|
||||
@@ -1328,9 +1328,6 @@
|
||||
{
|
||||
"name": "stringifyCSSSelector"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "style"
|
||||
},
|
||||
|
||||
@@ -413,9 +413,6 @@
|
||||
{
|
||||
"name": "stringify"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "throwProviderNotFoundError"
|
||||
},
|
||||
|
||||
@@ -1487,9 +1487,6 @@
|
||||
{
|
||||
"name": "stringifyCSSSelector"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "subscribeTo"
|
||||
},
|
||||
|
||||
@@ -1466,9 +1466,6 @@
|
||||
{
|
||||
"name": "stringifyCSSSelector"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "subscribeTo"
|
||||
},
|
||||
|
||||
@@ -314,9 +314,6 @@
|
||||
{
|
||||
"name": "stringify"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "throwProviderNotFoundError"
|
||||
},
|
||||
|
||||
@@ -116,9 +116,6 @@
|
||||
{
|
||||
"name": "injectInjectorOnly"
|
||||
},
|
||||
{
|
||||
"name": "injectRootLimpMode"
|
||||
},
|
||||
{
|
||||
"name": "injectableDefOrInjectorDefFactory"
|
||||
},
|
||||
|
||||
@@ -1862,9 +1862,6 @@
|
||||
{
|
||||
"name": "stringifyCSSSelector"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "stripTrailingSlash"
|
||||
},
|
||||
|
||||
@@ -836,9 +836,6 @@
|
||||
{
|
||||
"name": "stringifyCSSSelector"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "subscribeTo"
|
||||
},
|
||||
|
||||
@@ -773,9 +773,6 @@
|
||||
{
|
||||
"name": "stringifyCSSSelector"
|
||||
},
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "throwProviderNotFoundError"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user