Skip to content

Experiment: replace babel-loader with esbuild-loader

Administrator requested to merge ns/esbuild into main

Created by: nicksnyder

This PR attempts to use esbuilder instead of babel for marginally improved build times. This is similar to a previous attempt by @umpox: https://github.com/sourcegraph/sourcegraph/compare/main...esbuild-loader

Related to: https://github.com/sourcegraph/sourcegraph/issues/18863

There have been other attempts to replace webpack entirely with esbuild, which would result in even more perf gains, but this PR is an attempt to make more marginal progress.

TODO

Current PR builds successfully, however at runtime I am getting a blank page and console error:

Uncaught ReferenceError: React is not defined

On line 20: https://github.com/sourcegraph/sourcegraph/blob/7ce62d3d3205c1aa848117328e8cececc3b2730a/client/web/src/enterprise/main.tsx#L15-L21

But I am not sure how to fix this.

Test plan

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading