-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V2 -- Updated Dependencies, Webpack, Hot reloader (#72)
* Updated dependencies, updated webpack config * Introduced react-hot-loader v3.0.0 beta * Updated webpack config to new "style", there might still be some issues with the css related loaders, we will see in the generator. * #60 I have not encountered this problem during testing * Added fs require * Moved react-hot-loader to regular dependecies
- Loading branch information
Showing
7 changed files
with
126 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { AppContainer } from 'react-hot-loader'; | ||
import App from './components/App'; | ||
|
||
ReactDOM.render(<App />, document.getElementById('app')); | ||
ReactDOM.render( | ||
<AppContainer> | ||
<App /> | ||
</AppContainer>, | ||
document.getElementById('app') | ||
); | ||
|
||
if (module.hot) { | ||
module.hot.accept('./components/App', () => { | ||
const NextApp = require('./components/App').default; // eslint-disable-line global-require | ||
ReactDOM.render( | ||
<AppContainer> | ||
<NextApp /> | ||
</AppContainer>, | ||
document.getElementById('app') | ||
); | ||
}); | ||
} |