build-plugin-minify-classname
Minify your css modules classnames to get a smaller bundle size
Usage
{
"plugins": [
// ...
"build-plugin-minify-classname"
]
}
How
If we have a css modules file named src/components/button/index.module.scss
Suppose there are many selectors in it
.foo {}
.bar {}
// ...
The result in miniapp projects
.a-a_mc {}
.b-a_mc {}
// ...
The result in other projects
.a54755bb1 {}
.b54755bb1 {}
// ...
Why not [hash:base64:7]
As 54755bb1
here is repeated many times, it's better for gzip
-like algorithm to generate a smaller size bundle