Skip to content

Commit de341d6

Browse files
committed
fix (theme): remove useless hook
1 parent e1f17c8 commit de341d6

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

config/webpack-image-sizes-plugin.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)