Skip to content

CacheProvider not used in production #2903

Answered by srmagura
sarink asked this question in Q&A
Discussion options

You must be logged in to vote

In production, @emotion/sheet uses "speedy mode" which puts up to 65,000 style rules in a single style tag. They are inserted directly via the CSSOM rather than adding the CSS text to the inside of the <style> tag.

Speedy mode isn't as convenient for debugging style issues which is why it's not enabled by default in development.

If you want to disable speedy mode all together, you can do createCache({ key: 'sarink', speedy: false }). This will decrease performance of course so I would not recommend it.

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
1 reply
@ManoMangaldas
Comment options

Answer selected by sarink
Comment options

You must be logged in to vote
5 replies
@srmagura
Comment options

@sarink
Comment options

@Andarist
Comment options

@sarink
Comment options

@fpmanuel
Comment options

Comment options

You must be logged in to vote
5 replies
@Andarist
Comment options

@erikjalevik
Comment options

@erikjalevik
Comment options

@Andarist
Comment options

@ManoMangaldas
Comment options

Comment options

You must be logged in to vote
3 replies
@Andarist
Comment options

@sashless
Comment options

@sashless
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
7 participants
Converted from issue

This discussion was converted from issue #2902 on September 26, 2022 21:52.