sourcegraph/doc/dev/background-information
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
..
app Chore: move app scripts out of enterprise (#57388) 2023-10-05 17:52:58 +00:00
architecture Move worker out of enterprise and combine main entrypoints (#57302) 2023-10-03 14:53:04 +02:00
batch_changes Merge enterprise and oss frontend (#56476) 2023-09-11 14:16:38 +02:00
bazel use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
ci remove CI reference auto-generated documentation (#57465) 2023-10-09 13:02:15 +00:00
codeintel codenotify: dr. fritz is kil (#57313) 2023-10-03 16:19:55 +00:00
codemonitoring Backend: remove EnterpriseDB (#54699) 2023-07-06 20:03:31 -06:00
insights Backend: remove enterprise/internal (#54872) 2023-07-12 22:51:02 +02:00
languages fix broken go-cmp link (#54206) 2023-08-15 13:26:55 -07:00
observability Fix typos in documentation (#52407) 2023-06-21 07:52:54 -07:00
sg add sg test bazel-web-integration (#57779) 2023-10-21 11:29:09 -10:00
sql doc: add "Migrations overview" page (#51300) 2023-05-01 21:29:42 -04:00
telemetry doc/admin/telemetry: telemetry export reference and changelog (#57606) 2023-10-18 08:21:30 -07:00
test-plans Docs bitbucket server test plan (#55631) 2023-08-08 10:12:31 +00:00
web use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
wolfi Wolfi Documentation (#51262) 2023-05-23 13:55:56 +00:00
adding_event_level_data.md docs: document new telemetry and telemetry gateway (#56868) 2023-09-22 10:58:08 -07:00
adding_ping_data.md Add documentation for new license verification (#53300) 2023-06-13 14:31:32 +02:00
backgroundroutine.md Merge enterprise and oss frontend (#56476) 2023-09-11 14:16:38 +02:00
basestore.md [doc] Add docs for basestore map scanner (#48281) 2023-02-27 17:10:33 +01:00
build_p4_fusion.md nix: update p4 fusion openssl3 (#51913) 2023-05-23 12:49:08 +02:00
commit_messages.md doc: refresh review guide, note required reviews (#29146) 2021-12-17 11:58:16 -08:00
data-usage-pipeline.md Move worker out of enterprise and combine main entrypoints (#57302) 2023-10-03 14:53:04 +02:00
dependencies_and_codegen.md doc: note that go generate scripts are deprecated (#35270) 2022-05-11 10:11:54 -07:00
exposing-services.md Move development docs from handbook to doc/dev (#18430) 2021-02-19 12:26:12 +01:00
flat_call_tree.svg Move "Testing web code" from handbook to doc/dev (#18777) 2021-03-02 15:46:34 +01:00
git_gc.md doc: Add background information on git-gc modes of operations (#47798) 2023-02-17 12:32:09 +00:00
github-api-oddities.md Docs and comment updates explaining GitHub rate limit decisions (#50088) 2023-03-29 10:11:36 +02:00
gitserver-api.md chore: remove ADRs (#57617) 2023-10-16 11:37:24 +00:00
goland.md docs: Fix typo (#44259) 2022-11-11 09:49:15 +08:00
graphql_api.md Add how-to page for adding a GraphQL query (#31315) 2022-02-22 06:24:11 +00:00
gRPC_internal_api.md doc(grpc): make notes actually appear as notes (#55041) 2023-07-17 21:40:44 +00:00
honeycomb.md Move development docs from handbook to doc/dev (#18430) 2021-02-19 12:26:12 +01:00
index.md docs: clean up development docs table of contents (#55175) 2023-07-20 20:36:50 -07:00
nested_call_tree.svg Move "Testing web code" from handbook to doc/dev (#18777) 2021-03-02 15:46:34 +01:00
oobmigrations.md Backend: remove enterprise/internal (#54872) 2023-07-12 22:51:02 +02:00
postgresql.md Docs: Replace hyphens in text with em-dashes (#42367) 2023-01-31 13:18:49 +01:00
pull_request_reviews.md Docs: Replace hyphens in text with em-dashes (#42367) 2023-01-31 13:18:49 +01:00
renovate.md web: enable cross-theme screenshots in Chromatic (#20349) 2021-04-28 22:19:55 +08:00
scim_api.md Backend: remove enterprise/internal (#54872) 2023-07-12 22:51:02 +02:00
scim_postman_collection.json SCIM: add docs (#49678) 2023-03-21 12:48:01 +00:00
security_patterns.md Merge enterprise and oss frontend (#56476) 2023-09-11 14:16:38 +02:00
tech_stack.md Update handbook links in doc (#26848) 2021-11-02 00:09:49 +08:00
testing_pr.md web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
testing_principles.md enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00
testing_web_code.md remove extension registry UI and related GraphQL API (#45891) 2022-12-22 00:10:56 -08:00
testing-pyramid.svg Move development docs from handbook to doc/dev (#18430) 2021-02-19 12:26:12 +01:00
workers.md Backend: remove enterprise/internal (#54872) 2023-07-12 22:51:02 +02:00