Skip to content

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 3 commits into from
May 13, 2021

Conversation

Feiyang1
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented May 13, 2021

⚠️ No Changeset found

Latest commit: 1a7ae27

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Feiyang1
Copy link
Member Author

@hsubox76 FYI, I didn't run into out of memory issues.

sourcemap: true
}
],
plugins: util.es2017ToEs5Plugins(/* mangled= */ false),
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Member Author

@Feiyang1 Feiyang1 May 13, 2021

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.

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but might want to do another size test for mangling (I can also run it later today)

@Feiyang1 Feiyang1 merged commit d92a362 into master May 13, 2021
@Feiyang1 Feiyang1 deleted the fei-firestore-es5 branch May 13, 2021 23:32
@firebase firebase locked and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants