Closed flackr closed 5 months ago
Nice 😀🙏🏻
Here's a size comparison of the different options:
keep_classnames | size | gzipped |
---|---|---|
false |
51490 bytes | 14.59 kB |
/(Scroll\|View)Timeline/ |
51705 bytes | 14.61 kB |
true |
51949 bytes | 14.64 kB |
Given the relatively minimal change to code size, it's probably fine to keep all classnames in the interest of correctness. Of course it might be nice to be explicit about which classnames we expect to be preserved. I was thinking we may want to add classes like ScrollTimelineInternal in the WeakMap instead of the bare object we currently add so that we could have an easy to use location to attach internal functionality without needing a bunch of bare functions. In this case, these internal classes could be minified without issue.
@johannesodland @bramus This is an alternative to #200 now that we can use terser and configure exactly which classnames it shouldn't mangle. This addresses item 2 from #219.