Skip to content

Commit f6cfd69

Browse files
committed
fix: upgrade react-hot-loader for example to work with latest React
- was getting a difficult-to-interpret error when running `npm start` - https://stackoverflow.com/q/40652327/3431180 - fixed by upgrading react-hot-loader and updating the config accordingly
1 parent ec47311 commit f6cfd69

File tree

3 files changed

+102
-19
lines changed

3 files changed

+102
-19
lines changed

package-lock.json

Lines changed: 97 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"jest-without-globals": "^0.0.2",
7272
"react": "^17.0.2",
7373
"react-dom": "^17.0.2",
74-
"react-hot-loader": "^1.2.7",
74+
"react-hot-loader": "^4.13.0",
7575
"standard": "^13.0.2",
7676
"style-loader": "^0.13.1",
7777
"webpack": "^1.12.2",

webpack.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ module.exports = {
1515
test: /\.js$/,
1616
exclude: /node_modules/,
1717
loaders: [
18-
'react-hot',
19-
query('babel-loader', { presets: ['es2015', 'react', 'stage-2'] })
18+
query('babel-loader', {
19+
presets: ['es2015', 'react', 'stage-2'],
20+
plugins: ['react-hot-loader/babel']
21+
})
2022
]
2123
}, {
2224
test: /\.cssm$/, loader: 'style-loader!css-loader?modules'

0 commit comments

Comments
 (0)