mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
fix(vite): dim repeat count in logs (#29392)
This commit is contained in:
parent
ca65f150b3
commit
79f55e348e
@ -1,5 +1,6 @@
|
||||
import type * as vite from 'vite'
|
||||
import { logger } from '@nuxt/kit'
|
||||
import { colorize } from 'consola/utils'
|
||||
import { hasTTY, isCI } from 'std-env'
|
||||
import clear from 'clear'
|
||||
import type { NuxtOptions } from '@nuxt/schema'
|
||||
@ -61,8 +62,7 @@ export function createViteLogger (config: vite.InlineConfig): vite.Logger {
|
||||
|
||||
const prevLevel = logger.level
|
||||
logger.level = logLevelMapReverse[config.logLevel || 'info']
|
||||
// TODO: colorize counter after https://github.com/unjs/consola/pull/166
|
||||
logger[type](msg + (sameAsLast ? ` (x${duplicateCount + 1})` : ''))
|
||||
logger[type](msg + (sameAsLast ? colorize('dim', ` (x${duplicateCount + 1})`) : ''))
|
||||
logger.level = prevLevel
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user