Skip to content

Commit

Permalink
fix: upgrade react-hot-loader for example to work with latest React
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
agilgur5 committed Feb 19, 2022
1 parent 2781869 commit 206eea1
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 19 deletions.
113 changes: 97 additions & 16 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"jest-without-globals": "^0.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hot-loader": "^1.2.7",
"react-hot-loader": "^4.13.0",
"standard": "^13.0.2",
"style-loader": "^0.13.1",
"webpack": "^1.12.2",
Expand Down
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ module.exports = {
test: /\.js$/,
exclude: /node_modules/,
loaders: [
'react-hot',
query('babel-loader', { presets: ['es2015', 'react', 'stage-2'] })
query('babel-loader', {
presets: ['es2015', 'react', 'stage-2'],
plugins: ['react-hot-loader/babel']
})
]
}, {
test: /\.cssm$/, loader: 'style-loader!css-loader?modules'
Expand Down

0 comments on commit 206eea1

Please sign in to comment.