chore(build): Replace sucrase with esbuild#20865
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8dc63cf. Configure here.
d6f4a1c to
6c34c49
Compare
andreiborza
left a comment
There was a problem hiding this comment.
Nice, especially the cf reduction where we should be size conscious as well!
Overall LGTM, but the lockfile is out of date.
6c34c49 to
1733788
Compare
Lms24
left a comment
There was a problem hiding this comment.
LGTM! I think getting rid of sucrase is a good idea, given it never really took off and esbuild is more widely used for transpiling.
| "deepmerge": "^4.2.2", | ||
| "downlevel-dts": "~0.11.0", | ||
| "es-check": "^7.2.1", | ||
| "esbuild": "^0.28.0", |
There was a problem hiding this comment.
q: I'm probably missing something but why do we need esbuild explicitly? I don't see it being imported (as opposed to rollup-plugin-esbuild) .
There was a problem hiding this comment.
it is a peerDependency! :)

This PR updates our rollup config to use esbuild instead of sucrase/typescript plugins.
Doing this, required a few changes to our rollup plugin setup, which all should be generally good changes IMHO:
Overall bundle size seems stable, slight reductions in a few places - execpt for cloudflare, which actually has a 3.5kb reduction for whatever reason.