Support thread loader by optional inline emitCss (base64, querystring)
This option makes svelte-loader output base64'd css in querystring, which is always available to any thread. It is turned off by default because it pollutes webpack's console output, but if user needs to use thread-loader, he can.
Now it checks automatically. this.emitFile is not available in loaders spawned by thread-loader, so I'm using that.
So what do you think guys?
I think adding this feature could be helpful. In default webpack configs it won't do anything, but people can start to experiment with thread-loader and tailwindcss and try to get better results in dev mode cold starts and in prod mode.
If it would appear to be useless then we can safely remove it, because no API changes were made.
Interesting, it doesn't work with svelte-preprocess. I decided to try it with my scss preprocessed project and it tells me this stuff:
Thread Loader (Worker 0)
ParseError: Unexpected input (19:22)
17: .button {
18: $bgcol: hsl(215, 35%, 50%);
19: background-color: $bgcol;
^
20: border: pxrem(1) solid mix(#000, $bgcol, 14);
21: border-radius: pxrem(5);
So I guess we will release without this PR.