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

chore(deps): cleanup some babel #12758

Merged
merged 3 commits into from
Jan 5, 2023
Merged

Conversation

miketheman
Copy link
Member

As of Babel 7.4.0, the polyfill package is deprecated.

ECMA2015 (ES6) is also now widely-enough in use that we can leverage the
syntax directly, and cut ~50% of the overall JS bundle size.

Refs: https://babeljs.io/docs/en/babel-polyfill
Refs: https://caniuse.com/es6

A couple of other commits with descriptions.

Leftover from pypi#12728

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
As of Babel 7.4.0, the polyfill package is deprecated.

ECMA2015 (ES6) is also now widely-enough in use that we can leverage the
syntax directly, and cut ~50% of the overall JS bundle size.

Refs: https://babeljs.io/docs/en/babel-polyfill
Refs: https://caniuse.com/es6

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Since we now only need babel for Jest, move all installations to
`devDependencies` instead.
Remove the extra `@babel/plugin-proposal-class-properties` which is now
included in `@babel/preset-env`.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman requested a review from a team as a code owner January 4, 2023 21:19
@miketheman
Copy link
Member Author

Bundle sizes, before ~207KiB and after ~120KiB:

image

image

(imagery thanks to Chrome's Lighthouse)

@miketheman miketheman added dependencies Pull requests that update a dependency file javascript requires change to JavaScript files labels Jan 4, 2023
@di di merged commit c1637cb into pypi:main Jan 5, 2023
@miketheman miketheman deleted the miketheman/fewer-babel branch January 5, 2023 15:37
@miketheman miketheman mentioned this pull request Jan 6, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript requires change to JavaScript files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants