From 9daae7a73c10780f162eeed7a8e57f6f23301ba8 Mon Sep 17 00:00:00 2001 From: Tobias Davis Date: Wed, 28 Jun 2023 21:23:25 -0500 Subject: [PATCH] change: windows support https://github.com/nodejs/node/issues/34765 --- src/cli.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli.js b/src/cli.js index 76933fe..be73031 100644 --- a/src/cli.js +++ b/src/cli.js @@ -1,3 +1,4 @@ +import { pathToFileURL } from 'node:url' import { mkdir, writeFile } from 'node:fs/promises' import { dirname, resolve, isAbsolute } from 'node:path' import CheapWatch from 'cheap-watch' @@ -27,7 +28,7 @@ const build = async ({ cwd, indent, opts, outputFilepath, verbose }) => { } const run = async ({ config, cwd, delay, indent, serve, verbose, watch }) => new Promise( - (resolvePromise, rejectPromise) => import(config) + (resolvePromise, rejectPromise) => import(pathToFileURL(config).href) .then(({ default: opts }) => { const port = typeof serve === 'number' ? serve : 9001 let { output: outputFilepath } = opts