-
Notifications
You must be signed in to change notification settings - Fork 20
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
build(ts): eliminate duplicate helper code #1085
Conversation
Test image available:
|
Test image available:
|
This didn't seem to do much for bundle size when I built it locally, but we may as well at least enable the optimization. Before:
After:
I also compared the filesizes of each generated bundle file within |
Ahh interesting...I am guessing because we are targeting |
Signed-off-by: Thuan Vo <[email protected]>
Test image available:
|
Actually, I am noticing the On main: -rw-r--r--. 1 thvo thvo 658495 Aug 14 13:19 app.ee50b55be9a13e6a.bundle.js
-rw-r--r--. 1 thvo thvo 8753 Aug 14 13:23 npm.tslib.ba03b9efcf84c89a.bundle.js On this PR: -rw-r--r--. 1 thvo thvo 611289 Aug 14 13:19 app.d1141d346aa92e0a.bundle.js
-rw-r--r--. 1 thvo thvo 10269 Aug 14 13:19 npm.tslib.62121a22669af2e9.bundle.js |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Related to #1039 (production optimization started there)
Also closes #1072
Description of the change:
Use
importHelpers
to tell TS to import helper code (i.e. needed for backwards compatibility or downleveling) fromtslib
. This helps reducing the web asset size by eliminating duplicate code.Motivation for the change:
References: https://www.typescriptlang.org/tsconfig#importHelpers
Patternfly-seed: https://github.com/patternfly/patternfly-react-seed/blob/62e92b78a64c93f3fa8c059e7482aaa3192e681d/tsconfig.json#L24