You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
build-optimizer: enums are not being wrapped any more #229
I believe that this downleveling format comes from tsickle. as far as I can tell typescript doesn't downlevel stuff in this way. but since all of our packages are downleveled with tsickle, we need to support this format as well.
In addition to the build optimizer change, would it make sense for tsickle to perform the IIFE wrapping during its enum downlevel processing? The enum is already being rewritten. Ideally TS could do the same and the build optimizer step could be simplified moving forward. However, would doing this break closure's handling of the enum? Also for safety, the PURE annotation should probably not be automatically added (unless all values are constants) as there are rare situations were an enum member initializer could have side effects.
Tsickle primarily targets closure, and for closure the iife is undesirable.
So if we want to have single package distribution for closure and uglify,
wrapping the code here is the right choice.
Activity
filipesilva commentedon Oct 22, 2017
This seems to be a new format for enums that we don't detect yet (we only detect 2.2 and 2.3 enums). Will have to add support for this format as well.
IgorMinar commentedon Oct 22, 2017
I believe that this downleveling format comes from tsickle. as far as I can tell typescript doesn't downlevel stuff in this way. but since all of our packages are downleveled with tsickle, we need to support this format as well.
clydin commentedon Oct 23, 2017
In addition to the build optimizer change, would it make sense for tsickle to perform the IIFE wrapping during its enum downlevel processing? The enum is already being rewritten. Ideally TS could do the same and the build optimizer step could be simplified moving forward. However, would doing this break closure's handling of the enum? Also for safety, the
PUREannotation should probably not be automatically added (unless all values are constants) as there are rare situations were an enum member initializer could have side effects.fix(@angular-devkit/build-optimizer): wrap tsickle enums
IgorMinar commentedon Oct 23, 2017