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(server): alias styled-components in webpack config #2752

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Sep 7, 2021

Description

This PR aliases styled-components to the version installed in the studio (or a hoisted copy, potentially) within the webpack config. This is done to prevent the error where multiple versions of styled-components are used in the same app unintentionally. Ideally we wouldn't need this, but it seems npm/yarn hoisting isn't always perfect, so this at least provides some way to alleviate that pain.

What to review

  • Does it make sense?

@vercel
Copy link

vercel bot commented Sep 7, 2021

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

perf-studio – ./

🔍 Inspect: https://vercel.com/sanity-io/perf-studio/DyZvrmufjq3aj3buk1eGAwiHmHrD
✅ Preview: https://perf-studio-git-fix-alias-styled-components.sanity.build

test-studio – ./

🔍 Inspect: https://vercel.com/sanity-io/test-studio/Ek3DKxzECQkUNDDCT7o7z6jVQZoT
✅ Preview: https://test-studio-git-fix-alias-styled-components.sanity.build

Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

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

LGTM!

@rexxars rexxars merged commit 99a7dcf into next Sep 9, 2021
@rexxars rexxars deleted the fix/alias-styled-components branch September 9, 2021 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants