I expect that webpack hot client updates normally.
Actual Behavior
After functioning correctly for a while, it crashes semi-randomly. The crash is produced because the function invalid in webpack-hot-client/lib/index.js expects filePath to be a string, but it was the number 1552056541813 at the time of crash.
<path>/node_modules/webpack-hot-client/lib/index.js:49
.replace(context, '')
^
TypeError: (filePath || "<unknown>").replace is not a function
at invalid (<path>/node_modules/webpack-hot-client/lib/index.js:49:8)
at comp.hooks.invalid.tap (<path>/node_modules/webpack-hot-client/lib/index.js:65:7)
at SyncHook.eval [as call] (eval at create (<path>/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
at Watchpack.watcher.compiler.watchFileSystem.watch (<path>/node_modules/webpack/lib/Watching.js:139:33)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at Watchpack.emit (events.js:214:7)
at Watchpack._onChange (<path>/node_modules/watchpack/lib/watchpack.js:118:7)
at Watchpack.<anonymous> (<path>/node_modules/watchpack/lib/watchpack.js:109:8)
at emitOne (events.js:116:13)
at Watcher.emit (events.js:211:7)
at DirectoryWatcher.<anonymous> (<path>/node_modules/watchpack/lib/DirectoryWatcher.js:238:13)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
Why does webpack return a number as filePath? I don't know, perhaps it is due to:
Using webpack chucks
Using default memory-fs as filesystem
Editing the entry file
In a directory watched by webpack, editing a file not included in the compilation .
Expected Behavior
I expect that webpack hot client updates normally.
Actual Behavior
After functioning correctly for a while, it crashes semi-randomly. The crash is produced because the function invalid in
webpack-hot-client/lib/index.js
expects filePath to be a string, but it was the number1552056541813
at the time of crash.Why does webpack return a number as filePath? I don't know, perhaps it is due to:
Code
How Do We Reproduce?