Fork me on GitHub
#squint
<
2022-11-07
>
onetom01:11:17

Is there any way to automatically reload the squint generated ES6 modules in the browser, preferably without a full page reload? I always had the gut feeling, that ES modules are not reload-friendly. After reading this article about ES6 module loading and instantiation, I getting more convinced, it is the case: https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/ I secretly hoping there is some not-too-hacky way to have a figwheel-level experience... I saw ppl experimented with adding some modification time as query string, to reload a module, but they would still need to patch the original/previous one...

onetom01:11:10

I was using modd+devd combo in the past, but devd is not compiling on recent nixpkgs version, so I'm in search for an alternative 1. https://github.com/cortesi/modd 2. https://github.com/cortesi/devd I guess, we should just have a babashka solution. I think there is already a partial implementation throughout @borkdude tweets :)

borkdude11:11:24

@onetom Frameworks like next.js / vite etc have this problem solved, but not sure how to do it without those frameworks.