I’ve followed the Real World Halogen project in order to get the client-side code auto-reloading successfully. But I also need to interact with a server (for what it’s worth, I’m just using Express for now), and it’d be great to not have to spin up two servers (Express + the dev server Parcel provides).
I tried using
parcel watch dev/index.html and then having Express serve that same
dev/index.html file, but the
dev/index.js file it tries to call fails because
require isn’t something understood by the browser. Even if I modify
dev/index.html to call
dev/index.js as a module (and then use
import), I still run into issues because the compiled code in
Main.js still uses
Any ideas on how to enable auto-reloading for both the server and the client side? Thanks in advance!