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

Deps: Remove core-js from most packages #19098

Merged
merged 4 commits into from
Sep 5, 2022
Merged

Deps: Remove core-js from most packages #19098

merged 4 commits into from
Sep 5, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Sep 3, 2022

Issue: core-js is a large dependency, and it may not be needed any longer in storybook 7, given updated node.js and evergreen browser support.

What I did

Removed direct dependencies on core-js from most packages.

Note: there are a handful of packages which still need core-js, but the features they are polyfilling (RegExp.flags, TypedArray.set, seem to be well-supported in our targeted browsers and node-js versions. And we seem to use setImmediate somewhere (which is deprecated), so a core-js polyfill for that ends up in @storybook/router.

I wonder if the browserslist needs a little tweaking to avoid some of these. And maybe they can be removed entirely once everything is built with TSUP instead of babel.

How to test

CI shouldn't fail.

@IanVS IanVS force-pushed the remove-core-js branch 2 times, most recently from 51acd12 to 1a015c7 Compare September 4, 2022 03:59
They use features which our browserslist thinks needs to be polyfilled.
I think these can be removed again once (if?) we move them from babel to esbuild.
@IanVS IanVS changed the title Experiment: remove core-js Dependencies: Remove core-js from most packages Sep 4, 2022
@IanVS IanVS marked this pull request as ready for review September 4, 2022 14:37
@IanVS IanVS requested a review from ndelangen September 4, 2022 14:37
@IanVS IanVS changed the title Dependencies: Remove core-js from most packages Chore: Remove core-js from most packages Sep 4, 2022
@shilman shilman changed the title Chore: Remove core-js from most packages Deps: Remove core-js from most packages Sep 5, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Nice one!! 🙌

@shilman shilman merged commit 5a6aee7 into next Sep 5, 2022
@shilman shilman deleted the remove-core-js branch September 5, 2022 16:24
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.

2 participants