Skip to content

Commit

Permalink
fix: cli
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Nov 5, 2024
1 parent dff583c commit 7d77a86
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ async function run(cmd: string, options: RunOptions) {
return create(options);
case 'build':
const { build } = await import('./build.js');
const config = await loadConfig({ cwd: options.cwd });
return build({ cwd: options.cwd, config });
return build({
cwd: options.cwd,
config: await loadConfig({ cwd: options.cwd }),
});
case 'dev':
const { dev } = await import('./dev.js');
return dev({ cwd: options.cwd, config });
return dev({
cwd: options.cwd,
config: await loadConfig({ cwd: options.cwd }),
});
default:
throw new Error(`Unknown command: ${cmd}`);
}
Expand Down

0 comments on commit 7d77a86

Please sign in to comment.