Open jridgewell opened 3 years ago
Can this be closed now that all enums have been converted to static and the lint rule has been made?
We still need to convert extensions, and make the lint opt-out instead of opt-in.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Description
Context: https://github.com/ampproject/amphtml/issues/36453
Currently, enum objects are left in the output binaries because we're using them as dynamic object values (eg, loop keys or performing dynamic
Enum[key]
lookups). In an ideal codebase, enums would be used viaEnum.keyName
lookups only, which means that the value associated with that key can be inlined directly in to output code.We suspect this is one of the last issue with that causes Terser's outputs to be larger than Closure compiler.