chore: upgrade react-scripts to 5.0.1

This commit is contained in:
thecodrr
2022-07-26 23:15:57 +05:00
parent 14fc94e210
commit d0b75e853c
3 changed files with 25 additions and 18 deletions

View File

@@ -16,9 +16,9 @@
"@notesnook/crypto": "^1.0.0",
"@notesnook/desktop": "file:desktop",
"@rebass/forms": "^4.0.6",
"@streetwriters/editor": "^1.1.3",
"@streetwriters/notesnook-core": "^7.3.1",
"@streetwriters/theme": "1.0.0",
"@streetwriters/editor": "^1.1.4",
"@streetwriters/notesnook-core": "^7.3.3",
"@streetwriters/theme": "^1.0.1",
"allotment": "^1.12.1",
"async-mutex": "^0.3.2",
"axios": "^0.21.4",
@@ -49,7 +49,7 @@
"react-loading-skeleton": "^3.1.0",
"react-modal": "^3.12.1",
"react-qrcode-logo": "^2.2.1",
"react-scripts": "^4.0.3",
"react-scripts": "^5.0.1",
"react-scroll-sync": "^0.9.0",
"react-toggle": "^4.1.2",
"react-virtuoso": "^2.4.0",
@@ -62,7 +62,7 @@
"zustand": "^3.3.1"
},
"devDependencies": {
"@playwright/test": "^1.16.0",
"@playwright/test": "^1.24.1",
"@types/file-saver": "^2.0.5",
"@types/hookrouter": "^2.2.5",
"@types/node-fetch": "^2.5.10",
@@ -73,6 +73,7 @@
"@types/rebass__forms": "^4.0.6",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"buffer": "^6.0.3",
"chalk": "^4.1.0",
"dotenv": "^10.0.0",
"env-cmd": "^10.1.0",
@@ -98,7 +99,7 @@
"preinstall": "./scripts/build-deps.sh",
"start": "env-cmd -e all,dev,web react-scripts start",
"start:desktop": "env-cmd -e all,desktop react-scripts start",
"build": "env-cmd -e all,web react-scripts build",
"build": "env-cmd -e all,web react-scripts --max_old_space_size=8092 build",
"build:beta": "env-cmd -e all,web,beta react-scripts build",
"build:profile": "env-cmd -e all,web react-scripts build --profile",
"build:desktop": "env-cmd -e all,desktop react-scripts build",

View File

@@ -1,12 +0,0 @@
diff --git a/node_modules/react-scripts/config/webpack.config.js b/node_modules/react-scripts/config/webpack.config.js
index 26c2a65..9a8c3c0 100644
--- a/node_modules/react-scripts/config/webpack.config.js
+++ b/node_modules/react-scripts/config/webpack.config.js
@@ -782,6 +782,7 @@ module.exports = function (webpackEnv) {
// Some libraries import Node modules but don't use them in the browser.
// Tell webpack to provide empty mocks for them so importing them works.
node: {
+ crypto: 'empty',
module: 'empty',
dgram: 'empty',
dns: 'mock',

View File

@@ -0,0 +1,18 @@
diff --git a/node_modules/react-scripts/config/webpack.config.js b/node_modules/react-scripts/config/webpack.config.js
index e465d8e..35fcbd4 100644
--- a/node_modules/react-scripts/config/webpack.config.js
+++ b/node_modules/react-scripts/config/webpack.config.js
@@ -304,6 +304,13 @@ module.exports = function (webpackEnv) {
},
resolve: {
// This allows you to set a fallback for where webpack should look for modules.
+ fallback: {
+ crypto: false,
+ module: false,
+ dgram: false,
+ path: false,
+ url: false,
+ },
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebook/create-react-app/issues/253