File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 defineConfig as defineRsbuildConfig ,
1111 loadConfig as loadRsbuildConfig ,
1212 mergeRsbuildConfig ,
13+ logger as rsbuildLogger ,
1314 rspack ,
1415} from '@rsbuild/core' ;
1516import { glob } from 'tinyglobby' ;
@@ -81,6 +82,15 @@ import {
8182} from './utils/syntax' ;
8283import { loadTsconfig } from './utils/tsconfig' ;
8384
85+ rsbuildLogger . override ( {
86+ start : ( message ) => {
87+ // Soft clear, copied from https://github.com/lukeed/console-clear/blob/master/index.js.
88+ // "start" callback will only be called on watch mode (first compile not included).
89+ process . stdout . write ( '\x1B[H\x1B[2J' ) ;
90+ logger . start ( message ) ;
91+ } ,
92+ } ) ;
93+
8494/**
8595 * This function helps you to autocomplete configuration types.
8696 * It accepts a Rslib config object, or a function that returns a config.
You can’t perform that action at this time.
0 commit comments