squint

2025-11-28T20:01:28.354729Z

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?

borkdude 2025-11-28T20:05:51.080189Z

@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.

borkdude 2025-11-28T20:35:33.548449Z

you could just copy one of the examples in reagami's project, in the scratch directory https://github.com/borkdude/reagami/tree/main/scratch

2025-11-28T20:35:51.705449Z

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.

2025-11-28T20:53:25.623829Z

Ah, I was looking for the static build output without the backing server, which seems to be what dist is 🙂

borkdude 2025-11-28T20:53:43.383889Z

yes

borkdude 2025-11-28T20:54:30.036329Z

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

🙏 1
borkdude 2025-11-28T20:54:40.309459Z

maybe all the examples, since I basically just copy them over

2025-11-28T20:55:01.848779Z

Awesome, I'll play around with these options more. Thanks!