1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Revert back to redirecting /sockjs/ to webpack-dev-server

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
Hung-Han (Henry) Chen 2020-12-15 12:07:33 +08:00
parent c2997fce37
commit af3c43203b
No known key found for this signature in database
GPG Key ID: A28B7834EFA73792

View File

@ -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}`;