Conversation
this helps prevent conflicts when multiple versions of the library are in use simultaneously
5392274 to
f3bef57
Compare
| __SERVER__: JSON.stringify(false), | ||
| }) | ||
| }), | ||
| minifierPlugin |
There was a problem hiding this comment.
If we're minifying all output bundles (which I'm a fan of) I'd love to make sure to also try out Closure Compiler, which is pretty amazing
styled-components/packages/styled-components/rollup.config.js
Lines 111 to 137 in d220a20
This is what we're currently doing for urql at least, where we try to squeeze out a lot of bytes here and there https://github.com/FormidableLabs/urql/blob/e031f9b887960a8113890777e8a100973068a36c/scripts/rollup/plugins.js#L98-L137
There was a problem hiding this comment.
Shaved off 0.4kB!
There was a problem hiding this comment.
So although it reduced the bundle size, something that terser is doing actually regressed perf here. Going to hold off on it for now.
massive perf gain for this use case (5ms chopped off per cycle on average)
not sure how to fix this at the moment since SM runs render twice without providing the backing hook data to the second pass, effectively we have no idea if it's a second instance or not
b8527e1 to
b1f2632
Compare
pay attention to SC_VERSION when hashing to provide more effective component isolation when multiple SC instances are running on the page
Bundle size improvements
Fix
keyframesnot receiving nested stylis context, and therefore missing plugins if applicableFixes #3008 #3076 #2993 #3163
Probably fixes #2074