Closed mischkl closed 9 years ago
On second thought this ought to be possible using a combination of parcelify and less-css-stream... so I am closing the issue after all.
@mischkl could you share an example of how you got it to work?
It sounds to me like this is a perfect job for grunt, since the whole point of this mod is to bake the CSS into the JS.
We would like the ability to keep the CSS file separate from the JavaScript file instead of having it be embedded, so that it can then be linked within the HTML instead of being injected as an internal style. Kind of similar to https://github.com/capaj/require-stylify except that the result should be one CSS file instead of many. And since the require-stylify project seems not to be maintained anymore this seems like the place to request this feature. :)
Of course it is possible to achieve something similar via a build script but the point is that we want the benefit of requiring our CSS in JavaScript modules, so that if a JS module isn't used its CSS is automatically excluded as well.