I’m working on esbuild integration in Caddy, and it my proof of concept works nicely, and its insanely fast
But I would love someone to join on the project, I’m struggling with handling configuration/Caddyfile stuff, and still have some esbuild properties to figure out…
Namely loaders, the fileLoader outputs the wrong directory, so it fails, so I jsut use dataURL loader, but thats not very scalable, and would love to have some good defaults, but options to override it in Caddyfile/json.
What I have made, and works:
“create-react-app” runs with some modifications to index.html to load the correct assets
specify source/target file in Caddyfile
In memory compiling the assets, and recompiles it when they change
By default I use ETag and return “304 Not modified”, but if you want, you can use the directive “file_hash” instead, and I set 1 year cache timeout on the files as well (very usefull if you have cloudflare or other edge-side caches in front of the user!