Skip to content

Commit

Permalink
chore: upgrade react-scripts (#3584)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbreeze committed May 21, 2024
1 parent 125fc3d commit 2e7cf69
Show file tree
Hide file tree
Showing 3 changed files with 5,951 additions and 4,830 deletions.
8 changes: 4 additions & 4 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@
"@types/jest": "^29.5.10",
"@types/node": "^12.0.0",
"@types/react": "^16.9.3",
"@types/react-autocomplete": "^1.8.4",
"@types/react-dom": "^16.9.3",
"@types/react-form": "^2.16.1",
"@types/react-helmet": "^6.1.0",
"@types/react-router-dom": "^5.1.7",
"@types/react-form": "^2.16.1",
"@types/uuid": "^9.0.3",
"@types/react-autocomplete": "^1.8.4",
"copy-webpack-plugin": "^6.3.2",
"jest": "^29.7.0",
"mini-css-extract-plugin": "^1.3.9",
"raw-loader": "^4.0.2",
"react-scripts": "4.0.3",
"react-scripts": "5.0.1",
"sass": "^1.32.8",
"ts-jest": "^29.1.1",
"ts-loader": "^8.0.17",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-cli": "^4.5.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^3.11.2",
"webpack-merge": "^5.7.3"
},
Expand Down
17 changes: 7 additions & 10 deletions ui/src/app/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict;';

const crypto = require("crypto");
const crypto = require('crypto');
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);
crypto.createHash = (algorithm) => crypto_orig_createHash(algorithm == 'md4' ? 'sha256' : algorithm);

const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand Down Expand Up @@ -30,27 +30,24 @@ const config = {
rules: [
{
test: /\.tsx?$/,
loaders: [`ts-loader?allowTsInNodeModules=true&configFile=${path.resolve('./tsconfig.json')}`],
use: [`ts-loader?allowTsInNodeModules=true&configFile=${path.resolve('./tsconfig.json')}`],
},
{
test: /\.scss$/,
loader: 'style-loader!raw-loader!sass-loader',
use: ['style-loader', 'raw-loader', 'sass-loader'],
},
{
test: /\.css$/,
loader: 'style-loader!raw-loader',
use: ['style-loader', 'raw-loader'],
},
// https://github.com/fkhadra/react-toastify/issues/775#issuecomment-1149569290
{
test: /\.mjs$/,
include: /node_modules/,
type: "javascript/auto"
type: 'javascript/auto',
},
],
},
node: {
fs: 'empty',
},
plugins: [
new webpack.DefinePlugin({
SYSTEM_INFO: JSON.stringify({
Expand All @@ -63,7 +60,7 @@ const config = {
{from: 'src/assets', to: 'assets'},
{
from: 'node_modules/argo-ui/src/assets',
to: 'assets'
to: 'assets',
},
{
from: 'node_modules/@fortawesome/fontawesome-free/webfonts',
Expand Down
Loading

0 comments on commit 2e7cf69

Please sign in to comment.