I'm experimenting with webpack builds and interesting question occurred. I want to generate CSS only source maps for prod and when I use devtool: "source-map", I end up with both JS and CSS maps. I did a quick search about this "issue", but nothing came up. Is there any easy way to control which maps I generate?
https://webpack.js.org/configuration/devtool/#devtool
Instead of using the devtool option you can also use SourceMapDevToolPlugin/EvalSourceMapDevToolPlugin directly as it has more options. Never use both the devtool option and plugin together.
So drop that source-map setting on the devtool option, and install / plug in: https://webpack.js.org/plugins/source-map-dev-tool-plugin/
From there, SourceMapDevToolPlugin's exclude or include options is where you being to narrow down CSS only maps.