0

I have a multi-endpoint webpack setup with sass and MiniCssExtractPlugin. Everything works fine and css is extracted for every endpoint.

Now I am looking for a way to only extract css for certain endpoints, but not the others. Is it possible to specify this somehow?

dmitrybelyakov
  • 3,709
  • 2
  • 22
  • 26
  • 1
    No it is not, all extract solutions will extract from everywhere. – PlayMa256 Jan 05 '19 at 20:32
  • 1
    you will need to setup multiple css loaders, one that uses MiniCssExtractPlugin and one that doesn't. you'll need to use include, exclude or test to try and target the file that you want to use MiniCssExtractPlugin with. you might need to do the opposite on the other loader so that both aren't active for the same file. I would suggest using include to target a specific directory and then exclude on the other – Andrew Axton Jan 05 '19 at 22:59
  • @AndrewAxton yes, this is what I ended up doing, just seemed a bit complicated, so I wondered if there's a better option or test I can put in. – dmitrybelyakov Jan 06 '19 at 00:10

0 Answers0