Skip to content

Commit 54ab3c8

Browse files
authoredJun 8, 2023
fix(build): make output warning message clearer (#12924)
1 parent 93eed46 commit 54ab3c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎packages/vite/src/node/build.ts

+5
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,11 @@ export function onRollupWarning(
910910
warn(warning)
911911
}
912912

913+
const tty = process.stdout.isTTY && !process.env.CI
914+
if (tty) {
915+
process.stdout.clearLine(0)
916+
process.stdout.cursorTo(0)
917+
}
913918
const userOnWarn = config.build.rollupOptions?.onwarn
914919
if (userOnWarn) {
915920
userOnWarn(warning, viteWarn)

0 commit comments

Comments
 (0)
Please sign in to comment.