there is a small difference: you also need to make your own hmr reloading script when using bun. But it does so much more than just frontend bundleing.
Sure. This was wrt "when using bun" - i.e. somebody else might prefer to just whack web-dev-server into place as a lightweight option for them.
mininext is a neat idea and I plan to read through the code (do you have a preferred 'small snippet' for hrm? I'd be interested to read that too) but I was talking more generally in my last comment.
Sorry for the silly question, I found the standardDevReloader stuff, hadn't realised it was built in. Not what I was hoping for since I want per-library reloading, but for the goals of mininext that's probably overkill anyway.
I like to keep it simple. Right now bun just rebuilds everything and it is so fast that I don't recognize it.
If it ever becomes a problem I will optimize it.
The standardDevReloader is a snippet to tell the browser to refresh the page after a rebuild happened.
If you setup a fresh project with the barebones quickstart template with:
bun create spirobel/aldi yournewproject
you will see a dev.ts in the project folder.
compared to the start.ts (which is used to run the prod version) it will setup this snippet, so it is included in every html page that is served.
If you need an hmr script you can use the one I wrote for my webframework: https://github.com/spirobel/mininext
(my goal with mininext is to provide index.php like productivity but with all of npm and typescript at your fingertips)