fix(vite): allow disabling clear screen behaviour (#19531)

This commit is contained in:
Daniel Roe 2023-03-09 09:19:02 +00:00 committed by GitHub
parent ecfb3d2485
commit edaca1a299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ export default defineUntypedSchema({
jsxFragment: 'Fragment',
tsconfigRaw: '{}'
},
clearScreen: false,
clearScreen: true,
build: {
assetsDir: {
$resolve: async (val, get) => val ?? withoutLeadingSlash((await get('app')).buildAssetsDir)

View File

@ -23,7 +23,7 @@ export const logLevelMapReverse: Record<NonNullable<vite.UserConfig['logLevel']>
export function createViteLogger (config: vite.InlineConfig): vite.Logger {
const loggedErrors = new WeakSet<any>()
const canClearScreen = hasTTY && !isCI
const canClearScreen = hasTTY && !isCI && config.clearScreen
const clearScreen = canClearScreen ? clear : () => {}
function output (type: vite.LogType, msg: string, options: vite.LogErrorOptions = {}) {