Skip to content

Commit

Permalink
fix: resolved URL construction on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cyco130 committed Feb 27, 2023
1 parent acccc2d commit 88990ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/node-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ export async function resolve(
const id = resolved[1];

let url =
(id.startsWith("/@id/") || id[0] === "\0" ? "vite:" : "file://") +
id +
timestamp(id);
(id.startsWith("/@id/") || id[0] === "\0"
? "vite:" + id
: pathToFileURL(id).href) + timestamp(id);

url = url.replace(/\0/g, "__x00__");

Expand Down

0 comments on commit 88990ac

Please sign in to comment.