Skip to content

Commit 9a61132

Browse files
committed
fix: rspack doesn't have a watcher at first run
1 parent 623e1b0 commit 9a61132

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/webpack/plugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class I18NextHMRPlugin {
4848

4949
compiler.hooks.watchRun.tap(pluginName, (compiler) => {
5050
const watcher = (compiler.watchFileSystem.wfs || compiler.watchFileSystem).watcher;
51+
52+
if (!watcher) {
53+
return;
54+
}
55+
5156
const changedTimes = isWebpack5 ? watcher.getTimes() : watcher.mtimes;
5257

5358
const { startTime = 0 } = watcher || {};

0 commit comments

Comments
 (0)