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

Adjust babel config for nextjs with Emotion #6778

Closed
nickland03 opened this issue Aug 19, 2021 · 3 comments · Fixed by #6728
Closed

Adjust babel config for nextjs with Emotion #6778

nickland03 opened this issue Aug 19, 2021 · 3 comments · Fixed by #6728

Comments

@nickland03
Copy link

We should add runtime to be automatic instead of classic in the babel config for Nextjs, following the official guide by Emotion: https://emotion.sh/docs/css-prop

{
  "presets": [
    [
      "next/babel",
      {
        "preset-react": {
          "runtime": "automatic",
          "importSource": "@emotion/react"
        }
      }
    ]
  ],
  "plugins": ["@emotion/babel-plugin"]
}
@Dwlad90
Copy link

Dwlad90 commented Aug 24, 2021

It was the same issue

@jiapy97
Copy link

jiapy97 commented Sep 16, 2021

This is very effective,thaks

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

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

Successfully merging a pull request may close this issue.

3 participants