I've a written a webpack plugin which reads less source files and then after processing generates a short css which allows to override the color specific styles in browser using less.modifyVars()
.
Here is a demo https://antd-live-theme.firebaseapp.com/
But problem is that it does not work with css-modules since class names generated after compilation will be different than what are in those files. So I think it's better to process the generated css by webpack (css, less, style loaders) in my webpack plugin. so question is
How to get that generated css in webpack plugin even in dev mode using where style-loader is being used?
Here is plugin https://github.com/mzohaibqc/antd-theme-webpack-plugin/blob/master/index.js
Any ideas to accomplish this task are welcome. Let me know if there is something confusing.
Thanks in advance :)