mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(vite): allow disabling clear screen behaviour (#19531)
This commit is contained in:
parent
ecfb3d2485
commit
edaca1a299
@ -62,7 +62,7 @@ export default defineUntypedSchema({
|
|||||||
jsxFragment: 'Fragment',
|
jsxFragment: 'Fragment',
|
||||||
tsconfigRaw: '{}'
|
tsconfigRaw: '{}'
|
||||||
},
|
},
|
||||||
clearScreen: false,
|
clearScreen: true,
|
||||||
build: {
|
build: {
|
||||||
assetsDir: {
|
assetsDir: {
|
||||||
$resolve: async (val, get) => val ?? withoutLeadingSlash((await get('app')).buildAssetsDir)
|
$resolve: async (val, get) => val ?? withoutLeadingSlash((await get('app')).buildAssetsDir)
|
||||||
|
@ -23,7 +23,7 @@ export const logLevelMapReverse: Record<NonNullable<vite.UserConfig['logLevel']>
|
|||||||
|
|
||||||
export function createViteLogger (config: vite.InlineConfig): vite.Logger {
|
export function createViteLogger (config: vite.InlineConfig): vite.Logger {
|
||||||
const loggedErrors = new WeakSet<any>()
|
const loggedErrors = new WeakSet<any>()
|
||||||
const canClearScreen = hasTTY && !isCI
|
const canClearScreen = hasTTY && !isCI && config.clearScreen
|
||||||
const clearScreen = canClearScreen ? clear : () => {}
|
const clearScreen = canClearScreen ? clear : () => {}
|
||||||
|
|
||||||
function output (type: vite.LogType, msg: string, options: vite.LogErrorOptions = {}) {
|
function output (type: vite.LogType, msg: string, options: vite.LogErrorOptions = {}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user