Currently, we write the file to the disk and add it as a require statement in the JS in the webpack loader. We should use memory fs if possible. https://github.com/4Catalyzer/css-literal-loader does it but looks complex. Another approach in https://github.com/callstack/linaria/tree/%40satya164/loader-magic, but it doesn't go through css-loader anymore
Hey if ya'll are still interested in this, i'd be happy to extract out the underlying webpack plugin into a separate package ๐
@jquense That'll be great! It'll also be useful for other use cases I imagine.
We can try this https://github.com/sysgears/webpack-virtual-modules
There is some article https://sysgears.com/articles/webpack-virtual-modules-plugin/
Most helpful comment
Hey if ya'll are still interested in this, i'd be happy to extract out the underlying webpack plugin into a separate package ๐