Skip to content

Commit

Permalink
Append base to hot file (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed May 9, 2024
1 parent 74ebc91 commit fcd76b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ interface LaravelPlugin extends Plugin {
config: (config: UserConfig, env: ConfigEnv) => UserConfig
}

type DevServerUrl = `${'http'|'https'}://${string}:${number}`
type DevServerUrl = `${'http'|'https'}://${string}:${number}${string}`

let exitHandlersBound = false

Expand Down Expand Up @@ -431,8 +431,9 @@ function resolveDevServerUrl(address: AddressInfo, config: ResolvedConfig, userC

const configHmrClientPort = typeof config.server.hmr === 'object' ? config.server.hmr.clientPort : null
const port = configHmrClientPort ?? address.port
const base = config.base.replace(/\/$/, '')

return `${protocol}://${host}:${port}`
return `${protocol}://${host}:${port}${base}`
}

function isIpv6(address: AddressInfo): boolean {
Expand Down

0 comments on commit fcd76b5

Please sign in to comment.