From e3f6e912ff5024dd1aaa635bcd4ffb64a8e2aeb4 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sat, 29 Jul 2023 18:04:19 +0200 Subject: [PATCH] chore: normalize as request id --- packages/vite-node/src/hmr/hmr.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vite-node/src/hmr/hmr.ts b/packages/vite-node/src/hmr/hmr.ts index 272dc9b95fb5..e6c77677b3d2 100644 --- a/packages/vite-node/src/hmr/hmr.ts +++ b/packages/vite-node/src/hmr/hmr.ts @@ -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 & { @@ -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)