Skip to content

Commit

Permalink
fix: resolve two peer dep install warnings (#21176)
Browse files Browse the repository at this point in the history
This removes the peer dep on `webpack` from `react-dev-overlay`, as it is for types only.

This makes the peer dep on `webpack` optional for `react-refresh-utils`, as you can provide webpack via the constructor (how Next.js does).
  • Loading branch information
Timer committed Jan 15, 2021
1 parent 598997f commit 54bee4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/react-dev-overlay/package.json
Expand Up @@ -30,7 +30,6 @@
},
"peerDependencies": {
"react": "^16.9.0 || ^17",
"react-dom": "^16.9.0 || ^17",
"webpack": "^4 || ^5"
"react-dom": "^16.9.0 || ^17"
}
}
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/src/middleware.ts
Expand Up @@ -9,8 +9,8 @@ import {
} from 'source-map'
import { StackFrame } from 'stacktrace-parser'
import url from 'url'
// eslint-disable-next-line import/no-extraneous-dependencies
// @ts-ignore
// eslint-disable-next-line import/no-extraneous-dependencies
import webpack from 'webpack'
import { getRawSourceMap } from './internal/helpers/getRawSourceMap'
import { launchEditor } from './internal/helpers/launchEditor'
Expand Down
5 changes: 5 additions & 0 deletions packages/react-refresh-utils/package.json
Expand Up @@ -22,6 +22,11 @@
"react-refresh": "0.8.3",
"webpack": "^4 || ^5"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
}
},
"devDependencies": {
"react-refresh": "0.8.3"
}
Expand Down

0 comments on commit 54bee4f

Please sign in to comment.