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) => {
6868 `Any plugins defined during the "done" lifecycle won't run when "styleExport" is set!`
6969 ) ;
7070 }
71+
72+ // Watch any files already in the procesor
73+ Object . keys ( processor . files ) . forEach ( ( file ) => this . addWatchFile ( file ) ) ;
7174 } ,
7275
7376 watchChange ( file ) {
Original file line number Diff line number Diff line change @@ -50,9 +50,13 @@ module.exports = (config = false) => {
5050
5151 if ( style ) {
5252 log ( "extract <style>" ) ;
53-
53+
5454 file = "<style>" ;
55-
55+
56+ if ( processor . has ( filename ) ) {
57+ processor . invalidate ( filename ) ;
58+ }
59+
5660 result = await processor . string (
5761 filename ,
5862 style [ 1 ]
@@ -102,11 +106,8 @@ module.exports = (config = false) => {
102106
103107 log ( "extract <link>" , external ) ;
104108
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 ) ;
110111 }
111112
112113 // Process the file
You can’t perform that action at this time.
0 commit comments