fix(compiler): fix a few non-tree-shakeable code patterns (#24677)
This change makes @angular/compiler more tree-shakeable by changing an enum to a const enum and by getting rid of a top-level map that the tree-shaker was seeing as a reference which caused r3_identifiers to be retained. This drops a few hundred bytes of JS from tree-shaken ngtsc compiled apps. PR Close #24677
This commit is contained in:

committed by
Miško Hevery

parent
69510acb20
commit
50d4a4fe5c
@ -356,9 +356,6 @@
|
||||
{
|
||||
"name": "CORE"
|
||||
},
|
||||
{
|
||||
"name": "CORE$1"
|
||||
},
|
||||
{
|
||||
"name": "CR"
|
||||
},
|
||||
@ -803,9 +800,6 @@
|
||||
{
|
||||
"name": "Identifiers"
|
||||
},
|
||||
{
|
||||
"name": "Identifiers$1"
|
||||
},
|
||||
{
|
||||
"name": "IfStmt"
|
||||
},
|
||||
@ -1208,9 +1202,6 @@
|
||||
{
|
||||
"name": "PreparsedElementType"
|
||||
},
|
||||
{
|
||||
"name": "PropertyBindingType"
|
||||
},
|
||||
{
|
||||
"name": "PropertyRead"
|
||||
},
|
||||
|
Reference in New Issue
Block a user