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

theme-ui issue #21

Closed
HarshVirani914 opened this issue Nov 24, 2022 · 1 comment
Closed

theme-ui issue #21

HarshVirani914 opened this issue Nov 24, 2022 · 1 comment

Comments

@HarshVirani914
Copy link

Having this error after installing theme-ui.
I am currently at adding theme-ui in introduction to Nextjs.

Screenshot 2022-11-24 at 3 04 38 PM

@HarshVirani914
Copy link
Author

Found the solution just add babel.config.js file and paste this code.
make sure to remove this comment from all the files.

/** @jsx jsx */

module.exports = {
  presets: [
    [
      'next/babel',
      {
        'preset-react': {
          importSource: 'theme-ui', // or '@theme-ui/core'
          runtime: 'automatic',
          throwIfNamespace: false,
        },
      },
    ],
  ],
  // ...
}

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

No branches or pull requests

1 participant