Skip to content

Commit

Permalink
chore: bump webpack and fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladinlight committed Sep 16, 2024
1 parent 7945b06 commit bf2d101
Show file tree
Hide file tree
Showing 3 changed files with 780 additions and 185 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@
"path-browserify": "^1.0.1",
"pify": "^5.0.0",
"prettier": "^3.0.3",
"react-app-rewired": "^2.1.9",
"react-app-rewired": "^2.2.1",
"react-dev-utils": "^12.0.1",
"react-scripts": "^5.0.1",
"readline-sync": "^1.4.10",
"reselect-tools": "^0.0.7",
Expand All @@ -294,8 +295,9 @@
"vite-tsconfig-paths": "^4.2.3",
"vitest": "1.1.1",
"web3-types": "^0.1.0-alpha.0",
"webpack": "5.76.0",
"webpack-subresource-integrity": "^5.0.0"
"webpack": "5.94.0",
"webpack-subresource-integrity": "^5.0.0",
"workbox-webpack-plugin": "^7.1.0"
},
"peerDependencies": {
"lit-html": "^2.6.1"
Expand All @@ -306,6 +308,7 @@
"[email protected]": "patch:friendly-challenge@npm%3A0.9.2#./.yarn/patches/friendly-challenge-npm-0.9.2-db0cad46d3.patch",
"react-dom@^18.2.0": "patch:react-dom@npm%3A18.2.0#./.yarn/patches/react-dom-npm-18.2.0-dd675bca1c.patch",
"react-dev-utils/fork-ts-checker-webpack-plugin": "^6.5.3",
"react-scripts/webpack": "5.94.0",
"p-queue": "^6.6.2",
"web3": "4.2.1-dev.a0d6730.0",
"@wherever/react-notification-feed/wagmi": "^0.10.12",
Expand Down
6 changes: 3 additions & 3 deletions react-app-rewired/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const reactAppRewireConfig = {
// Remove synthetic CSP/SRI/CID environment variables from DefinePlugin.
_.merge(config, {
plugins: (config.plugins ?? []).map(plugin => {
if (plugin.constructor.name !== 'DefinePlugin') return plugin
if (plugin?.constructor.name !== 'DefinePlugin') return plugin

const definitions = JSON.parse(
JSON.stringify((plugin as unknown as { definitions: unknown }).definitions),
Expand Down Expand Up @@ -203,7 +203,7 @@ const reactAppRewireConfig = {
const env = Object.fromEntries(
Object.entries(
(config.plugins ?? [])
.filter(plugin => plugin.constructor.name === 'DefinePlugin')
.filter(plugin => plugin?.constructor.name === 'DefinePlugin')
.reduceRight<webpack.DefinePlugin | undefined>(
(_a, x) => x as webpack.DefinePlugin,
undefined,
Expand All @@ -220,7 +220,7 @@ const reactAppRewireConfig = {
? {
plugins: [
...(config.plugins ?? []).map(plugin => {
switch (plugin.constructor.name) {
switch (plugin?.constructor.name) {
case 'DefinePlugin': {
// Remove all REACT_APP_* 'process.env' entries from DefinePlugin; these will
// be pulled from env.json via src/config.ts and src/env/index.ts.
Expand Down
Loading

0 comments on commit bf2d101

Please sign in to comment.