Skip to content
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

Hot module reloading does not work in 8.0.x #1206

Closed
malyzeli opened this issue Nov 20, 2018 · 2 comments
Closed

Hot module reloading does not work in 8.0.x #1206

malyzeli opened this issue Nov 20, 2018 · 2 comments

Comments

@malyzeli
Copy link

malyzeli commented Nov 20, 2018

Current behavior

Hot module reloading does not work in default configuration, tested in minimal project environment.

Seems it is caused by something related to Webpack caching. HMR works again when cache: false option is added to webpackConfig section. I'm not sure what are the consequences of that.

To reproduce

I created minimal example project so anybody can look further into it.

Project link: https://github.com/malyzeli/styleguidist-issue-1188-example

See related #1188 for more info.

Expected behavior

If I remember correctly, HMR used to work without having to explicitly configure styleguidist.

@malyzeli malyzeli changed the title Hot module reloading does not work by default in 8.0.x Hot module reloading does not work in 8.0.x Nov 20, 2018
@sapegin
Copy link
Member

sapegin commented Nov 20, 2018

Duplicate of #1188. Feel free to send a pull request with a fix 👾

@malyzeli
Copy link
Author

malyzeli commented Nov 20, 2018

@sapegin Honestly, I would argue that this is the real issue, while #1188 should be labeled as duplicate. My reasoning is that description of #1188 suggests that the problem affects Create React App projects only, while the problem is much more essential because hot module reloading does not work by default as I reported here (while the official documentation says Styleguidist provides live development environment).

I believe more developers would look into that if stated explicitly that HMR is broken in general, because this affects everybody, not just CRA users. Seems important to me.

Also when I found that I can't make HMR working, I was trying to google some info about the topic. The only recent thing I found was issue #1188 which I didn't even open at first, because it says about CRA, which was not my case. If it was named "HMR does not work" I would read it immediately and it would help me to fix the project with workaround (and also to stop feeling like an idiot for not being able to set up Styleguidist with HMR even after 4 hours of fiddling with various configurations of Webpack and Babel).

I would also like to help solving the issue, but my knowledge of Webpack and Styleguidist internals is really minimal, I'm not even sure what really changes with disabling caching and what impact it may have on Styleguidist working. I did what I can - created minimal project, a playground for somebody who really knows what is he doing. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants