https://github.com/Rich-Harris/bundler-comparison
A quick test to see how various bundlers compare when bundling the Lodash source code.
https://github.com/Rich-Harris/bundler-comparison
Last synced: about 1 year ago
JSON representation
A quick test to see how various bundlers compare when bundling the Lodash source code.
- Host: GitHub
- URL: https://github.com/Rich-Harris/bundler-comparison
- Owner: Rich-Harris
- Created: 2020-07-07T02:38:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T19:52:31.000Z (over 3 years ago)
- Last Synced: 2024-08-04T01:27:27.451Z (almost 2 years ago)
- Language: JavaScript
- Size: 2.06 MB
- Stars: 66
- Watchers: 4
- Forks: 6
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - bundler-comparison - Harris | 58 | (JavaScript)
README
# bundler-comparison
A quick test to see how various bundlers compare when bundling the Lodash source code.
```
git clone git@github.com:Rich-Harris/bundler-comparison.git
git submodule update --init --recursive
npm i
npm run build
```
## Results
| | output size |
|---------|-------------------------------------------------------|
| rollup | ▉▉▉▉▉▉ 53.9 kB |
| esbuild | ▉▉▉▉▉▉ 59.5 kB |
| webpack | ▉▉▉▉▉▉▉ 64.2 kB |
| fusebox | ▉▉▉▉▉▉▉▉▉▉▉ 99.8 kB |
| parcel | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 214 kB |
| | gzipped size |
|---------|-------------------------------------------------------|
| rollup | ▉▉▉▉▉▉▉▉▉▉▉ 16.9 kB |
| webpack | ▉▉▉▉▉▉▉▉▉▉▉▉▉ 18.6 kB |
| esbuild | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 21.2 kB |
| fusebox | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 23.3 kB |
| parcel | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 35.8 kB |
Note: Parcel gets a dramatically better outcome with the `--experimental-scope-hoisting` option (smaller than webpack, almost as small as Rollup). Parcel 2 enables this option automatically, but I couldn't get it to create a non-empty bundle.