Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unwrapId and pass ssr flag when adding to moduleGraph in this.load #13083

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/vite/src/node/server/pluginContainer.ts
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