Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vite/src/module-runner/evaluatedModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const prefixedBuiltins = new Set([
// /root/id.js -> /id.js
// C:/root/id.js -> /id.js
// C:\root\id.js -> /id.js
function normalizeModuleId(file: string): string {
export function normalizeModuleId(file: string): string {
if (prefixedBuiltins.has(file)) return file

// unix style, but Windows path still starts with the drive letter to check the root
Expand Down
6 changes: 5 additions & 1 deletion packages/vite/src/module-runner/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// this file should re-export only things that don't rely on Node.js or other runner features

export { EvaluatedModules, type EvaluatedModuleNode } from './evaluatedModules'
export {
EvaluatedModules,
normalizeModuleId,
type EvaluatedModuleNode,
} from './evaluatedModules'
export { ModuleRunner } from './runner'
export { ESModulesEvaluator } from './esmEvaluator'

Expand Down