I'm building a single page app using webpack. Have seen several times that it is recommended to extract css from production build but didn't find the reason.
Could anyone explain why it is treated as a best practice and what the advantages of that for production?
Is it needed for caching styles and js separately on client only or there are other reasons, cons, pros?
An example of such recommendation you can find by link below
https://github.com/webpack-contrib/sass-loader
In production
Usually, it's recommended to extract the style sheets into a dedicated file in production using the ExtractTextPlugin. This way your styles are not dependent on JavaScript:
This way your styles are not dependent on JavaScript
– Indelicate