sourcegraph/cmd
Quinn Slack de613e92b6
use esbuild for client/web builds (#57365)
Use [esbuild](https://esbuild.github.io/) instead of Webpack for builds of `client/web`, for faster builds (dev and prod) and greater dev-prod parity. This PR completely removes all use of Webpack in this repository.

`client/web` is the last build target that still uses Webpack; all others have been recently migrated to esbuild. Most devs here have been using esbuild for local dev of `client/web` for the last 6-12 months anyway. The change here is that now our production builds will be built by esbuild.

All sg commands, integration/e2e tests, etc., continue to work as-is. The bundlesize report will take a while to stabilize because the new build products use different filenames.

## Benchmarks

Running `pnpm run generate && time pnpm -C client/web run task:gulp webBuild` and taking the `time` output from the last command:

- Webpack: 62.5s
- esbuild: 6.7s

Note: This understates esbuild's victory for 2 reasons: (1) because esbuild is building both the main and embed entrypoints, whereas Webpack only builds the main entrypoint in this benchmark) and (2) because a lot of it is in the fixed startup time of `gulp`; esbuild incremental rebuilds during local dev only take ~1s.

## Notes

We no longer use Babel to produce web builds (we use esbuild), so we don't need any Babel plugins that optimize the output or improve browser compatibility. Right now, Babel is only used by Jest (for tests) and by Bazel as an intermediate step.
2023-10-23 10:59:06 -07:00
..
batcheshelper Move batcheshelper out of enterprise (#54923) 2023-07-13 19:46:09 +02:00
blobstore uploadstore: list with prefix (#56538) 2023-09-15 14:49:02 +02:00
bundled-executor Build bundled-executor with shell build tag again (#55792) 2023-08-11 21:39:32 +02:00
cody-gateway logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
embeddings authz: Don't return error for subrepoperm constructor (#57471) 2023-10-09 21:30:43 +02:00
executor logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
executor-kubernetes Move executor-kubernetes out of enterprise (#56449) 2023-09-08 16:24:05 +02:00
frontend use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
gitserver Bump p4-fusion to latest version in gitserver (#57754) 2023-10-20 18:14:42 +02:00
loadtest logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
migrator bzl: rework how we populate the database schemas for migrator (#57591) 2023-10-23 15:40:09 +02:00
pings logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
precise-code-intel-worker logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
repo-updater logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
searcher logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
server use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
sourcegraph use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
symbols logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
telemetry-gateway logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
worker logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
README.md Reminder to keep architecture diagram in-sync (#36869) 2022-06-08 19:40:36 -07:00

This directory contains Sourcegraph services and binaries.

When a services is added, removed, or when a service's dependencies change, update our architecture diagram.