@@ -43,7 +43,7 @@ export class Context {
43
43
this . options = resolveOptions ( rawOptions , this . root )
44
44
this . sourcemap = rawOptions . sourcemap ?? true
45
45
this . generateDeclaration = throttle ( 500 , this . _generateDeclaration . bind ( this ) , { noLeading : false } )
46
- this . _removeUnused = this . options . syncMode === 'overwrite '
46
+ this . _removeUnused = this . options . syncMode !== 'append '
47
47
48
48
if ( this . options . dumpComponentsInfo ) {
49
49
const dumpComponentsInfo = this . options . dumpComponentsInfo === true
@@ -80,13 +80,13 @@ export class Context {
80
80
return
81
81
82
82
this . _server = server
83
- this . _removeUnused = this . options . syncMode !== 'append '
83
+ this . _removeUnused = this . options . syncMode === 'overwrite '
84
84
this . setupWatcher ( server . watcher )
85
85
}
86
86
87
87
setupWatcher ( watcher : fs . FSWatcher ) {
88
88
const { globs } = this . options
89
-
89
+ this . _removeUnused = this . options . syncMode === 'overwrite'
90
90
watcher
91
91
. on ( 'unlink' , ( path ) => {
92
92
if ( ! matchGlobs ( path , globs ) )
@@ -112,7 +112,7 @@ export class Context {
112
112
*/
113
113
setupWatcherWebpack ( watcher : fs . FSWatcher , emitUpdate : ( path : string , type : 'unlink' | 'add' ) => void ) {
114
114
const { globs } = this . options
115
-
115
+ this . _removeUnused = this . options . syncMode === 'overwrite'
116
116
watcher
117
117
. on ( 'unlink' , ( path ) => {
118
118
if ( ! matchGlobs ( path , globs ) )
0 commit comments