diff --git a/datahub-web-react/package.json b/datahub-web-react/package.json index 5b30f07e7b58c..21597f8c37d0f 100644 --- a/datahub-web-react/package.json +++ b/datahub-web-react/package.json @@ -93,7 +93,7 @@ "build": "yarn run generate && CI=false NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' vite build", "test": "NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' vitest", "test-coverage": "yarn test run --coverage", - "generate": "graphql-codegen --config codegen.yml", + "generate": "NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' graphql-codegen --config codegen.yml", "lint": "eslint . --ext .ts,.tsx --quiet && yarn format-check && yarn type-check", "lint-fix": "eslint '*/**/*.{ts,tsx}' --quiet --fix && yarn format", "format-check": "prettier --check src", diff --git a/datahub-web-react/vite.config.ts b/datahub-web-react/vite.config.ts index 2532b24067754..e0f1147c7317d 100644 --- a/datahub-web-react/vite.config.ts +++ b/datahub-web-react/vite.config.ts @@ -68,6 +68,11 @@ export default defineConfig(({ mode }) => { envPrefix: 'REACT_APP_', build: { outDir: 'dist', + target: 'esnext', + minify: 'esbuild', + reportCompressedSize: false, + // Limit number of worker threads to reduce CPU pressure + workers: 3, // default is number of CPU cores }, server: { open: false,