I’ve been learning ClojureScirpt for about a month. I figured out lots of things but there is one question bothering me, which is how to use svgs in Reagent. In webpack, there are some loaders can transform svgs to React component, such as “react-svg-loader”, “svg-react-loader”, “svgr”, and so on. Most of these loaders are also able to use svgo to optimize svg files at build time. But how do you normally do it in Reagent projects? I mean, use custom svgs, not some third party icons set.
I also have some thoughts:
- Can shadow-cljs work together with webpack or rollup? So I can benefit from the svg loaders, let the webpack loader to transform svgs to React component, and use them in Reagent.
- Writing some scripts to convert the svg files to hiccup syntax?
Could you give me some hints? Thanks!