diff --git a/.gitignore b/.gitignore index c72914019b1..b0bd43cf04f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ pnpm-global TODOs.md .temp *.tgz +examples-temp diff --git a/src/node/cli.ts b/src/node/cli.ts index 0d992fab8e4..1d95c3e7358 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -28,10 +28,14 @@ if (!command || command === 'dev') { process.exit(1) }) } else if (command === 'build') { - build(root, argv).catch((err) => { - console.error(c.red(`build error:\n`), err) - process.exit(1) - }) + build(root, argv) + .then(() => { + process.exit() + }) + .catch((err) => { + console.error(c.red(`build error:\n`), err) + process.exit(1) + }) } else if (command === 'serve') { serve(argv).catch((err) => { console.error(c.red(`failed to start server. error:\n`), err)