Skip to content

Commit

Permalink
fix: hmr port fallback in middlewareMode
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 23, 2021
1 parent 98f60e5 commit 36a9456
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/vite/src/node/plugins/clientInjections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ export function clientInjectionsPlugin(config: ResolvedConfig): Plugin {
let port
if (config.server.middlewareMode) {
port = String(
typeof config.server.hmr === 'object'
? config.server.hmr.port
: 24678
(typeof config.server.hmr === 'object' && config.server.hmr.port) ||
24678
)
} else {
port = String(options.port || config.server.port!)
Expand Down

0 comments on commit 36a9456

Please sign in to comment.