Skip to content

Commit 9041e19

Browse files
authored
fix: unwrapId and pass ssr flag when adding to moduleGraph in this.load (#13083)
1 parent 8a8ea1d commit 9041e19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vite/src/node/server/pluginContainer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ import {
7676
numberToPos,
7777
prettifyUrl,
7878
timeFrom,
79+
unwrapId,
7980
} from '../utils'
8081
import { FS_PREFIX } from '../constants'
8182
import type { ResolvedConfig } from '../config'
@@ -313,7 +314,7 @@ export async function createPluginContainer(
313314
} & Partial<PartialNull<ModuleOptions>>,
314315
): Promise<ModuleInfo> {
315316
// We may not have added this to our module graph yet, so ensure it exists
316-
await moduleGraph?.ensureEntryFromUrl(options.id)
317+
await moduleGraph?.ensureEntryFromUrl(unwrapId(options.id), this.ssr)
317318
// Not all options passed to this function make sense in the context of loading individual files,
318319
// but we can at least update the module info properties we support
319320
updateModuleInfo(options.id, options)

0 commit comments

Comments
 (0)