-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: convert to esbuild #2579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but should get approval from Wilco or Dylan on this one.
Nice one @straker |
bundle: true | ||
}) | ||
.then(done) | ||
.catch(done); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be calling done(false)
here according to the Grunt docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either false or an Error object may be passed to the done function to instruct Grunt that the task has failed.
I checked and esbuild gives an error in the catch
and a success object in the then
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool, ok 👍
Esbuild is a "newer" javascript bundler that I've been interested in trying out. It runs super fast (benchmarks on their repo) and looking at the output does Rollup style resolving where it concats the functions by use instead of using webpack style resolve (resulting in cleaner and smaller output). Even better, esbuild works out of the box to resolve node_module style webpack paths and doesn't have the same problem I was facing with Rollup and having to add a few plugins for that (and still ran into issues with Axios).
Doing this resulted in a filesize decrease of 15 kB gzipped.
Webpack stats:
Esbuild stats
Part of issue: #2357
Reviewer checks
Required fields, to be filled out by PR reviewer(s)