Hey Tobias! I'm so glad you stopped in to ask! I actually was working on a precompiler for css-in-js that would do this, you can find it here: css-in-js-precompiler. It actually works really well and can even track some dynamic values (even if they come from import statements).
I stopped working on it though when I realized that CSS-in-JS is pretty far down on the list of bottlenecks for my application's performance and my users would be better served if I focus my efforts on other areas.
I expect this is the same with many other people (CSS-in-JS is NOT their bottleneck), however, many folks desperately want static css files and for those folks I say that if perf is that important, they should server render their apps! And, if they server render their apps, then they don't need static css extraction!!! Oh my! Because you get critical CSS by default with CSS-in-JS which I think is awesome.
All that said, if you really want to work on it, I'm sure folks would be willing to forego dynamic CSS-in-JS to get css files. If that's what you want, then I suggest emotion.
Thanks again for the question, and thank you for all your work on Webpack! My open collective sponsorship money for webpack was sent again and I'm always happy to see that email come in because I love what webpack is doing for the web. Keep it up!