From af3c43203b353612123e65adeab732f251f4c160 Mon Sep 17 00:00:00 2001 From: "Hung-Han (Henry) Chen" <1474479+chenhunghan@users.noreply.github.com> Date: Tue, 15 Dec 2020 12:07:33 +0800 Subject: [PATCH] Revert back to redirecting /sockjs/ to webpack-dev-server Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com> --- src/main/router.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/router.ts b/src/main/router.ts index 4c37d89554..896893a592 100644 --- a/src/main/router.ts +++ b/src/main/router.ts @@ -106,8 +106,8 @@ export class Router { try { const filename = path.basename(req.url); - // redirect requests to [appName].js, [appName].html to webpack-dev-server (for hot-reload support) - const toWebpackDevServer = filename.includes(appName) || filename.includes("hot-update"); + // redirect requests to [appName].js, [appName].html /sockjs-node/ to webpack-dev-server (for hot-reload support) + const toWebpackDevServer = filename.includes(appName) || filename.includes("hot-update") || req.url.includes("sockjs-node"); if (isDevelopment && toWebpackDevServer) { const redirectLocation = `http://localhost:${webpackDevServerPort}${req.url}`;