Skip to content

Use esbuild instead of rollup #3693

Open
@sidvishnoi

Description

@sidvishnoi

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions