Skip to content

Commit 215f546

Browse files
committed
react-hot-loader upgrade
1 parent c1bae2d commit 215f546

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

dev/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from 'react';
2-
import {hot} from 'react-hot-loader';
2+
import {hot} from 'react-hot-loader/root';
33
import plotly from 'plotly.js/dist/plotly-with-meta';
44
import '../src/styles/main.scss';
55
import brace from 'brace'; // eslint-disable-line no-unused-vars
@@ -275,4 +275,4 @@ class App extends Component {
275275
}
276276
}
277277

278-
export default hot(module)(App);
278+
export default hot(App);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"@babel/preset-env": "^7.3.4",
4040
"@babel/preset-react": "^7.0.0",
4141
"@babel/traverse": "^7.3.4",
42+
"@hot-loader/react-dom": "^16.8.3",
4243
"@percy-io/percy-storybook": "^2.1.0",
4344
"@storybook/react": "^4.1.13",
4445
"autoprefixer": "^9.4.9",

webpack.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ module.exports = {
3939
},
4040
],
4141
},
42-
42+
resolve: {
43+
alias: {
44+
'react-dom': '@hot-loader/react-dom',
45+
},
46+
},
4347
plugins: [new webpack.IgnorePlugin(/vertx/)],
4448
devServer: {
4549
open: true,

0 commit comments

Comments
 (0)