Skip to content

Commit 8e38be9

Browse files
committed
fix(command): fileURLToPath -> pathToFileURL
1 parent 9542ec2 commit 8e38be9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/command.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { buildBrowserFromString } from "../browserstack/buildBrowserFromString.j
99
import { run as runTests } from "../run.js";
1010
import readYAML from "../lib/readYAML.js";
1111
import { createTestServer } from "../createTestServer.js";
12-
import { fileURLToPath, pathToFileURL } from "node:url";
12+
import { pathToFileURL } from "node:url";
1313

1414
const program = new Command();
1515
const DEFAULT_PORT = 3000;
@@ -253,7 +253,7 @@ async function parseMiddleware( config, options ) {
253253
const middleware = await Promise.all(
254254
[ ...( config.middleware ?? [] ), ...( options.middleware ?? [] ) ].map(
255255
async( mw ) => {
256-
const module = await import( fileURLToPath( resolve( process.cwd(), mw ) ) );
256+
const module = await import( pathToFileURL( resolve( process.cwd(), mw ) ) );
257257
return module.default;
258258
}
259259
)

0 commit comments

Comments
 (0)