web
web copied to clipboard
[@web/dev-server]Live-reload, HMR not working when app is running on a base URL like <base href="/my-app/">
In __web-dev-server_web-socket.js file there is this code:
const { protocol, host } = new URL(import.meta.url);
const webSocketUrl = `ws${protocol === 'https:' ? 's' : ''}://${host}/wds`;
It would be nice if I can specify in the web-dev-server.config a baseUrl and have the code above rewritten to:
const webSocketUrl = `ws${protocol === 'https:' ? 's' : ''}://${host}/**${app-base-href}**/wds`
I need this, so traefik can route the request to the appropriate docker container.
I'm close to making HMR work in my project, but I can't figure out why the __web-de-server__ folder (with the hmr scripts) is missing.
@LarsDenBakker any tip? or point to the file/line of code that I should pay attention to?