From 8742f9cc74510d4ddc62b95e2ceda45a4a538076 Mon Sep 17 00:00:00 2001 From: arturovt Date: Mon, 24 Feb 2025 19:24:30 +0200 Subject: [PATCH] refactor(core): tree-shake `REF_EXTRACTOR_REGEXP` (#60081) The `REF_EXTRACTOR_REGEXP` is a `new` expression that has side effects and is not dropped in production, even if it is unused. PR Close #60081 --- packages/core/src/hydration/compression.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/hydration/compression.ts b/packages/core/src/hydration/compression.ts index ab073878889..247231d0ea7 100644 --- a/packages/core/src/hydration/compression.ts +++ b/packages/core/src/hydration/compression.ts @@ -15,7 +15,7 @@ import {NodeNavigationStep, REFERENCE_NODE_BODY, REFERENCE_NODE_HOST} from './in * - the `b` char which indicates that the lookup should start from the `document.body` * - the `h` char to start lookup from the component host node (`lView[HOST]`) */ -const REF_EXTRACTOR_REGEXP = new RegExp( +const REF_EXTRACTOR_REGEXP = /* @__PURE__ */ new RegExp( `^(\\d+)*(${REFERENCE_NODE_BODY}|${REFERENCE_NODE_HOST})*(.*)`, );