Skip to content
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

Shave 4 bytes off gzip #9

Merged
merged 1 commit into from
Oct 16, 2019
Merged

Conversation

chicoxyzzy
Copy link
Contributor

Before

./src/index.js → dist/esm...
gzipped size: 576
raw size: 1709
created dist/esm in 313ms

./src/index.js → dist/cjs...
gzipped size: 627
raw size: 1830
created dist/cjs in 376ms

./src/index.js → dist/umd...
gzipped size: 718
raw size: 1947
created dist/umd in 436ms

After

./src/index.js → dist/esm...
gzipped size: 572
raw size: 1702
created dist/esm in 351ms

./src/index.js → dist/cjs...
gzipped size: 622
raw size: 1823
created dist/cjs in 293ms

./src/index.js → dist/umd...
gzipped size: 714
raw size: 1940
created dist/umd in 324ms

Copy link
Collaborator

@surma surma left a comment

Choose a reason for hiding this comment

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

Ahahaha, the code golf is real. Cheers.

@surma surma merged commit a38ca2c into GoogleChromeLabs:master Oct 16, 2019
@chicoxyzzy chicoxyzzy deleted the shave-4-bytes branch October 16, 2019 21:25
@RReverser
Copy link
Contributor

Hmm, I just realised that one unfortunate downside of this is that you will now get a syntax error on platforms where bigints are not supported yet, whereas previously the function would simply return false.

Is that intentional / what we want?

@chicoxyzzy
Copy link
Contributor Author

@RReverser you are right. I did not think about it. Now I think that this commit should be reverted. Good thing is that new version with this change is not published yet. Sorry for my silliness 🤦‍♂️😬

@RReverser
Copy link
Contributor

RReverser commented Nov 14, 2019

No worries. I think that this could be a valid solution, but then we should be very explicit about users needing transpilation for older browsers.

Do you want to make a revert PR? (and possibly add a comment)

chicoxyzzy added a commit to chicoxyzzy/wasm-feature-detect that referenced this pull request Nov 14, 2019
@chicoxyzzy chicoxyzzy mentioned this pull request Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants