Skip to content

Commit

Permalink
chore: normalize path
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Mar 12, 2024
1 parent 56aca98 commit 3c46f97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/vite/src/module-runner/hmrHandler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { HMRPayload } from 'types/hmrPayload'
import { unwrapId } from '../shared/utils'
import { slash, unwrapId } from '../shared/utils'
import type { ModuleRunner } from './runner'

// updates to HMR should go one after another. It is possible to trigger another update during the invalidation for example.
Expand Down Expand Up @@ -46,7 +46,10 @@ export async function handleHMRPayload(
case 'full-reload': {
const { triggeredBy } = payload
const clearEntrypoints = triggeredBy
? getModulesEntrypoints(runner, getModulesByFile(runner, triggeredBy))
? getModulesEntrypoints(
runner,
getModulesByFile(runner, slash(triggeredBy)),
)
: findAllEntrypoints(runner)

if (!clearEntrypoints.size) break
Expand Down

0 comments on commit 3c46f97

Please sign in to comment.