Instead of writing my own static index.html file, the plugin generates an index.html file that includes the compiled bundles (JS, CSS, etc…). For example, for development it will create an html file with a
<script src="bundle.js"></script> tag, while for production it will generate something like
Is there something similar for ClojureScript? I’m using figwheel-main, but looks like there isn’t anything similar out of the box
I’m using my own script for generating HTML. A script of adding virtual DOMs and it handles
src property in my cljs code.
Shadow-CLJS seems to support it. Ctrl+f for
As I understand it, Figwheel is primarily a development tool. Shadow-CLJS provides help all the way to production. That is, shadow can hot-load your code in development and compile it for production. If you would like to use Figwheel for development and have module hashing for production, I think you’d have to look into the CLJS build API, and make a build script that computes hashes, renames files and generates links in
index.html accordingly. Which isn’t exactly what you were asking for.
Hope that helps!