Skip to content

Commit 56e3828

Browse files
committed
Normalize runner import loader path
1 parent a4604dc commit 56e3828

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/cli-v3/e2e/e2e.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ describe.concurrent("buildWorker", async () => {
248248
expect(workerManifest!).toBeTruthy();
249249
}
250250

251+
logger.debug("Worker manifest", workerManifest!);
252+
251253
if (runs && runs.length > 0) {
252254
await writeJSONFile(path.join(destination.path, "index.json"), workerManifest!);
253255
}

packages/core/src/v3/build/runtime.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { join } from "node:path";
2-
import { BuildManifest, BuildRuntime } from "../schemas/build.js";
2+
import { pathToFileURL } from "url";
3+
import { BuildRuntime } from "../schemas/build.js";
34

45
export const DEFAULT_RUNTIME: BuildRuntime = "node";
56

@@ -42,7 +43,7 @@ export function execOptionsForRuntime(runtime: BuildRuntime, options: ExecOption
4243
switch (runtime) {
4344
case "node": {
4445
const importEntryPoint = options.loaderEntryPoint
45-
? `--import=${options.loaderEntryPoint}`
46+
? `--import=${pathToFileURL(options.loaderEntryPoint).href}`
4647
: undefined;
4748

4849
const conditions = options.customConditions?.map((condition) => `--conditions=${condition}`);

0 commit comments

Comments
 (0)