@@ -84,7 +84,7 @@ interface LaravelPlugin extends Plugin {
84
84
config : ( config : UserConfig , env : ConfigEnv ) => UserConfig
85
85
}
86
86
87
- type DevServerUrl = `${'http' | 'https' } ://${string } :${number } ${ string } `
87
+ type DevServerUrl = `${'http' | 'https' } ://${string } :${number } `
88
88
89
89
let exitHandlersBound = false
90
90
@@ -204,7 +204,8 @@ function resolveLaravelPlugin(pluginConfig: Required<PluginConfig>): LaravelPlug
204
204
const isAddressInfo = ( x : string | AddressInfo | null | undefined ) : x is AddressInfo => typeof x === 'object'
205
205
if ( isAddressInfo ( address ) ) {
206
206
viteDevServerUrl = userConfig . server ?. origin ? userConfig . server . origin as DevServerUrl : resolveDevServerUrl ( address , server . config , userConfig )
207
- fs . writeFileSync ( pluginConfig . hotFile , viteDevServerUrl )
207
+
208
+ fs . writeFileSync ( pluginConfig . hotFile , `${ viteDevServerUrl } ${ server . config . base . replace ( / \/ $ / , '' ) } ` )
208
209
209
210
setTimeout ( ( ) => {
210
211
server . config . logger . info ( `\n ${ colors . red ( `${ colors . bold ( 'LARAVEL' ) } ${ laravelVersion ( ) } ` ) } ${ colors . dim ( 'plugin' ) } ${ colors . bold ( `v${ pluginVersion ( ) } ` ) } ` )
@@ -431,9 +432,8 @@ function resolveDevServerUrl(address: AddressInfo, config: ResolvedConfig, userC
431
432
432
433
const configHmrClientPort = typeof config . server . hmr === 'object' ? config . server . hmr . clientPort : null
433
434
const port = configHmrClientPort ?? address . port
434
- const base = config . base . replace ( / \/ $ / , '' )
435
435
436
- return `${ protocol } ://${ host } :${ port } ${ base } `
436
+ return `${ protocol } ://${ host } :${ port } `
437
437
}
438
438
439
439
function isIpv6 ( address : AddressInfo ) : boolean {
0 commit comments