-
Notifications
You must be signed in to change notification settings - Fork 799
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
Uncaught TypeError: object is not a function makeNotifier.js:2 #17
Comments
Looks like Hot Loader tries to hot-load itself.. :-) I didn't see this issue because I only enabled hot loading for |
Aaaah, that solved it, works perfectly now, many thanks! FYI, I noticed that if I render a ChildComponent from a ParentComponent, when I modify ParentComponent the ChildComponent is re-rendered twice. |
PS. Btw, a stop-gap fix for PS2. I ended up doing just PS3. This is seriously cool! I can only imagine if we could one day run dev "unbundled" and avoid the delay to make it almost instant... |
I don't get it, what did you mean? |
@gaearon Ah (I realize what I wrote made no sense). Perhaps I'm wrong in this, but it seems to me that the biggest delay between updates comes from rebundling all the files and resolving requires. If dev files could be served "unbundled/individually" and hot replaced individually, it could probably make it instant. But there are probably tons of non-obvious issues with this, and probably concerns webpack more than react-hot-loader. (Just dreaming :)) |
Hot loader relies on Webpack's require/resolve machinery to work out-of-the-box so I doubt it's feasible. One way to make things faster is to try to re-implement hot loader as a single transforming loader (like JSX loader). Right now, it emits an additional module for each of your modules, so that may contribute to the delay. Emitting source maps also contributes to the delay. I think there may be some optimization opportunities in Webpack itself, I wonder if @sokra can weigh on this? |
@gaearon @sokra I did a little research (as I should have) and the issue is with source maps as you point out. As awesome as sokra/webpack is he had already fixed it, |
I'll leave this open because people are hitting it. |
Fixed via 02c9713 |
Oh, that's awesome 👍 (updated, works great). |
You helped me a while back getting started and I've slowly gotten it working as it should (it reloads correctly before adding react-hot-loader), but whenever I add
react-hot-loader
to loaders, I get the following error when loading the bundle.This is on a minimal test-project:
config: https://gist.github.com/syranide/73cb15ce83f2bc070b2d
devserver: https://gist.github.com/syranide/1713e9065e7221b3e64e
The text was updated successfully, but these errors were encountered: