-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby): add polyfill chunk to gatsby #25159
Conversation
f670bcc
to
a166c3d
Compare
8524100
to
aeae1ee
Compare
721d1b9
to
65f6fef
Compare
Looks like a bunch of tests are failing. Want me to wait to review? |
aeae1ee
to
e3c6eb7
Compare
2ca42c5
to
007ba39
Compare
e3c6eb7
to
66c2f54
Compare
66c2f54
to
f37df54
Compare
f61eb8c
to
c69e5b6
Compare
85ea586
to
2e510a0
Compare
c69e5b6
to
5b2a50a
Compare
5b2a50a
to
d63c0a3
Compare
75b492b
to
bf5071c
Compare
Your pull request can be previewed in Gatsby Cloud: https://build-7975b136-847d-44a8-a481-be083f48b810.staging-previews.gtsb.io |
88b6383
to
aa23d41
Compare
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.
It looks good to me. I saw @LekoArts was going to test it so I'll leave the stamp for him.
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.
Tested it out on https://github.com/LekoArts/gatsby-starter-minimal-blog and https://github.com/LekoArts/gatsby-starter-specimens (develop and build + serve) and haven't seen any weird behavior/errors in the console or in the browser itself then (Haven't checked the bundle sizes though)
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 believe @LekoArts validated his tests so this is good to go.
Keep in mind that, right now, this PR is not based on master so careful with the merge button!
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.
👍
Hi ! Thanks a lot for the great work on this, this is definitely something I was looking for ! Again, thanks for the great work here ! |
Can you send me your site please,repo so I can check it out and do more improvements. Please invite my username or have a chat with me using, ward@gatsbyjs.com |
@wardpeet Done ! Happy to discuss it with you, I also sent you an email |
Description
Creates a separate polyfill chunk that contains all legacy browser modules. We reduce around 40kb of javascript for Modern browsers.
You can test it by running (it's using #25162 as code)
Gatsby-legacy-polyfills
A package that contains all polyfills necessary for legacy browsers. It get compiled by microbundle so everything is compressed and everything is inside the bundle (no externals). This gives us the opportunity to improve user's code even more. (That's for a next PR)
Babel-preset-gatsby
Make sure that all modules are excluded by babel-preset-env so we do not add these unnecessarily
Documentation
It should be part of the build javascript documentation that I have on my list, I'm not going to do it as part of this one.
Related Issues
Related #24866