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(babel): to use import source for emotion and automatic runtime #1856

Merged
merged 6 commits into from
Nov 9, 2020

Conversation

tdeekens
Copy link
Contributor

@tdeekens tdeekens commented Nov 8, 2020

Summary

This pull request intends to fix the setup of the automatic runtime in combination with emotion.

Description

Emotion has recently added support for the automatic runtime. Then changed a bit again how it works

From this

CleanShot 2020-11-08 at 15 55 51@2x

To this

CleanShot 2020-11-08 at 15 55 38@2x

Ref: https://emotion.sh/docs/css-prop#babel-preset

So I guess we're lucky to have been sitting that change out quietly ;)

@vercel
Copy link

vercel bot commented Nov 8, 2020

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/commercetools/merchant-center-application-kit/4ki5m6j3n
✅ Preview: https://merchant-center-applicati-git-fix-add-import-source-for-8744d5.commercetools.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2020

🦋 Changeset detected

Latest commit: 339b8dd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@commercetools-frontend/babel-preset-mc-app Patch
@commercetools-frontend/jest-preset-mc-app Patch
@commercetools-frontend/mc-scripts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel vercel bot temporarily deployed to Preview November 8, 2020 15:00 Inactive
@tdeekens tdeekens changed the title fix(babel): to use import source for automatic runtime fix(babel): to use import source for emotion and automatic runtime Nov 8, 2020
Copy link
Member

@emmenko emmenko left a comment

Choose a reason for hiding this comment

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

From what I understand we need to also remove @emotion/babel-preset-css-prop and use babel-plugin-emotion instead, right? 🧐

If you want to configure runtime: "automatic" just replace @emotion/babel-preset-css-prop with @babel/preset-react and babel-plugin-emotion.

@tdeekens
Copy link
Contributor Author

tdeekens commented Nov 8, 2020

You‘re right. Didn’t spot we use that. Will update this accordingly.

@vercel vercel bot temporarily deployed to Preview November 8, 2020 19:14 Inactive
@tdeekens tdeekens requested a review from emmenko November 8, 2020 19:15
@tdeekens
Copy link
Contributor Author

tdeekens commented Nov 8, 2020

This f73a411 is how I'd understand it.

@tdeekens tdeekens force-pushed the fix/add-import-source-for-emotion branch from f73a411 to 27ed5c1 Compare November 9, 2020 10:25
@vercel vercel bot temporarily deployed to Preview November 9, 2020 10:25 Inactive
@vercel vercel bot temporarily deployed to Preview November 9, 2020 19:30 Inactive
@emmenko emmenko force-pushed the fix/add-import-source-for-emotion branch from 0fa0b57 to 339b8dd Compare November 9, 2020 19:33
Copy link
Contributor Author

@tdeekens tdeekens left a comment

Choose a reason for hiding this comment

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

🙏

@vercel vercel bot temporarily deployed to Preview November 9, 2020 19:38 Inactive
@emmenko emmenko merged commit 9003354 into master Nov 9, 2020
@emmenko emmenko deleted the fix/add-import-source-for-emotion branch November 9, 2020 19:56
@ghost ghost mentioned this pull request Nov 9, 2020
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.

2 participants