antd-scss-theme-plugin icon indicating copy to clipboard operation
antd-scss-theme-plugin copied to clipboard

A suggestion and a word of caution re: build performance

Open davidfurlong opened this issue 5 years ago • 0 comments

I commented here: https://github.com/intoli/antd-scss-theme-plugin/issues/43 on what I thought was a bug with this library.

However it wasn't a bug with this library at all. I, as a naive developer confused by webpack took this plugin literally and applied the AntdScssThemePlugin.themify() changes to my rule which matched all my scss files. This caused this entire theme to rebuild on every scss file change (incremental build) adding ~10seconds and also slowed down the initial build by ~10s. This seems to be intended, as I think it makes possible the features here: https://github.com/intoli/antd-scss-theme-plugin#use-ant-designs-customized-color-and-theme-variables however we don't use it in this way, and we have alot of scss files.

If my understanding is correct, many users would benefit from avoiding wrapping all their scss loaders with this library. In this case I think an update to the README with the expected build speed savings would be prudent, which I would be happy to contribute to

davidfurlong avatar Jan 16 '19 22:01 davidfurlong