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

How to make this package work with Flow Router SSR? #17

Closed
kokjinsam opened this issue Mar 29, 2016 · 7 comments
Closed

How to make this package work with Flow Router SSR? #17

kokjinsam opened this issue Mar 29, 2016 · 7 comments

Comments

@kokjinsam
Copy link

I keep getting this error when I do meteor with FlowRouter SSR:

                    throw(ex);
W20160329-11:21:04.996(-5)? (STDERR)                              ^
W20160329-11:21:05.030(-5)? (STDERR) Error: locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using `env` section in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr

I had to do meteor --production or explicitly set BABEL_ENV=production meteor to make the error go away. The problem is if I do this, I don't get instant react update. Any pointers to fix this would be greatly appreciated!

@gadicc
Copy link
Owner

gadicc commented Mar 29, 2016

I admit this was something I didn't originally consider (needing different babel config for the server/client), but it was recently pointed out to me by jedwards here. You can see the discussion in there, or, in short, this will be addressed in the next release or two.

@gadicc
Copy link
Owner

gadicc commented Mar 30, 2016

@sammkj can you try gadicc:ecmascript-hot@1.3.0-2 after reading the upgrade notes in the History.md and new sample .babelrc files at the end of the README and see if this solves this for you?

@kokjinsam
Copy link
Author

thank you @gadicc for fixing this! However I don't think this is working with FlowRouter SSR. FR requires a shared folder to make SSR work. It seems like the new update is looking for client folder only.

@gadicc
Copy link
Owner

gadicc commented Mar 30, 2016

Ah, damn :( No, we look for any client compilation now, however, the server restart (from a change in server/both code) kills react-hotloader before it can get the update across. I'll have to think about this some more. Thanks for the update.

@gadicc
Copy link
Owner

gadicc commented Apr 2, 2016

I think this should be working now, can you check when you have a chance?

Since gadicc:ecmascript-hot@1.3.0_5 (just remove the @Version and meteor update now).

@kokjinsam
Copy link
Author

😱 I just tested the newest version. It's working perfectly! However it's not nearly as fast as reloading components in client folder.

@gadicc
Copy link
Owner

gadicc commented Apr 4, 2016

Great stuff! (for the first part)

Thanks for reporting back.

I'm going to close this issue and track the speed part in #26.

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