-
Notifications
You must be signed in to change notification settings - Fork 214
Conversation
@eliperelman The reason treeherder-manifest is blowing up is because you are missing some react hot loader setup in that repository and by default we are allowing react-hot-loader. To solve this issue, you will need to have a special setup. First, you will need to have Second, if an application is using react-router, then there's some extra setup. See this file to see how to handle routes. If you're simply trying to test HMR, you can clone helfi92/neutrino-test and do |
Can you replicate the issue you are having with helfi92/neutrino-test? |
@helfi92 I've got some weirdness going on that is causing issues. In my yarn.lock:
If I go into packages/neutrino-preset-react/node_modules/react-hot-loader/package.json: "version": "1.3.0", wtf. I'm not sure how yarn installed this crap version of react-hot-loader, but I'll see if I can fix it. |
So weird, ew! |
Wow, so every time I would install react-hot-loader@next into treeherder-manifest, it would replace the react-hot-loader in the react preset with the stable version because it was linked. I don't know how it happens, but I just injected the correct version manually using npm and it worked! Ugh.... |
@@ -8,7 +8,9 @@ | |||
"author": "Eli Perelman <eli@eliperelman.com>", | |||
"license": "MPL-2.0", | |||
"scripts": { | |||
"bootstrap": "oao bootstrap", | |||
"fix-line-endings": "find packages -name package.json | xargs sed -i '' -e '$a\\'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is temporary until oao fixes missing line endings in re-writing package.json
s.
FYI, here is what my index.js file looks like now inside treeherder-manifest: import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './ui/App';
const load = () => {
render((
<AppContainer>
<App />
</AppContainer>
), document.getElementById('root'));
};
if (module.hot) {
module.hot.accept('./ui/App', load);
}
load(); |
https://github.com/gaearon/react-hot-loader/tree/next/docs