Skip to content

Commit

Permalink
fix: use file url for import to satisfy windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ebey committed Aug 16, 2023
1 parent 58ff078 commit a548b79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions integration/helpers/create-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export async function createAppFixture(fixture: Fixture, mode?: ServerMode) {
let rejectTimeout = setTimeout(() => {
reject(new Error("Timed out waiting for remix-serve to start"));
}, 20000);
serveProcess.stderr.pipe(process.stderr);
serveProcess.stdout.on("data", (chunk) => {
if (started) return;
let newChunk = chunk.toString();
Expand Down
6 changes: 5 additions & 1 deletion packages/remix-serve/cli.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "./env";
import path from "node:path";
import os from "node:os";
import url from "node:url";
import { broadcastDevReady, installGlobals } from "@remix-run/node";
import sourceMapSupport from "source-map-support";

Expand All @@ -23,7 +24,10 @@ async function run() {
process.exit(1);
}

let buildPath = path.resolve(process.cwd(), buildPathArg);
let buildPath = url.pathToFileURL(
path.resolve(process.cwd(), buildPathArg)
).href;

let build = await import(buildPath);

let onListen = () => {
Expand Down

0 comments on commit a548b79

Please sign in to comment.