mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): improve tree-shaking
Refactors getNodeInjectable to avoid pulling in stringifyForError production builds, reducing unnecessary symbols in production bundles
This commit is contained in:
@@ -745,8 +745,9 @@ export function getNodeInjectable(
|
||||
const factory: NodeInjectorFactory = value;
|
||||
ngDevMode && injectionPath.push(factory.name ?? 'unknown');
|
||||
if (factory.resolving) {
|
||||
const token = stringifyForError(tData[index]);
|
||||
let token = '';
|
||||
if (ngDevMode) {
|
||||
token = stringifyForError(tData[index]);
|
||||
throw cyclicDependencyErrorWithDetails(token, injectionPath);
|
||||
} else {
|
||||
throw cyclicDependencyError(token);
|
||||
|
||||
@@ -764,7 +764,6 @@
|
||||
"removeViewFromDOM",
|
||||
"renderChildComponents",
|
||||
"renderComponent",
|
||||
"renderStringify",
|
||||
"renderView",
|
||||
"replacePostStylesAsPre",
|
||||
"reportUnhandledError",
|
||||
@@ -828,7 +827,6 @@
|
||||
"stringify",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"style",
|
||||
"syncViewWithBlueprint",
|
||||
"throwInvalidWriteToSignalErrorFn",
|
||||
|
||||
@@ -666,7 +666,6 @@
|
||||
"stringify",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"syncViewWithBlueprint",
|
||||
"textBindingInternal",
|
||||
"throwInvalidWriteToSignalError",
|
||||
|
||||
@@ -665,7 +665,6 @@
|
||||
"renderDeferBlockState",
|
||||
"renderDeferStateAfterResourceLoading",
|
||||
"renderPlaceholder",
|
||||
"renderStringify",
|
||||
"renderView",
|
||||
"reportUnhandledError",
|
||||
"requiresRefreshOrTraversal",
|
||||
@@ -723,7 +722,6 @@
|
||||
"stringify",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"syncViewWithBlueprint",
|
||||
"templateCreate",
|
||||
"throwInvalidWriteToSignalErrorFn",
|
||||
|
||||
@@ -884,7 +884,6 @@
|
||||
"removeViewFromDOM",
|
||||
"renderChildComponents",
|
||||
"renderComponent",
|
||||
"renderStringify",
|
||||
"renderView",
|
||||
"reportUnhandledError",
|
||||
"requiredTrueValidator",
|
||||
@@ -979,7 +978,6 @@
|
||||
"stringify",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"stylingFirstUpdatePass",
|
||||
"subscribeOn",
|
||||
"syncPendingControls",
|
||||
|
||||
@@ -978,7 +978,6 @@
|
||||
"stringify",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"stylingFirstUpdatePass",
|
||||
"subscribeOn",
|
||||
"syncPendingControls",
|
||||
|
||||
@@ -706,7 +706,6 @@
|
||||
"removeViewFromDOM",
|
||||
"renderChildComponents",
|
||||
"renderComponent",
|
||||
"renderStringify",
|
||||
"renderView",
|
||||
"reportUnhandledError",
|
||||
"requiresRefreshOrTraversal",
|
||||
@@ -772,7 +771,6 @@
|
||||
"stringify",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"subscribeOn",
|
||||
"syncViewWithBlueprint",
|
||||
"throwInvalidWriteToSignalErrorFn",
|
||||
|
||||
@@ -1113,7 +1113,6 @@
|
||||
"stringify2",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"stripTrailingSlash",
|
||||
"subscribeOn",
|
||||
"subsetMatchOptions",
|
||||
|
||||
@@ -558,7 +558,6 @@
|
||||
"removeViewFromDOM",
|
||||
"renderChildComponents",
|
||||
"renderComponent",
|
||||
"renderStringify",
|
||||
"renderView",
|
||||
"reportUnhandledError",
|
||||
"requiresRefreshOrTraversal",
|
||||
@@ -610,7 +609,6 @@
|
||||
"stringify",
|
||||
"stringifyCSSSelector",
|
||||
"stringifyCSSSelectorList",
|
||||
"stringifyForError",
|
||||
"syncViewWithBlueprint",
|
||||
"throwInvalidWriteToSignalErrorFn",
|
||||
"throwProviderNotFoundError",
|
||||
|
||||
Reference in New Issue
Block a user