Skip to content

Commit

Permalink
fix(build): make output warning message clearer (#12924)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea committed Jun 8, 2023
1 parent 93eed46 commit 54ab3c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vite/src/node/build.ts
Expand Up @@ -910,6 +910,11 @@ export function onRollupWarning(
warn(warning)
}

const tty = process.stdout.isTTY && !process.env.CI
if (tty) {
process.stdout.clearLine(0)
process.stdout.cursorTo(0)
}
const userOnWarn = config.build.rollupOptions?.onwarn
if (userOnWarn) {
userOnWarn(warning, viteWarn)
Expand Down

0 comments on commit 54ab3c8

Please sign in to comment.