speced / speced/respec

Use esbuild instead of rollup

Open
#3,693 5 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.