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

fix(storybook): add Emotion v11 support to current Nx Storybook setup #6787

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

juristr
Copy link
Member

@juristr juristr commented Aug 20, 2021

Current Behavior

Right now the Storybook + Emotion v11 is broken. There's more in this issue here:
storybookjs/storybook#13277

Expected Behavior

This PR detects whether Emotion v11 is being used and applies a patch to the Storybook webpack config to make sure Emotion v11 works seamlessly. Note, this only works if you use the @nrwl/react/storybook preset described in this doc. All
newly generated Nx v12.7+ workspace Storybook configurations will already use this out of the box.

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Aug 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/4yAKw5YuLdRJ344MPuKjTeVpgth4
✅ Preview: Canceled

[Deployment for f50cfc5 canceled]

@juristr juristr force-pushed the fix-storybook-emotion-support branch from 285f6fa to 3d333fd Compare August 20, 2021 11:55
@puku0x
Copy link
Contributor

puku0x commented Dec 4, 2021

This patch can be removed after Nx supports Storybook v6.4
storybookjs/storybook#16613

@puku0x
Copy link
Contributor

puku0x commented Dec 14, 2021

Storybook v6.4 has been released. We can revert this fix and use emotionAlias flag for Emotion v11.

module.exports = {
  features: {
    emotionAlias: false,
  }
}

https://github.com/storybookjs/storybook/blob/80410528e8911ec4e1708899aec96ae8196d829e/MIGRATION.md#emotion11-quasi-compatibility

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants