File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class ErrorOverlayPlugin {
2222 compiler . options . devServer . host
2323 sockOptions . sockPath =
2424 compiler . options . devServer . client ?. webSocketURL ?. pathname ||
25- compiler . options . devServer . webSocketServer ? .options . path ||
25+ ( compiler . options . devServer . webSocketServer === "object" && compiler . options . devServer . webSocketServer . options ?. path ) ||
2626 '/ws'
2727 sockOptions . sockPort =
2828 compiler . options . devServer . client ?. webSocketURL ?. port ||
@@ -37,11 +37,12 @@ class ErrorOverlayPlugin {
3737 if ( devServerEnabled ) {
3838 const originalOnBeforeSetupMiddleware =
3939 options . devServer . onBeforeSetupMiddleware
40- options . devServer . onBeforeSetupMiddleware = ( devServer ) => {
40+ options . devServer . setupMiddlewares = ( middlewares , devServer ) => {
4141 if ( originalOnBeforeSetupMiddleware ) {
4242 originalOnBeforeSetupMiddleware ( devServer )
4343 }
44- devServer . app . use ( errorOverlayMiddleware ( ) )
44+ middlewares . unshift ( errorOverlayMiddleware ( ) ) ;
45+ return middlewares ;
4546 }
4647 }
4748 } )
You can’t perform that action at this time.
0 commit comments