-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Description
After upgrading to 0.2.0, I noticed the following error:
ERROR in ./node_modules/@pmmmwh/react-refresh-webpack-plugin/src/runtime/WHMEventSource.js
Module not found: Error: Can't resolve 'webpack-hot-middleware/client' in '[...]/node_modules/@pmmmwh/react-refresh-webpack-plugin/src/runtime'
I believe this is because webpack sees this require when bundling the injected runtime code:
| const client = require('webpack-hot-middleware/client'); |
And therefore tries to resolve and bundle that module. This code path isn't taken when a WDS client has been injected, but webpack doesn't know this at bundle time. My project doesn't use WHM so that module doesn't exist on my machine.
As a temporary workaround, installing WHM (npm i -D webpack-hot-middleware) fixes the issue.
/cc @blainekasten
eugene1g and robertlacokzet7777
Metadata
Metadata
Assignees
Labels
No labels