https://clojurians.slack.com/archives/C0GLTDB2T/p1764355778784389
New to squint and wanting to use reagami. I see all the reagami examples use Vite. Must I use something like Vite? Or is there a vanilla js/html way of packaging the project?
@bwancor If you want you can definitely use something more vanilla.
Just npx squint compile <file.cljs> will emit an .mjs file.
But this file will have import for both squint and reagami. To make those imports work in the browser, you can use importmaps. But to make the smallest possible output, it's recommended to use something like npx esbuild out/main.mjs --bundle --minify .
Also hot-reloading is nice. vite also does this for you.
So vite basically takes care of all of these things for you.
you could just copy one of the examples in reagami's project, in the scratch directory
https://github.com/borkdude/reagami/tree/main/scratch
I see, yeah vite definitely makes this whole process easier. Struggling to get the browser to recognize reagami using the vanilla approach, but no issues with vite.
Ah, I was looking for the static build output without the backing server, which seems to be what dist is 🙂
yes
you can also build a single html page with the JS included, it's an option in the vite.config.js, at least the snake game has it, the slider one too I think
maybe all the examples, since I basically just copy them over
Awesome, I'll play around with these options more. Thanks!