File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -150,19 +150,16 @@ class WebpackImageSizesPlugin {
150150 } )
151151
152152 // Add directories to watch
153- compiler . hooks . afterEnvironment . tap ( 'WebpackImageSizesPlugin' , ( ) => {
154- // Add directories to watched dependencies
155- compiler . hooks . compilation . tap ( 'WebpackImageSizesPlugin' , ( compilation ) => {
156- // Watch configuration directories
157- if ( fs . existsSync ( sizesPath ) ) {
158- compilation . contextDependencies . add ( sizesPath )
159- this . log ( 'log' , '📁 Added sizes directory to watch dependencies' )
160- }
161- if ( fs . existsSync ( tplPath ) ) {
162- compilation . contextDependencies . add ( tplPath )
163- this . log ( 'log' , '📁 Added tpl directory to watch dependencies' )
164- }
165- } )
153+ compiler . hooks . compilation . tap ( 'WebpackImageSizesPlugin' , ( compilation ) => {
154+ // Watch configuration directories
155+ if ( fs . existsSync ( sizesPath ) ) {
156+ compilation . contextDependencies . add ( sizesPath )
157+ this . log ( 'log' , '📁 Added sizes directory to watch dependencies' )
158+ }
159+ if ( fs . existsSync ( tplPath ) ) {
160+ compilation . contextDependencies . add ( tplPath )
161+ this . log ( 'log' , '📁 Added tpl directory to watch dependencies' )
162+ }
166163 } )
167164 }
168165
You can’t perform that action at this time.
0 commit comments