Skip to content

Add option for using esbuild-loader instead of babel-loader

Vitaly Slobodin requested to merge vs/webpack-esbuild into master

What does this MR do and why?

Adds esbuild-loader to be used instead of babel-loader behind a feature flag (environment variable to be more precise) WEBPACK_USE_ESBUILD_LOADER. The goal is to give esbuild some testing before enabling it by default if, of course, we found this tool works better than babel-loader.

Replace babel-loader with esbuild-loader to decrease the build time of our assets. This should be a transparent upgrade.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Create file env.runit inside of your GDK directory and add WEBPACK_USE_ESBUILD_LOADER=1 there. OR
  2. Start webpack-dev-server with env WEBPACK_USE_ESBUILD_LOADER=1 yarn dev-server

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vitaly Slobodin

Merge request reports