Skip to content

Removing the hash from generated classNames #273

Closed Answered by mattcompiles
jamestowers asked this question in Q&A
Discussion options

You must be logged in to vote

I have a few of thoughts on this. Firstly I'd note that the classNames don't change on each build, they should be consistent between builds as long as you don't change the file name or re-order the styles. This is designed to ensure long-term caching works as well as possible.

On your use-case of using the classNames on the server, I'm assuming your server isn't running node? Because if it is you'd be better off importing the .css.ts files directly and using them just like you do in React. If you're using a different server setup then I can see why this isn't a simple issue.

If we removed hashes from the generated classes you'd be extremely likely to cause class collisions. Also the debug…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@jamestowers
Comment options

@phil-lgr
Comment options

@phil-lgr
Comment options

@phil-lgr
Comment options

Answer selected by jamestowers
Comment options

You must be logged in to vote
0 replies
Comment options

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

@jamestowers
Comment options

@nmkae
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants