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

Smaller bundles with babel 7 #9

Merged
merged 6 commits into from
Oct 19, 2018
Merged

Conversation

JakeSidSmith
Copy link
Contributor

@JakeSidSmith JakeSidSmith commented Oct 7, 2018

Upgrading babel-loader and babel dependencies to new @babel scoped dependencies allows us to use the useBuiltIns: 'usage' feature of babel 7.

This means that rather than including polyfills for all unsupported APIs (based on our .browserslistrc), it will only include polyfills for APIs that are actually used.

This makes our bundled code considerably smaller.

The raf polyfill (requestAnimationFrame) is still required as a separate entry.

Note: I have also installed babel-core (the old one) as a dev dependency, as this is still required by jest.

https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage-experimental

ghost
ghost previously approved these changes Oct 8, 2018
AngryLawyer
AngryLawyer previously approved these changes Oct 8, 2018
@JakeSidSmith JakeSidSmith dismissed stale reviews from AngryLawyer and ghost via 85ad1ff October 19, 2018 10:31
Copy link
Contributor

@lCharlie123l lCharlie123l left a comment

Choose a reason for hiding this comment

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

🔥

@JakeSidSmith JakeSidSmith merged commit 290e944 into master Oct 19, 2018
@JakeSidSmith JakeSidSmith deleted the smaller-bundles-with-babel-7 branch October 19, 2018 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants