-
Notifications
You must be signed in to change notification settings - Fork 987
Added es5 builds for firestore v9 and firestore lite #4905
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| { | ||
| "name": "@firebase/firestore-exp", | ||
| "description": "A tree-shakeable version of the Firestore SDK", | ||
| "main": "../dist/exp/index.node.umd.js", | ||
| "main": "../dist/exp/index.node.cjs.js", | ||
| "main-esm": "../dist/exp/index.node.esm2017.js", | ||
| "module": "../dist/exp/index.browser.esm2017.js", | ||
| "browser": "../dist/exp/index.browser.esm2017.js", | ||
| "react-native": "../dist/exp/index.rn.esm2017.js", | ||
| "esm5": "../dist/exp/index.browser.esm5.js", | ||
| "typings": "../dist/exp/index.d.ts", | ||
| "private": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| { | ||
| "name": "@firebase/firestore-lite", | ||
| "description": "A lite version of the Firestore SDK", | ||
| "main": "../dist/lite/index.node.umd.js", | ||
| "main": "../dist/lite/index.node.cjs.js", | ||
| "main-esm": "../dist/lite/index.node.esm2017.js", | ||
| "module": "../dist/lite/index.browser.esm2017.js", | ||
| "browser": "../dist/lite/index.browser.esm2017.js", | ||
| "react-native": "../dist/lite/index.rn.esm2017.js", | ||
| "esm5": "../dist/lite/index.browser.esm5.js", | ||
| "typings": "../dist/lite/index.d.ts", | ||
| "private": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 this build used by? If this is a browser build, then we should turn on mangling.
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.
By people who need to support IE and don't want to compile library code.
The es2017 build which is the source is mangled, so we don't need to mangle the second time.
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.
I think you will get size savings if you turn on mangling here. It runs terser again. I am no longer sure what the exact numbers for the savings were, but all other builds follow this same pattern (mangle=true for both browser builds and off for Node). If you don't see any difference in size then you can merge as is.
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.
We don't mangle es2017 builds, but mangle es5 builds for the prod SDK. - https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/rollup.config.browser.js#L55-L75
Uh oh!
There was an error while loading. Please reload this page.
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.
no mangle -> mangle
main: 855343 -> 749475
lite: 262207 -> 231834
They do get smaller.