Reputation: 500
I have a styles.css
file and I need to load it from a cljs
to pass it as a props
to a react lib.
The import in node is:
import styles from './styles.css'
Is it possible to do this in ClojureScript with shadow-cljs
?
Upvotes: 7
Views: 3167
Reputation: 4356
Importing styles.css
in webpack
is handled by the style-loader which you can sort of hook up by following the webpack guide and exporting things to global objects.
ClojureScript itself (or shadow-cljs
) does not support anything in that regard but you could possibly create something similar using macros.
Upvotes: 7