diff --git a/packages/vite/src/node/server/mixedModuleGraph.ts b/packages/vite/src/node/server/mixedModuleGraph.ts index d3dc951d8..28fad52e5 100644 --- a/packages/vite/src/node/server/mixedModuleGraph.ts +++ b/packages/vite/src/node/server/mixedModuleGraph.ts @@ -308,7 +308,7 @@ export class ModuleGraph { if (ssrModules) { for (const mod of ssrModules) { if (mod.id == null || !this._client.getModuleById(mod.id)) { - result.add(this.getBackwardCompatibleBrowserModuleNode(mod)!) + result.add(this.getBackwardCompatibleServerModuleNode(mod)!) } } }