localIdentName Hash Clashes

Viewed 435

In our application, using CSS Modules, some of our styles are pretty hefty in the length of the name. It seems prudent, for our prod builds, to have these shorter. Two questions come out of this:

Does this even matter in terms of the DOM? Will shorter class names make it easier for the browser to render?

If it does matter, I'd prefer for the class just to be a short hash:

localIdentName: '[hash:base64:5]',

However, with five characters, that isn't a very large address space. Is there any handling of hash collisions in css-loader?

1 Answers

I tested this (I could have done this before posting the question) and no, there is no support for hash collisions. I set the localIdentName to:

 localIdentName: '[hash:base64:1]',

And a load of styles collide.

Related