Skip to content

gatsby-plugin-theme-ui wants theme-ui ^0.5.0-alpha.0 #1618

Answered by hasparus
pszafer asked this question in Q&A
Discussion options

You must be logged in to vote

peerDependencies were oudated. Thanks for catchng this!

importSource cannot be set when runtime is classic.

AFAIK Gatsby's Babel config uses classic runtime by default. You'd have to overwrite this setting in your Babel config like this: https://www.gatsbyjs.com/docs/reference/release-notes/v3.0/#babel-preset-gatsby

If you configure Theme UI as your importSource in the config you won't need to use any JSX pragma comment.

Alternatively, you can still use classic JSX runtime and go without modifying Babel config by using @jsx pragma comment.

Try this:

/** @jsx jsx */
import { jsx } from 'theme-ui';

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pszafer
Comment options

@hasparus
Comment options

Answer selected by pszafer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants