Skip to content

Commit

Permalink
(fix) Suppress most version mismatch warnings (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher authored Apr 29, 2024
1 parent 7635f34 commit 2a3027a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/shell/esm-app-shell/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ module.exports = (env, argv = {}) => {
// See: https://github.com/webpack/webpack/issues/16125 and https://github.com/vercel/swr/issues/2356
obj['swr/'] = {
requiredVersion: version,
strictVersion: false,
singleton: true,
eager: true,
import: 'swr/',
Expand All @@ -347,6 +348,7 @@ module.exports = (env, argv = {}) => {
} else {
obj[depName] = {
requiredVersion: version ?? false,
strictVersion: false,
singleton: true,
eager: true,
import: depName,
Expand Down
2 changes: 2 additions & 0 deletions packages/tooling/webpack-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ export default (env: Record<string, string>, argv: Record<string, string> = {})
// See: https://github.com/webpack/webpack/issues/16125 and https://github.com/vercel/swr/issues/2356
obj['swr/'] = {
requiredVersion: peerDependencies['swr'] ?? false,
strictVersion: false,
singleton: true,
import: 'swr/',
shareKey: 'swr/',
Expand All @@ -297,6 +298,7 @@ export default (env: Record<string, string>, argv: Record<string, string> = {})
} else {
obj[depName] = {
requiredVersion: peerDependencies[depName] ?? false,
strictVersion: false,
singleton: true,
import: depName,
shareKey: depName,
Expand Down

0 comments on commit 2a3027a

Please sign in to comment.