sourcegraph/dev
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 use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
auth-provider remove more ENTERPRISE=1 remnants (#57232) 2023-10-02 10:43:11 -07:00
authtest Remove dead code from org invites (#57279) 2023-10-04 15:50:44 +02:00
backcompat backcompat: print patches being applied (#57510) 2023-10-10 17:58:17 +00:00
bkstats bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
build-tracker logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
buildchecker buildchecker: update lock/unlock api for buildchecker (#57581) 2023-10-13 11:01:33 +02:00
check enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00
ci use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
codehost_testing e2e test: define base tst framework for easier scenario setup (#56774) 2023-10-10 16:30:00 +02:00
codeintel-qa chore: Delete commented out code (#57395) 2023-10-05 14:25:05 -07:00
corrupt-archives bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
db
depgraph codenotify: dr. fritz is kil (#57313) 2023-10-03 16:19:55 +00:00
deployment-lag-notifier Chore: move dev tools out of enterprise (#57354) 2023-10-04 22:56:50 +02:00
deployment-notifier logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
dx bazel: build //enterprise (#47327) 2023-02-07 15:30:46 +01:00
gqltest Bump p4-fusion to latest version in gitserver (#57754) 2023-10-20 18:14:42 +02:00
grafana
insight-data-gen Chore: move dev tools out of enterprise (#57354) 2023-10-04 22:56:50 +02:00
internal/cmd logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
linters [chore] Use consistent go-github versioning (#57391) 2023-10-06 10:48:18 +02:00
managedservicesplatform sg/msp: add arg to sync TFC workspace only for a specific environment (#56877) 2023-09-21 13:44:38 -07:00
nix ctags: fix push branch target (#57339) 2023-10-04 15:48:26 +02:00
perforce perforce: move perforce test helpers to perforce dir (#57700) 2023-10-18 16:13:03 +02:00
phabricator web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
pr-auditor [chore] Use consistent go-github versioning (#57391) 2023-10-06 10:48:18 +02:00
prometheus telemetrygateway: add exporter and service (#56699) 2023-09-20 05:20:15 +00:00
release release: 5.2.2 config and CHANGELOG for 5.2.1 (#57716) 2023-10-20 17:42:47 -04:00
scaletesting logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
sg use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
src-expose ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
team [chore] Use consistent go-github versioning (#57391) 2023-10-06 10:48:18 +02:00
tilt
tools sg: use bazel run universtal-ctags (#55944) 2023-08-18 16:02:46 +00:00
update-embeddings-list Use env var for token (#56327) 2023-09-01 12:08:28 +00:00
zoekt update zoekt to include updated grpc prometheus 2.0.0 version (#56735) 2023-09-18 19:51:59 +00:00
.gitignore
add_https_domain_to_hosts.sh
babel.bzl use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
bazel_buildkite_stamp_vars.sh bazel: test volatile variables with Percy (#51693) 2023-05-11 09:20:42 +00:00
bazel_stamp_vars.sh [backport] bzl: use old method for getting VERSION stamping (#53959) 2023-06-22 17:45:04 +02:00
BUILD.bazel use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
caddy.sh dep: bump up caddy version to 2.7.3 (#55606) 2023-08-16 09:48:26 +00:00
Caddyfile rename {webpack => web}.manifest.json (#57449) 2023-10-07 14:02:41 -10:00
check-tokens.sh Support detecting GCP SA keys (#56600) 2023-09-14 10:51:06 +02:00
CLA.txt
codecov.yml enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00
codeinsights-db.sh insights: update references to TimescaleDB (#32948) 2022-03-29 11:04:47 +01:00
comby-install-or-upgrade.sh update team reviewers (#50119) 2023-04-03 16:36:12 +02:00
defs.bzl Bump NodeJS to v18 (#56546) 2023-09-13 17:48:33 +02:00
dev-sourcegraph-server.sh
docsite.sh [docsite]: bump version (#56013) 2023-08-18 12:40:44 -06:00
drop-entire-local-database-and-redis.sh
esbuild.bzl use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
eslint-report-test.sh Revert "revert "bazel: improve ESLint rule" (#52853)" (#52878) 2023-06-04 19:06:39 -07:00
eslint.bzl bzl: fix warnings on eslint tests w/ timeout=short (#52923) 2023-06-05 14:40:27 +02:00
foreach-non-web-client-project.sh remove cody code that was moved to separate cody repo (#54729) 2023-07-10 00:31:47 -10:00
git-stats search: create and document git-stats script (#32663) 2022-03-16 13:41:17 +02:00
global-settings.json codeintel: Revive braindot (#49128) 2023-03-13 13:33:39 +00:00
go_defs.bzl bzl: enable go_test to turn off race detector (#54747) 2023-07-10 15:16:43 +00:00
go_stringer.bzl bzl: update to Go 1.20.5 (#54962) 2023-07-14 17:27:46 +02:00
go-mod-update.sh
js_lib.bzl bazel: implement custom ESLint Bazel rule (#52062) 2023-05-22 04:05:45 -07:00
licenses.sh rework plugin structure and implement frontside blogpost (#46883) 2023-02-15 11:49:51 +02:00
migrations.bzl bzl: rework migration schemas generation (#57511) 2023-10-10 17:19:47 +02:00
mocha.bzl use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
oci_defs.bzl Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
oci_deps.bzl Bump p4-fusion to latest version in gitserver (#57754) 2023-10-20 18:14:42 +02:00
proto.bzl fix: gazelle and proto generation (continuation of #49547) (#49713) 2023-04-11 11:36:45 +02:00
prune-pick.sh
redis-postgres.yml Update Postgres to 12.7 (#31933) 2022-03-03 14:39:52 -06:00
redis.conf
run-server-image.sh Make reindexing work in server image (#53256) 2023-06-14 15:17:30 +01:00
sass.bzl Buildifier fixes (#48691) 2023-03-07 10:15:26 +01:00
scip-ctags-dev local: fix scip-ctags install script (#57252) 2023-10-02 14:58:14 +00:00
scip-ctags-install.sh syntax-highlighter: initial ctags work (w/ musl scip-ctags) (#52643) 2023-05-30 17:19:39 -04:00
site-config.json Remove broken federation feature (#55161) 2023-07-20 17:30:32 +00:00
src-prof-services.json Add embeddings to server behind env var (#50288) 2023-04-04 16:45:50 +02:00
src-search-meta.sh GraphQL: remove deprecated resultCount field (#31573) 2022-02-21 12:03:36 -07:00
tool_deps.bzl ctags: update universal-ctags sha (#57314) 2023-10-03 16:42:27 +00:00
tools.go doc/telemetry: add exported events schema (#57106) 2023-09-28 13:51:44 -07:00
universal-ctags-dev sg: use bazel run universtal-ctags (#55944) 2023-08-18 16:02:46 +00:00
write_generated_to_source_files.bzl bzl: rework migration schemas generation (#57511) 2023-10-10 17:19:47 +02:00