Skip to content

Instantly share code, notes, and snippets.

View SinimaWath's full-sized avatar
😎
Tupo chill

Vladik Tarasov SinimaWath

😎
Tupo chill
View GitHub Profile
@SinimaWath
SinimaWath / *constant-locals-loader.md
Last active March 14, 2020 16:10 — forked from developit/*constant-locals-loader.md
Inline Webpack CSS Modules classNames, reducing bundle size. https://npm.im/constant-locals-loader

constant-locals-loader for Webpack

This loader optimizes the output of mini-css-extract-plugin and/or css-loader, entirely removing the potentially large CSS classname mappings normally inlined into your bundle when using CSS Modules.

Run npm install constant-locals-loader, then make these changes in your Webpack config:

module.exports = {
 module: {