Skip to content

Dropping Webpack in favour of Esbuild - #1747

Open
Janther wants to merge 2 commits into
mainfrom
esbuild
Open

Janther wants to merge 2 commits into
mainfrom
esbuild

Conversation

@Janther

@Janther Janther commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

webpack vs esbuild

webpack esbuild
Production build 3.04 s 0.20 s ~15× faster
Test build 0.51 s 0.17 s ~3× faster
standalone.js (gzip) 175.8 KB 172.1 KB −2.1%
standalone.js (uncompressed) 844.8 KB 796.7 KB −5.7%
Installed packages 437 384 −53
Build config 69 lines 84 lines +15

For esbuild

  • Much faster builds, which every standalone and browser test run (locally and in each CI bundle job) waits on.
  • Fewer dependencies: webpack and webpack-cli and their dependency trees go, replaced by esbuild, browserslist and browserslist-to-esbuild.
  • A slightly smaller bundle, mostly because webpack wraps Slang's top-level await modules as async modules. Most of the difference disappears once compressed.

For webpack

  • Native support for new URL('./x.wasm', import.meta.url). esbuild needs a small plugin of ours to handle Slang's .wasm files.

@Janther
Janther requested a review from fvictorio October 1, 2026 03:43
@Janther Janther added Developer experience Small or big nice to have features that will improve the ongoing developer experience over time. dependencies Pull requests that update a dependency file labels Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Developer experience Small or big nice to have features that will improve the ongoing developer experience over time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant