The issue is that the browser will not know the right url for the modules. If you use urls that start with ‘./’ there is no problem.
In WebODF we use custom module loading code. It has a tiny compile step that creates a json file that maps the short import, e.g. ‘prosemirror-model’ to the full url. This json only needs to be updated when a module is added, moved or deleted. Most of the time, you can use reload without this step.
I’ve found that using typescript middleware in nodejs that does dynamic recompilation to be so fast that it’s rebuilt by the time I’ve switched between text editor and browser. I imagine that the npm module babel-middleware is similarly fast.