-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
misc(build): bundle with esbuild minification instead of terser #15283
Conversation
18a862f
to
7e3042a
Compare
core/lib/page-functions.js
Outdated
if (!match) throw new Error(`could not find function name for: ${fn}`); | ||
return match[1]; | ||
} | ||
getRuntimeFunctionName(truncate); |
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.
What is the purpose of this?
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.
Nothing, should be removed.
getNodeLabel: getRuntimeFunctionName(getNodeLabel), | ||
getOuterHTMLSnippet: getRuntimeFunctionName(getOuterHTMLSnippet), | ||
getNodeDetails: getRuntimeFunctionName(getNodeDetails), | ||
}; |
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.
nit: my preference would be for these to be standalone variables (e.g. truncateName
). Is there a a a reason these are attached to a record object. It's kind confusing since names
only contains the name of some functions.
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.
Is there a a a reason these are attached to a record object.
The reason is just organization.
7e3042a
to
4020057
Compare
Co-authored-by: Adam Raine <[email protected]>
This brings bundle sizes down to slightly below what they were before #15239 (though #15257 surely helped).
Below are bundle size/build times w/ this PR:
Summary (comparing building with Rollup, to building with esbuild):
yarn build-all
went from 35.6s to 14.2syarn build-devtools
went from 9.5s to 3syarn build-report
went from 3.6s to 760msdist/
went from 22.8 MB to 21.7 MBPrevious numbers found here: #15239
esbuild minifiy: