diff --git a/packages/@vue/cli-service/lib/commands/serve.js b/packages/@vue/cli-service/lib/commands/serve.js index e436e7a6d8..dee60c5d21 100644 --- a/packages/@vue/cli-service/lib/commands/serve.js +++ b/packages/@vue/cli-service/lib/commands/serve.js @@ -64,7 +64,7 @@ module.exports = (api, options) => { if (!isProduction) { const devClients = [ // dev server client - require.resolve(`webpack-dev-server/client`) + '?/sockjs-node', + require.resolve(`webpack-dev-server/client`) + (options.baseUrl !== '/' ? '?/sockjs-node' : ''), // hmr client require.resolve(projectDevServerOptions.hotOnly ? 'webpack/hot/only-dev-server'