Skip to content

Commit

Permalink
fix: unwrapId and pass ssr flag when adding to moduleGraph in this.lo…
Browse files Browse the repository at this point in the history
…ad (#13083)
  • Loading branch information
patak-dev authored May 4, 2023
1 parent 8a8ea1d commit 9041e19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/server/pluginContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ import {
numberToPos,
prettifyUrl,
timeFrom,
unwrapId,
} from '../utils'
import { FS_PREFIX } from '../constants'
import type { ResolvedConfig } from '../config'
Expand Down Expand Up @@ -313,7 +314,7 @@ export async function createPluginContainer(
} & Partial<PartialNull<ModuleOptions>>,
): Promise<ModuleInfo> {
// We may not have added this to our module graph yet, so ensure it exists
await moduleGraph?.ensureEntryFromUrl(options.id)
await moduleGraph?.ensureEntryFromUrl(unwrapId(options.id), this.ssr)
// Not all options passed to this function make sense in the context of loading individual files,
// but we can at least update the module info properties we support
updateModuleInfo(options.id, options)
Expand Down

0 comments on commit 9041e19

Please sign in to comment.