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:
SkyZeroZx 2026-01-24 16:18:56 -05:00 committed by Andrew Scott
parent 105274fe32
commit 8feb541060
9 changed files with 2 additions and 14 deletions

View file

@ -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);

View file

@ -764,7 +764,6 @@
"removeViewFromDOM",
"renderChildComponents",
"renderComponent",
"renderStringify",
"renderView",
"replacePostStylesAsPre",
"reportUnhandledError",
@ -828,7 +827,6 @@
"stringify",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"style",
"syncViewWithBlueprint",
"throwInvalidWriteToSignalErrorFn",

View file

@ -666,7 +666,6 @@
"stringify",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"syncViewWithBlueprint",
"textBindingInternal",
"throwInvalidWriteToSignalError",

View file

@ -665,7 +665,6 @@
"renderDeferBlockState",
"renderDeferStateAfterResourceLoading",
"renderPlaceholder",
"renderStringify",
"renderView",
"reportUnhandledError",
"requiresRefreshOrTraversal",
@ -723,7 +722,6 @@
"stringify",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"syncViewWithBlueprint",
"templateCreate",
"throwInvalidWriteToSignalErrorFn",

View file

@ -884,7 +884,6 @@
"removeViewFromDOM",
"renderChildComponents",
"renderComponent",
"renderStringify",
"renderView",
"reportUnhandledError",
"requiredTrueValidator",
@ -979,7 +978,6 @@
"stringify",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"stylingFirstUpdatePass",
"subscribeOn",
"syncPendingControls",

View file

@ -978,7 +978,6 @@
"stringify",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"stylingFirstUpdatePass",
"subscribeOn",
"syncPendingControls",

View file

@ -706,7 +706,6 @@
"removeViewFromDOM",
"renderChildComponents",
"renderComponent",
"renderStringify",
"renderView",
"reportUnhandledError",
"requiresRefreshOrTraversal",
@ -772,7 +771,6 @@
"stringify",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"subscribeOn",
"syncViewWithBlueprint",
"throwInvalidWriteToSignalErrorFn",

View file

@ -1113,7 +1113,6 @@
"stringify2",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"stripTrailingSlash",
"subscribeOn",
"subsetMatchOptions",

View file

@ -558,7 +558,6 @@
"removeViewFromDOM",
"renderChildComponents",
"renderComponent",
"renderStringify",
"renderView",
"reportUnhandledError",
"requiresRefreshOrTraversal",
@ -610,7 +609,6 @@
"stringify",
"stringifyCSSSelector",
"stringifyCSSSelectorList",
"stringifyForError",
"syncViewWithBlueprint",
"throwInvalidWriteToSignalErrorFn",
"throwProviderNotFoundError",