File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/@vue/cli-service/lib/commands Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,10 @@ module.exports = (api, options) => {
127127
128128 // inject dev & hot-reload middleware entries
129129 if ( ! isProduction ) {
130+ const sockPath = projectDevServerOptions . sockPath || '/sockjs-node'
130131 const sockjsUrl = publicUrl
131132 // explicitly configured via devServer.public
132- ? `?${ publicUrl } /sockjs-node `
133+ ? `?${ publicUrl } &sockPath= ${ sockPath } `
133134 : isInContainer
134135 // can't infer public network url if inside a container...
135136 // use client-side inference (note this would break with non-root publicPath)
@@ -138,9 +139,8 @@ module.exports = (api, options) => {
138139 : `?` + url . format ( {
139140 protocol,
140141 port,
141- hostname : urls . lanUrlForConfig || 'localhost' ,
142- pathname : '/sockjs-node'
143- } )
142+ hostname : urls . lanUrlForConfig || 'localhost'
143+ } ) + `&sockPath=${ sockPath } `
144144 const devClients = [
145145 // dev server client
146146 require . resolve ( `webpack-dev-server/client` ) + sockjsUrl ,
You can’t perform that action at this time.
0 commit comments