Skip to content

Conversation

@SkyZeroZx
Copy link
Contributor

@SkyZeroZx SkyZeroZx commented Dec 21, 2025

Marks top-level symbols as pure (PATH, ɵCONTROL, NOT_FOUND) to allow proper tree-shaking.

Neither Terser nor esbuild treat Symbol as side-effect free by default, which caused
exported symbols to be retained. This was observed during signals prototyping, where
symbols from computed appeared in bundling tests.

Similar to #51776 and #61312

Terser/nor ESBuild do treat Symbol as side-effect free- so if we end up with a symbol export being loaded, it will result in the symbol being retained.
@pullapprove pullapprove bot added the requires: TGP This PR requires a passing TGP before merging is allowed label Dec 21, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Dec 21, 2025
@ngbot ngbot bot added this to the Backlog milestone Dec 21, 2025
Terser/nor ESBuild do treat Symbol as side-effect free- so if we end up with a symbol export being loaded, it will result in the symbol being retained.
@SkyZeroZx SkyZeroZx force-pushed the refactor/mark-as-pure branch from 9d2f8ad to 849e57d Compare December 21, 2025 16:39
@JoostK
Copy link
Member

JoostK commented Dec 23, 2025

esbuild will tree-shake those since the recent 0.27.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime requires: TGP This PR requires a passing TGP before merging is allowed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants