Conditionally loading JS libraries

Thanks for pulling this together, rhcarvalho. The dynamic import approach is the bit that made it click for me — keeping the library out of the main bundle and only loading it inside the hook when that part of the page is actually used, rather than loading it for every visitor. I had been unsure whether that would play nicely with esbuild, so it is good to see it laid out so plainly. One thing I am still thinking about is what to do when the same library is needed on a couple of pages: keep one small shared helper, or just repeat the import in each hook? The helper feels tidier, but I can see the case for keeping each hook self-contained.