hello, how to load react component css in cljs? Thanks.
Just as you would load any external CSS file. There's nothing built in to make this automatic. If you want to make the CSS data available to your CLJS, you can load it via a macro during the compilation time.
But I don’t know the location the css is located from an NPM lib.
You should be able to find it.
When you see something like require('main.css')
in JS, it's no longer "vanilla JS" - it's JS that's supposed to be compiled with webpack. None of the CLJS build tools that I'm familiar with use webpack.
You can try using webpack with one of the CLJS build tools, but I would recommend against it.
I use postcss-cli
with postcss-import
plugin to compile css, and then just require the output css in the html
Yeah, that's what I do as well, only I've embedded SASS compiler into my main CLJS compilation process.