This project was made to benchmark different bundlers under different constraints.
Current bundlers measured:
- esbuild
- parcel
- rollup
- webpack
These benchmarks use a generated application using yarn generate
.
git clone [email protected]:j0sh77/bundler-benchmarking.git
cd bundler-benchmarking
yarn install
yarn generate -c $CHILDREN -d $DEPTH -s $STYLES
Generates a sample site where a tree of react components is created.
Each node of the tree has c
children and the tree is of depth d
.
If s
is true
, a stylesheet will be generated for each component.
yarn build:$BUNDLER
yarn serve
yarn test
Runs the test suite defined in scripts/test.js
.
Pull requests are welcome and encouraged!
If you'd like to add a new bundler, please do!
- Add the needed dependencies
- Create the config file (if any)
- Add a
build:$BUNDLER
script topackage.json
- Add the bundler name to
availableBundlers
in./tests.js
- Run
yarn test
- Update this README's results below
- Measure builds in a
watch
mode - Measure a second rebuild
- Measure a second rebuild with files changed
- Run in docker container to grab peak memory usage
- Better results output
View the results of the test runs here.