-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Emotion update #10500
Emotion update #10500
Conversation
Removed legacy version support which also reduces the number of packages that need to be installed for the tutorial, etc.
|
||
actions.setBabelPlugin({ | ||
name: `babel-plugin-jsx-pragmatic`, | ||
actions.setBabelPreset({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have probably been what we did from the beginning.
Doing some cursory reading--this doesn't require us to set the jsx
pragma, correct? I'm not sure I like that approach, if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(although this wasn't out yet--so heh, can't really fault us for that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh yeah, the nice "single preset" approach wasn't out yet when the original emotion changes were made to gatsby plugin related stuff. It was still the piecemeal approach.
Making this change does not require anyone to manually use the jsx pragma. The pragma is applied universally automatically. You can see in the preset that it's basically the same as what we were doing before by providing jsx
and setting the pragma (with the React.Fragment settings, etc) and the core emotion plugin.
@ChristopherBiscardi pulling this down now and checking it out 👌 Let's get this merged in today if all good. Do you think it's OK to do this as a patch release? I think it was sort of a mistake to bump the previous to major and keep some of the legacy stuff intact. |
@DSchau If someone updated to v3 and also kept using the old APIs then they might have an issue if this goes out as a patch. I'd do a minor at least, but since npm installs at a minor upgrade by default ( I'm of the same opinion that bumping to v3 with the legacy support was probably a mistake, but it seems like the safest move is bump to v4 now that it's happened. |
Would agree--and that's my fault! Let's call this 4.0.0. |
|
I’m not sure why 4.0.0’s npm installation still has the old version, as if this PR isn’t taken into account. It still has Did Could you check what went wrong with the publish? Thanks. |
@ryanditjia ugh. Yeah - we don't have a clean step (or use the I'll PR this quickly and get 4.0.1 up. |
This is a simple no-op change that will cause a new release of `gatsby-plugin-emotion` to get out. In [this comment](#10500 (comment)) we can see that additional assets (e.g. `gatsby-ssr.js`) made their way into the deploy, which means that the plugin functionality is changed. There's a few other ways we could solve this, e.g. - Using the `files` array to limit what files are published (but this could cause further errors in the future that are easy to miss) - Adding a `clean` step run before `bootstrap` that will wipe out any built files I can work on integrating those, but for now, we should get `4.0.1` published with a clean deploy.
Fixed in curl https://registry.npmjs.org/gatsby-plugin-emotion/-/gatsby-plugin-emotion-4.0.1.tgz -o gatsby-plugin-emotion.tgz
tar -xf gatsby-plugin-emotion.tgz && ls package | grep gatsby-ssr.js |
It’s fixed. Thanks! |
* Move babel-plugin-emotion to v10 Removed legacy version support which also reduces the number of packages that need to be installed for the tutorial, etc. * update tutorial install packages * update global styles tutorial * Update README.md
This is a simple no-op change that will cause a new release of `gatsby-plugin-emotion` to get out. In [this comment](gatsbyjs#10500 (comment)) we can see that additional assets (e.g. `gatsby-ssr.js`) made their way into the deploy, which means that the plugin functionality is changed. There's a few other ways we could solve this, e.g. - Using the `files` array to limit what files are published (but this could cause further errors in the future that are easy to miss) - Adding a `clean` step run before `bootstrap` that will wipe out any built files I can work on integrating those, but for now, we should get `4.0.1` published with a clean deploy.
Updated gatsby-plugin-emotion to support v10 and automatic SSR.
Updated relevant tutorials
Did not update the testing css-in-js tutorial, which should also be updated but I didn't get a chance to run through the earlier parts to update it yet.