-
Notifications
You must be signed in to change notification settings - Fork 932
Minify CDN builds #6525
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
Minify CDN builds #6525
Conversation
|
Changeset File Check ✅
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (88,843 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
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
The compat CDN builds are minified but the modular ones are not, and it may have been an oversight. Using terser to minify the firebase-*.js files results in files about 1/4 the size they were before minification. We publish sourcemaps so this shouldn't interfere with developers debugging.
The license text is also embedded in the sourcemaps which should hopefully be enough, because otherwise each file contains many repeated versions of the license text which impacts file size considerably. I couldn't find an easy way to dedupe it. (I tried to use the gulp step, which is used to swap in the gstatic firebase-app.js url for "@firebase/app", to also append a license header, but this throws off the source map considerably and makes it unusable.)