Upgrade weboack-cli to 4.2, webpack-dev-server to 4.0.0-beta0, remove 'sockjs' redirect as wds4 uses ws instead

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
Hung-Han (Henry) Chen committed 2021-01-07 11:21:44 +08:00
1 parent 08fa0c6d63
commit b99c3f7df8
4 files changed
+385 -606

No files matched your search

+2 -2
View File
@@ -106,8 +106,8 @@ export class Router {
try {
const filename = path.basename(req.url);
// 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");
// redirect requests to [appName].js, [appName].html to webpack-dev-server (for hot-reload support)
const toWebpackDevServer = filename.includes(appName) || filename.includes("hot-update");
if (isDevelopment && toWebpackDevServer) {
const redirectLocation = `http://localhost:${webpackDevServerPort}${req.url}`;