From a0bd79e34a02ebf2a9eaf3859daf14a811e02d2e Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Mon, 27 Jun 2022 14:19:59 +0100 Subject: [PATCH] fix webpack --- Accounts/webpack.config.js | 5 ++++- CommonServer/package-lock.json | 6 ++++++ Dashboard/package-lock.json | 19 +++++++++++-------- Dashboard/webpack.config.js | 7 +++++-- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/Accounts/webpack.config.js b/Accounts/webpack.config.js index bb3c21f3d5..5969d075f5 100644 --- a/Accounts/webpack.config.js +++ b/Accounts/webpack.config.js @@ -22,7 +22,10 @@ module.exports = { publicPath: "//assets/", }, resolve: { - extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.css', '.scss'] + extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.css', '.scss'], + alias: { + react: path.resolve('./node_modules/react'), + } }, externals: { 'react-native-sqlite-storage': 'react-native-sqlite-storage' diff --git a/CommonServer/package-lock.json b/CommonServer/package-lock.json index e90e9a3beb..4eb4905a8e 100644 --- a/CommonServer/package-lock.json +++ b/CommonServer/package-lock.json @@ -64,12 +64,15 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@types/crypto-js": "^4.1.1", "@types/nanoid-dictionary": "^4.2.0", "@types/uuid": "^8.3.4", "axios": "^0.26.1", + "crypto-js": "^4.1.1", "moment": "^2.29.2", "nanoid": "^3.3.2", "nanoid-dictionary": "^4.3.0", + "process": "^0.11.10", "reflect-metadata": "^0.1.13", "slugify": "^1.6.5", "typeorm": "^0.3.6", @@ -8167,15 +8170,18 @@ "version": "file:../Common", "requires": { "@faker-js/faker": "^6.3.1", + "@types/crypto-js": "^4.1.1", "@types/jest": "^27.4.1", "@types/nanoid-dictionary": "^4.2.0", "@types/node": "^17.0.22", "@types/uuid": "^8.3.4", "axios": "^0.26.1", + "crypto-js": "^4.1.1", "jest": "^27.5.1", "moment": "^2.29.2", "nanoid": "^3.3.2", "nanoid-dictionary": "^4.3.0", + "process": "^0.11.10", "reflect-metadata": "^0.1.13", "slugify": "^1.6.5", "ts-jest": "^27.1.4", diff --git a/Dashboard/package-lock.json b/Dashboard/package-lock.json index c814b4fbd0..860328ba8f 100644 --- a/Dashboard/package-lock.json +++ b/Dashboard/package-lock.json @@ -9615,28 +9615,26 @@ "@fortawesome/react-fontawesome": "^0.1.18", "redux": "^4.2.0", "reactstrap": "^9.1.1", + "react-dom": "^18.1.0", "formik": "^2.2.9", "react-icons": "^4.4.0", "universal-cookie": "^4.0.4", + "react-router-dom": "^6.3.0", "history": "^5.3.0", "@fortawesome/fontawesome-svg-core": "^6.1.1", "react-spinners": "^0.12.0", + "react-router": "^6.3.0", "yup": "^0.32.11", "@ailibs/feather-react-ts": "^3.0.3", + "react": "^18.1.0", "@fortawesome/free-regular-svg-icons": "^6.1.1", "react-modern-drawer": "^1.1.1", "@fortawesome/free-solid-svg-icons": "^6.1.1", "prop-types": "^15.8.1" }, "devDependencies": { - "@types/node": "^17.0.23" - }, - "peerDependencies": { - "@types/react": "^18.0.9", - "react": "^18.1.0", - "react-dom": "^18.1.0", - "react-router": "^6.3.0", - "react-router-dom": "^6.3.0" + "@types/node": "^17.0.23", + "@types/react": "^18.0.9" } }, "node_modules/@babel/plugin-syntax-dynamic-import": { @@ -20614,13 +20612,18 @@ "@fortawesome/free-solid-svg-icons": "^6.1.1", "@fortawesome/react-fontawesome": "^0.1.18", "@types/node": "^17.0.23", + "@types/react": "^18.0.9", "Common": "file:../Common", "bootstrap": "^5.2.0-beta1", "formik": "^2.2.9", "history": "^5.3.0", "prop-types": "^15.8.1", + "react": "^18.1.0", + "react-dom": "^18.1.0", "react-icons": "^4.4.0", "react-modern-drawer": "^1.1.1", + "react-router": "^6.3.0", + "react-router-dom": "^6.3.0", "react-spinners": "^0.12.0", "reactstrap": "^9.1.1", "redux": "^4.2.0", diff --git a/Dashboard/webpack.config.js b/Dashboard/webpack.config.js index 9cf6b8a743..82bb2c6242 100644 --- a/Dashboard/webpack.config.js +++ b/Dashboard/webpack.config.js @@ -22,7 +22,10 @@ module.exports = { publicPath: "//assets/", }, resolve: { - extensions: ['.ts', '.tsx', '.js', '.json', '.css', '.scss'] + extensions: ['.ts', '.tsx', '.js', '.json', '.css', '.scss'], + alias: { + react: path.resolve('./node_modules/react'), + } }, externals: { 'react-native-sqlite-storage': 'react-native-sqlite-storage' @@ -36,7 +39,7 @@ module.exports = { ...readEnvFile('./.env') } } - }), + }), ], module: { rules: [