@rtsao has implemented dead code elimiation functionality into https://github.com/css-modules/css-modules-loader-core/issues/13 Next step here is to trial it with css-modulesify to understand better any tradeoffs involved.