custom-react-scripts
custom-react-scripts copied to clipboard
css module hash size?
Hello there. Is there a way to specify hash size of css modules? Classnames seem unnecessary long right now.
Want this one as well
👍 I agree too
@5angel @bafxyz @billcreative I created repository based on this, but with fresh source from origin create-react-app and short css classnames. Supports now only CSS Modules, SASS & SASS Modules. Create issue, if you need other features https://github.com/artemirq/advanced-react-scripts
You should be able to select select the length of the hash changing the REACT_APP_CSS_MODULE_CLASSNAME_TEMPLATE in the .env file as such [sha512:hash:base32:<length>]
for example [sha512:hash:base32:5]
will encode using sha512 encoding in base 32 with 5 characters. . . also ensure that this line isn't commented out and that you reset your server when making changes.