Build zuul web with esbuild

This uses react-app-rewired and react-app-required-esbuild to replace
Babel with esbuild to build zuul-web. We do this to speed things up as
Babel is quite slow (6 minutes or so in CI) and esbuild should be much

Change-Id: If8f59c0e93e3b8c963ac967e93ffe52b6ba54e06
This commit is contained in:
Clark Boylan 2022-10-10 09:31:30 -07:00
parent b163a52c25
commit c07bacf4b5
3 changed files with 13058 additions and 13202 deletions

web/config-overrides.js Normal file
View File

@ -0,0 +1,11 @@
const rewiredEsbuild = require("react-app-rewired-esbuild");
module.exports = function override(config, env) {
// No additional config just want esbuild instead of babel
return rewiredEsbuild()(config, env);
// use `customize-cra`
const { override } = require("customize-cra");
module.exports = override(rewiredEsbuild());

View File

@ -48,18 +48,21 @@
"nanoid": "2.1.11"
"devDependencies": {
"customize-cra": "^1.0.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-standard": "^4.0.1",
"react-app-rewired": "^2.2.1",
"react-app-rewired-esbuild": "^0.0.11",
"yarn": "^1.16.0"
"scripts": {
"start:opendev": "REACT_APP_ZUUL_API='' react-scripts start",
"start:openstack": "REACT_APP_ZUUL_API='' react-scripts start",
"start:multi": "REACT_APP_ZUUL_API='' react-scripts start",
"start": "react-scripts start",
"build": "react-scripts --max_old_space_size=4096 build",
"test": "react-scripts test --env=jsdom --watchAll=false",
"start:opendev": "REACT_APP_ZUUL_API='' react-app-rewired start",
"start:openstack": "REACT_APP_ZUUL_API='' react-app-rewired start",
"start:multi": "REACT_APP_ZUUL_API='' react-app-rewired start",
"start": "react-app-rewired start",
"build": "react-app-rewired --max_old_space_size=4096 build",
"test": "react-app-rewired test --env=jsdom --watchAll=false",
"eject": "react-scripts eject",
"lint": "eslint --ext .js --ext .jsx src",
"lint-fix": "eslint --ext .js --ext .jsx --fix src"

File diff suppressed because it is too large Load Diff