Skip to content

Commit

Permalink
This reverts commit de0a2f8.
Browse files Browse the repository at this point in the history
wip: windows
  • Loading branch information
hi-ogawa committed Oct 16, 2024
1 parent de0a2f8 commit bb8c402
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/vite/src/module-runner/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ export function normalizeAbsoluteUrl(url: string, root: string): string {
// file:///C:/root/id.js -> C:/root/id.js
if (url.startsWith('file://')) {
// 8 is the length of "file:///"
// url = url.slice(isWindows ? 8 : 7)
url = url.slice(7)
url = url.slice(isWindows ? 8 : 7)
}

// strip root from the URL because fetchModule prefers a public served url path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const initialize = async () => {
dynamicRelative: await import(nameRelative),
dynamicAbsolute: await import(nameAbsolute),
dynamicAbsoluteExtension: await import(nameAbsoluteExtension),
dynamicAbsoluteFull: await import(path.join(import.meta.dirname, "simple.js")),
dynamicAbsoluteFull: await import(path.join("/@fs", import.meta.dirname, "simple.js")),
static: staticModule,
}
}

0 comments on commit bb8c402

Please sign in to comment.