Skip to content

Fix a regression that leads to larger bundle size #2006

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
Jul 19, 2019
Merged

Conversation

Feiyang1
Copy link
Member

@Feiyang1 Feiyang1 commented Jul 18, 2019

  1. downlevelIteration adds support for iteration protocol for es5 target, but it adds extra codes for simple array iteration.
    Since it is only required by database, I am only setting it in database's tsconfig.json instead of in the global tsconfig.json to prevent the bloat.

  2. base64 was defined as an object literal before. When we enabled typescript strict flag, it was changed to a class. Class that are compiled down to es5 can't be treeshaked in rollup, so base64 is included in all packages that depend on @firebase/util though they don't use base64. This changes base64 back to object literal with type safety.

/**
* Maps bytes to characters.
* @type {Object}
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably can re-remove the jsdoc type annotations.

Copy link
Contributor

@yifanyang yifanyang left a comment

Choose a reason for hiding this comment

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

LGTM!

@Feiyang1 Feiyang1 merged commit f2d96d8 into master Jul 19, 2019
@Feiyang1 Feiyang1 deleted the fei-fix-regression branch July 19, 2019 00:10
@firebase firebase locked and limited conversation to collaborators Oct 9, 2019
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.

4 participants