Skip to content

Commit

Permalink
reenable hot reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyubinhan committed Sep 21, 2018
1 parent f8447ea commit adf25b0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ module.exports = {
include: paths.appSrc,
loader: require.resolve('babel-loader'),
options: {

// This is a feature of `babel-loader` for webpack (not Babel itself).
// 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
10 changes: 5 additions & 5 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 @@ -67,6 +67,7 @@
"promise": "8.0.1",
"raf": "3.4.0",
"react-dev-utils": "^5.0.2",
"react-hot-loader": "^4.3.11",
"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 adf25b0

Please sign in to comment.