@@ -13,6 +13,7 @@ import type { ResolvedConfig } from '../../config'
1313import type { ViteDevServer } from '../../server'
1414import { arraify , createDebugger } from '../../utils'
1515import { prepareError } from '../middlewares/error'
16+ import { getShortName } from '../hmr'
1617
1718const debug = createDebugger ( 'vite:full-bundle-mode' )
1819
@@ -412,20 +413,21 @@ export class FullBundleDevEnvironment extends DevEnvironment {
412413 ) {
413414 if ( hmrOutput . type === 'Noop' ) return
414415
416+ const shortFile = getShortName ( file , this . config . root )
415417 if ( hmrOutput . type === 'FullReload' ) {
416418 this . triggerGenerateBundle ( { options, bundle } )
417419
418420 const reason = hmrOutput . reason
419421 ? colors . dim ( ` (${ hmrOutput . reason } )` )
420422 : ''
421423 this . logger . info (
422- colors . green ( `trigger page reload ` ) + colors . dim ( file ) + reason ,
424+ colors . green ( `trigger page reload ` ) + colors . dim ( shortFile ) + reason ,
423425 { clear : ! firstInvalidatedBy , timestamp : true } ,
424426 )
425427 return
426428 }
427429
428- debug ?.( `handle hmr output for ${ file } ` , {
430+ debug ?.( `handle hmr output for ${ shortFile } ` , {
429431 ...hmrOutput ,
430432 code : typeof hmrOutput . code === 'string' ? '[code]' : hmrOutput . code ,
431433 } )
0 commit comments