Use esbuild instead of rollup
Open
Nobody has claimed this yet.
maintenance
refactoring
- Dominant language
- JavaScript
- Stars
- 806
- Forks
- 434
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 32
Description
It appears to be a lot faster!
Building respec-highlight (rollup: 2.1s, esbuild: 0.7s):
# rollup
$ time rollup -c worker/rollup.config.js
worker/respec-highlight.js → builds/...
created builds/ in 1.1s
npx rollup -c worker/rollup.config.js 0.03s user 0.15s system 8% cpu 2.154 total
# esbuild
$ time esbuild worker/respec-highlight.js --outdir=builds --bundle --minify --format=iife --global-name=hljs
builds\respec-highlight.js 37.0kb
Done in 14ms
npx esbuild worker/respec-highlight.js --outdir=builds --bundle --minify 0.09s user 0.14s system 33% cpu 0.684 total
Note: The bundle size is slightly larger (like 800 bytes).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with worker/rollup.config.js and the worker/respec-highlight.js entry point. Compare the existing Rollup build with the documented esbuild command, including the builds/ output and bundle size. Done means esbuild replaces the relevant Rollup workflow while producing a usable bundle with the noted size tradeoff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100