diff --git a/packages/vite/src/node/ssr/runtime/runtime.ts b/packages/vite/src/node/ssr/runtime/runtime.ts index b3a2cf069a1f36..a76d4eadce5112 100644 --- a/packages/vite/src/node/ssr/runtime/runtime.ts +++ b/packages/vite/src/node/ssr/runtime/runtime.ts @@ -194,10 +194,10 @@ export class ViteRuntime { // usually import locations are already resolved by Vite during transformation, so it _should_ be fine // TODO: is it a good idea? what if id has a query string? do we want to remove &t= like in vite-node? do we want to allow extendin it? private async cachedModule( - id: string, + rawId: string, importer?: string, ): Promise { - id = unwrapId(id) + const id = unwrapId(rawId) const file = this.idToFileMap.get(id) if (file) { const mod = this.moduleCache.get(file) @@ -219,13 +219,7 @@ export class ViteRuntime { private async directRequest( id: string, - { - file, - externalize, - code: transformed, - type, - id: moduleId, - }: ResolvedResult, + { file, externalize, code: transformed, id: moduleId }: ResolvedResult, _callstack: string[], metadata?: SSRImportMetadata, ): Promise {