From 5e72befa70ff5a563929be44eca412cbcef99bec Mon Sep 17 00:00:00 2001 From: Konstantinos Markopoulos Date: Wed, 4 Dec 2024 22:13:21 +0200 Subject: [PATCH] Add react-scan for performance profiling (#1065) --- packages/website/README.md | 4 ++++ packages/website/package.json | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/website/README.md b/packages/website/README.md index cab390e9e..bef06d63d 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -58,6 +58,10 @@ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. +### `yarn scan` + +Runs the app in development mode and scans the application for performance issues using `react-scan`. + ### `yarn eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** diff --git a/packages/website/package.json b/packages/website/package.json index 85ef8ae4c..516d97d1b 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -8,6 +8,7 @@ "test": "react-scripts --expose-gc test --logHeapUsage --maxWorkers=4", "eject": "react-scripts eject", "lint": "eslint --ext .js,.jsx,.ts,.tsx ./src --ignore-path .gitignore --max-warnings 0", + "scan": "yarn start & npx react-scan@latest localhost:3000", "precommit": "lint-staged", "deploy:prod": "dotenv -e .env.prod yarn build && yarn run firebase deploy --only hosting:prod-target", "deploy:staging": "dotenv -e .env.staging yarn build && yarn run firebase deploy --only hosting:staging-target",