Skip to content

Commit

Permalink
enable hot reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyubinhan committed Sep 14, 2018
1 parent dbdc78a commit 387ce82
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ module.exports = {
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true,
plugins: ['react-hot-loader/babel'],
},
},
// "postcss" loader applies autoprefixer to our CSS.
Expand Down
53 changes: 53 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"promise": "8.0.1",
"raf": "3.4.0",
"react-dev-utils": "^5.0.2",
"react-hot-loader": "^4.3.7",
"resolve": "1.6.0",
"sass-loader": "^7.1.0",
"style-loader": "0.19.0",
Expand Down
3 changes: 2 additions & 1 deletion src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
//
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { hot } from 'react-hot-loader';
import configureStore from '../configureStore';
import Router from './router';

Expand All @@ -35,4 +36,4 @@ class App extends Component {
}
}

export default App;
export default hot(module)(App);

0 comments on commit 387ce82

Please sign in to comment.