New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce bundle size via one-letter css classname hash strategy #1028
Comments
I would say one way would be to keep a JSON file with all CSS files in your src folder and take the index. For any CSS file found during build that is not in the list emit a warning (or error) and use a hash instead. Even while this is against the guideline of webpack build should not write to intput files, you could offer a flag to automatically add new files to the JSON file during development. I would recommend to use an error for missing files during production. |
@sokra I thinks about access to file tree (for sort and count) before module parsing... |
A worked code sample for https://dev.to/denisx/reduce-bundle-size-via-one-letter-css-classname-hash-strategy-10g6
Improving bundle compression to 40% of filesize via change standard css classname hash for splitting to one-letter name strategy and filepath.
webpack
class
tests
p.s. need help with more magic - how to keep file tree sorted between client and server variants. this will reduce 81% of filesize.
The text was updated successfully, but these errors were encountered: