From 239f42ed5979297678f3502af297bdd4d7aa6d37 Mon Sep 17 00:00:00 2001 From: Nikhil Saraf Date: Mon, 3 Jul 2023 02:08:27 +0530 Subject: [PATCH] add mjs --- packages/vinxi/bin/cli.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/vinxi/bin/cli.mjs b/packages/vinxi/bin/cli.mjs index 902aa86d..13f1b92a 100755 --- a/packages/vinxi/bin/cli.mjs +++ b/packages/vinxi/bin/cli.mjs @@ -1,6 +1,7 @@ #!/usr/bin/env node import mri from "mri"; import { join, resolve } from "pathe"; +import { pathToFileURL } from "url"; async function main() { const args = mri(process.argv.slice(2)); @@ -8,7 +9,9 @@ async function main() { const rootDir = resolve(args._[1] || "."); globalThis.MANIFEST = {}; - const { default: config } = await import(resolve("./app.js")); + const { default: config } = await import( + pathToFileURL(resolve("./app.js")).href + ); if (command === "dev") { const { createDevServer } = await import("../lib/dev-server.js");