File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ module.exports = (opts) => {
68
68
`Any plugins defined during the "done" lifecycle won't run when "styleExport" is set!`
69
69
) ;
70
70
}
71
+
72
+ // Watch any files already in the procesor
73
+ Object . keys ( processor . files ) . forEach ( ( file ) => this . addWatchFile ( file ) ) ;
71
74
} ,
72
75
73
76
watchChange ( file ) {
Original file line number Diff line number Diff line change @@ -50,9 +50,13 @@ module.exports = (config = false) => {
50
50
51
51
if ( style ) {
52
52
log ( "extract <style>" ) ;
53
-
53
+
54
54
file = "<style>" ;
55
-
55
+
56
+ if ( processor . has ( filename ) ) {
57
+ processor . invalidate ( filename ) ;
58
+ }
59
+
56
60
result = await processor . string (
57
61
filename ,
58
62
style [ 1 ]
@@ -102,11 +106,8 @@ module.exports = (config = false) => {
102
106
103
107
log ( "extract <link>" , external ) ;
104
108
105
- // When cleaning remove any files that've already been encountered, they need to be re-processed
106
- if ( config . clean ) {
107
- if ( external in processor . files ) {
108
- [ ...processor . dependents ( external ) , external ] . forEach ( ( entry ) => processor . remove ( entry ) ) ;
109
- }
109
+ if ( processor . has ( external ) ) {
110
+ processor . invalidate ( external ) ;
110
111
}
111
112
112
113
// Process the file
You can’t perform that action at this time.
0 commit comments