Skip to content

Commit df4f596

Browse files
authored
Fix build on Windows (TurboWarp#2268)
Was broken by TurboWarp#2266
1 parent 16cc40e commit df4f596

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎development/builder.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as fs from "node:fs";
22
import * as pathUtil from "node:path";
3+
import * as urlUtil from "node:url";
34
import AdmZip from "adm-zip";
45
import chokidar from "chokidar";
56
import spdxParser from "spdx-expression-parse";
@@ -807,9 +808,9 @@ class Builder {
807808

808809
// Don't rely on node_modules being stored in a specific location or having a specific structure
809810
// so that this works when we are a dependency in a bigger npm tree.
810-
const scratchblocksPath = new URL(
811+
const scratchblocksPath = urlUtil.fileURLToPath(
811812
import.meta.resolve("@turbowarp/scratchblocks")
812-
).pathname;
813+
);
813814
build.files["/docs-internal/scratchblocks.js"] = new BuildFile(
814815
scratchblocksPath
815816
);

0 commit comments

Comments
 (0)