This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -652,9 +652,10 @@ export class Application implements ServerApplication {
652
652
if (
653
653
! this . #reloading &&
654
654
( isRemote && ! url . startsWith ( 'http://localhost:' ) ) &&
655
+ reFullVersion . test ( url ) &&
655
656
mod . sourceHash !== ''
656
657
) {
657
- const jsFile = util . cleanPath ( saveDir + '/' + name + '.js' )
658
+ const jsFile = path . join ( saveDir , name + '.js' )
658
659
if ( existsFileSync ( jsFile ) ) {
659
660
shouldFetch = false
660
661
}
@@ -671,9 +672,16 @@ export class Application implements ServerApplication {
671
672
}
672
673
}
673
674
674
- // compute hash
675
- mod . hash = isRemote ? mod . sourceHash : computeHash ( mod . sourceHash + JSON . stringify ( this . defaultCompileOptions ) )
676
- mod . jsFile = util . cleanPath ( saveDir + '/' + name + ( isRemote ? '' : `.${ mod . hash . slice ( 0 , hashShortLength ) } ` ) + '.js' )
675
+ mod . hash = computeHash (
676
+ mod . sourceHash +
677
+ JSON . stringify ( this . defaultCompileOptions ) +
678
+ this . config . plugins . filter ( isLoaderPlugin ) . map ( ( { name } ) => name ) . join ( ',' )
679
+ )
680
+ if ( isRemote ) {
681
+ mod . jsFile = util . cleanPath ( `${ saveDir } /${ name } .js` )
682
+ } else {
683
+ mod . jsFile = `${ saveDir } /${ name } .${ mod . hash . slice ( 0 , hashShortLength ) } .js`
684
+ }
677
685
678
686
// check previous compilation output if the source content doesn't changed.
679
687
if ( ! shouldCompile && ! existsFileSync ( mod . jsFile ) ) {
You can’t perform that action at this time.
0 commit comments