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
output size | |
---|---|
rollup | ▉▉▉▉▉▉▉ 51.8 kB |
webpack | ▉▉▉▉▉▉▉ 51.6 kB |
parcel | ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 172 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.