-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMR is broken #1785
Comments
@sapegin It feels like we could mock process, if it does not exist ;) |
Sure, if that helps ;-) |
Huh, weird, for me it helped but caused another error |
As @flunderpero wrote, it's caused due to a miss-match between the webpack version and the styleguidist webpack-configuration. Styleguidist targets v4 of webpack, while following the getting started docs v5 would be installed as latest version. If there are no other dependencies in you project to webpack at version 5, you should downgrade webpack by running |
I've ran into the same error, i'm using next js and sass (webpack 5). @flunderpero i tried your fix with the plugins options but didn't work. can you share your full solution? |
😴 This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week without any further activity. Consider opening a pull request if you still have this issue or want this feature. |
Current behavior
When I run
styleguidist server
I get this in the browser console:HMR is obviously not working. With webpack 5
process
is no longer defined and thewebpackHotDevClient.js
first looks intoprocess.env
and then falls back tolocation
in order to find the right HMR server. I think styleguidist just uses an old version.The problem has been reported elsewhere, too: vue-styleguidist/vue-styleguidist#1044
To reproduce
Just start styleguidist 11.1.6 in server mode and look into the browser console.
Workaround
My current workaround is to define
process.env
like this instyleguide.config.js
:The text was updated successfully, but these errors were encountered: