Skip to content

Commit eee3e5a

Browse files
arturovtAndrewKushnir
authored andcommitted
refactor(core): mark VERSION as @__PURE__ for better tree-shaking (angular#63400)
Annotate the `new Version(...)` call with `/* @__PURE__ */` to signal to optimizers that the constructor is side-effect free. Without this hint, bundlers such as Terser or ESBuild may conservatively retain the `VERSION` instantiation even when unused. With the annotation, the constant can be tree-shaken away in production builds if not referenced, reducing bundle size. PR Close angular#63400
1 parent 538de86 commit eee3e5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ export class Version {
2727
/**
2828
* @publicApi
2929
*/
30-
export const VERSION = new Version('0.0.0-PLACEHOLDER');
30+
export const VERSION = /* @__PURE__ */ new Version('0.0.0-PLACEHOLDER');

0 commit comments

Comments
 (0)