Skip to content

Commit

Permalink
add mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
nksaraf committed Jul 2, 2023
1 parent 0dd1fb0 commit 239f42e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vinxi/bin/cli.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/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));
const command = args._[0];
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");
Expand Down

0 comments on commit 239f42e

Please sign in to comment.