Skip to content

Commit

Permalink
chore: normalize as request id
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jul 29, 2023
1 parent c2b7e67 commit e3f6e91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vite-node/src/hmr/hmr.ts
Expand Up @@ -6,7 +6,7 @@ import c from 'picocolors'
import createDebug from 'debug'
import type { ViteNodeRunner } from '../client'
import type { HotContext } from '../types'
import { normalizeModuleId } from '../utils'
import { normalizeRequestId } from '../utils'
import type { HMREmitter } from './emitter'

export type ModuleNamespace = Record<string, any> & {
Expand Down Expand Up @@ -108,8 +108,8 @@ async function queueUpdate(runner: ViteNodeRunner, p: Promise<(() => void) | und
}

async function fetchUpdate(runner: ViteNodeRunner, { path, acceptedPath }: Update) {
path = normalizeModuleId(path)
acceptedPath = normalizeModuleId(acceptedPath)
path = normalizeRequestId(path)
acceptedPath = normalizeRequestId(acceptedPath)

const maps = getCache(runner)
const mod = maps.hotModulesMap.get(path)
Expand Down

0 comments on commit e3f6e91

Please sign in to comment.