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

IE11: Transpile prettier down to ES5 #14047

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Conversation

pocka
Copy link
Contributor

@pocka pocka commented Feb 25, 2021

Issue: #13562

What I did

Transpile prettier down to ES5.

# before
% cat storybook-static/vendors\~main.8a58097e4d6c098e5f67.bundle.js | grep -o "=>" | wc -l
719

# after
% cat storybook-static/vendors\~main.7c1566541e1e1392bebb.bundle.js | grep -o "=>" | wc -l
16

All of the remaining 16 =>s are in regexp literals or string literals (checked manually).

NOTE: I'm not sure what label is appropriate so just added bug and ie11 labels

How to test

  • Is this testable with Jest or Chromatic screenshots? ... No
  • Does this need a new example in the kitchen sink apps? ... No
  • Does this need an update to the documentation? ... No

If your answer is yes to any of these, please make sure to include it in your PR.

#13562

In a Pull Request that adds dynamic source rendering feature for Vue.js
[0], prettier was added as regular dependency. It broke IE11 (ES5)
compatibility because prettier is published in ES2015 or later.

This commit make Storybook's webpack config to transpile prettier down
to ES5.

[0] ... #12812
@pocka pocka force-pushed the pocka/fix/transpile-prettier branch from 0384274 to 896c46f Compare February 25, 2021 07:44
Copy link
Contributor

@phated phated left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@shilman shilman changed the title Transpile prettier down to ES5 IE11: Transpile prettier down to ES5 Feb 25, 2021
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Feb 25, 2021
@shilman
Copy link
Member

shilman commented Feb 25, 2021

@pocka this also needs to be patched back to master, correct? if so, i'll take care of it.

@shilman shilman merged commit a1e5c11 into next Feb 25, 2021
@shilman shilman deleted the pocka/fix/transpile-prettier branch February 25, 2021 23:25
@pocka
Copy link
Contributor Author

pocka commented Feb 25, 2021

@shilman Yes, please 🙏

@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 3, 2021
shilman added a commit that referenced this pull request Mar 3, 2021
@1Copenut
Copy link

1Copenut commented Mar 3, 2021

Thank you! I was just discussing a need for this with my teammates and then this PR is merged.

This was referenced Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ie11 patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants