Comments (15)
Maybe this could help you: I had the same issue. At work it worked like a charm, at home sometimes yes, sometimes no. Thus, it had to be any timing issue. I played around with some WebpackDevServer options. Try this:
...
new WebpackDevServer(webpack(config), {
watchOptions: {
aggregateTimeout: 300,
poll: 300
},
})
...
Now, webpack hot reloading works for me.
Tried it with node 4.2.2, npm 3.5.0, webpack 1.12.9, webpack-dev-server 1.14.0
from react-hot-boilerplate.
I think, I found the solution for the problem. I found the clue here: https://webpack.github.io/docs/webpack-dev-server.html#working-with-editors-ides-supporting-safe-write
You should have a look at your IDE, in my case PHPStorm, and disable the safe mode. After that, hot reloading works like a charm, even without
hot: true,
watchOptions: {
aggregateTimeout: 300,
poll: 300
}
from react-hot-boilerplate.
hi guys. Not sure if you guys are still experiencing this problem. The solution that works for me was to remove "hot: true" from the server.js.
The reason for this is you are already using webpack.HotModuleReplacementPlugin along with the React Hot Loader module. Dan gives a specific note within his wiki to not call out --hot. --hot is the same as hot: true for Inline Dev Server.
See: http://gaearon.github.io/react-hot-loader/getstarted/
Also: https://webpack.github.io/docs/webpack-dev-server.html#inline-mode-with-node-js-api
from react-hot-boilerplate.
Having the same problem @cryptolemming
from react-hot-boilerplate.
Did not work for me at first. After installing Node 4 and the latest versions of node-gyp and npm hot module reloading works. Maybe my comment in this thread helps others: nodejs/node-gyp#629 (comment)
from react-hot-boilerplate.
Hi, for me it does not work as well, even if I have installed Node 4. Can't reload content at all.
from react-hot-boilerplate.
.., Sorry, have to rectify... For me, it does still not work. Sometimes hot code reloading works, sometimes not. Very strange...
from react-hot-boilerplate.
What I noticed this is all about some bad settings/packages/versions in node. At work I normally installed boilerplate and it was working like a charm. At home I have problems. I need to reinstall completely my env ^^
from react-hot-boilerplate.
I have experienced this issue. I tried @stevenpietzsch's solution and it seems working but no idea what I'm doing actually. Where the problem comes from is my concern now, any idea?
from react-hot-boilerplate.
Yep @stevenpietzsch your addition worked for me as well. So my server.js now looks like:
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
watchOptions: {
aggregateTimeout: 300,
poll: 300
},...
I have no idea what this addition changes though, care to clarify a bit?
from react-hot-boilerplate.
@stevenpietzsch Yeah! It works! Thansk! But there should not be a default configuration.
from react-hot-boilerplate.
This is all very confusing. I tried @Prophet32j's recommendation and that got my app refreshing completely upon each update. I then put back 'hot: true' and tried what @stevenpietzsch suggested and now it updates only the specific component when it detects a change, checking every .3 seconds I assume?
from react-hot-boilerplate.
thanks @stevenpietzsch, I'll look into this but I'm just using sublime and running from my terminal... will let you know if I find any kind of safe mode though.
from react-hot-boilerplate.
Closing as most of it is related to Webpack, and we can’t fix these issues here.
from react-hot-boilerplate.
Not sure this is relevant, but leaving a note just in case: I had a strange and subtle hot-reloading bug due to a caps case issue. When my file path used the incorrect casing, everything still worked except for hot-reloading on that module. The app was working, but hot-reloading failed silently.
I changed the incorrect import Home from '../components/Home';
to the correct import Home from '../Components/Home';
('C' -> 'c') and hot reloading worked again. Sneaky.
It looks like caps-case issues have bitten others in similar situations: #8
from react-hot-boilerplate.
Related Issues (20)
- React native view swiper HOT 1
- Using boilerplate with react-hot-loader/webpack loader HOT 1
- [HMR] Update failed: Error: Manifest request to /static/[hash].hot-update.json timed out. HOT 4
- Does the next branch work? HOT 1
- Version 3 Release Date HOT 1
- No error display with next branch? HOT 1
- Express res.sendfile(bundle) just loads browser with plain JS source in the actual window
- whether has the plan to release a standard version to use webpack to 2.x HOT 1
- Double WDS client in the next branch
- Next branch: after hot reload, redux-connected component not re-rendered in response to redux state change HOT 2
- No solution for server-side rendering HOT 1
- Bundle is 190kb from 150kb when updated from webpack v3
- Hot loading and iframes
- Webpack plugin is not working is `three-shaking` is enabled
- The guide page based on is gone, return 404.
- Receive error upon clone
- Hot Reload only works after changing files multiple times, very annoying. HOT 3
- Hola
- not working if I made some changes in functions HOT 1
- not working well with webpack 4 and happypack HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-hot-boilerplate.