Skip to content

Bundler comparison between babel, esbuild and swc with practical examples like basic/complex library and create-react-app.

License

Notifications You must be signed in to change notification settings

jackypan1989/js-bundler-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-bundler-comparison

Speed comparison between three trending JS/TS bundlers.

example projects

  • basic : single file project with cli (/basic)
  • complex : 1000 files project with cli (/complex)
  • cra : create-react-app (/cra)

result

Machine : MacBook Pro (15 inches,2017)
Experiments: 10 results of average

project bundler avg speed(ms)
basic babel 275
basic esbuild 58
basic swc 13
complex babel 3277
complex esbuild 232
complex swc 285
cra babel 4374
cra esbuild 3858
cra swc 3896

We can see huge improvement when you need large files transformation. In CRA case, it doesn't contain too much JS/JSX code lead to fewer improvement. In complex case, thanks to effective languages with hefty parallelism like Go (esbuild) and Rust (swc), you can get 10x up speed increase on your multi-core machine.

About

Bundler comparison between babel, esbuild and swc with practical examples like basic/complex library and create-react-app.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages