File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ export default function laravel(config: string|string[]|PluginConfig): LaravelPl
120120 const isAddressInfo = ( x : string | AddressInfo | null | undefined ) : x is AddressInfo => typeof x === 'object'
121121 if ( isAddressInfo ( address ) ) {
122122 const protocol = server . config . server . https ? 'https' : 'http'
123- const host = address . family === 'IPv6' ? `[${ address . address } ]` : address . address
123+ const configHost = typeof server . config . server . host === 'string' ? server . config . server . host : null
124+ const serverAddress = address . family === 'IPv6' ? `[${ address . address } ]` : address . address
125+ const host = configHost ?? serverAddress
124126 viteDevServerUrl = `${ protocol } ://${ host } :${ address . port } `
125127 fs . writeFileSync ( hotFile , viteDevServerUrl )
126128
You can’t perform that action at this time.
0 commit comments