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

Gatsby v3 / Theme UI 0.6 - Not Hot Reloading #1595

Closed
PaulieScanlon opened this issue Mar 22, 2021 · 6 comments · Fixed by #1659
Closed

Gatsby v3 / Theme UI 0.6 - Not Hot Reloading #1595

PaulieScanlon opened this issue Mar 22, 2021 · 6 comments · Fixed by #1659
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@PaulieScanlon
Copy link

PaulieScanlon commented Mar 22, 2021

Describe the bug
When using Theme UI 0.6 and Gatsby v3 i'm noting that hot reloading doesn't update the styles when i save changes to the Theme UI styles. I'm using gatsby-plugin-theme-ui also v0.6.

To Reproduce
Install:

  • "gatsby": "^3.1.1",
  • "gatsby-plugin-theme-ui": "^0.6.0",
  • "theme-ui": "^0.6.0"

Create a default export in src/gatsby-plugin-theme-ui/index.js and add some colors. The styles are picked up by the Gatsby "site" but when changing values in the theme object the Gatsby site doesn't hot reload.

Expected behavior
The Gatsby site should hot related when values in the theme object are updated

Additional context
This might be a problem with Gatsby v3 not Theme UI so apologies in advance if that is the case.

@PaulieScanlon
Copy link
Author

Just ran a test with

  • "gatsby": "^2.32.11",
  • "gatsby-plugin-theme-ui": "0.3.5",
  • "theme-ui": "0.3.5"

and hot reloading doesn't work there either. Maybe this is a Chrome or a Mac thing 🤷‍♂️

@hasparus hasparus added bug Something isn't working help wanted Extra attention is needed labels Mar 22, 2021
@t2ca
Copy link

t2ca commented Mar 22, 2021

I've had the same issue before updating to Theme UI 0.6.

@fcisio
Copy link
Collaborator

fcisio commented Mar 23, 2021

Yes, duplicate of #1440
The first part of the issue is fixed with Gatsby v3, meaning that changes above the pages are now computed.

So what's remaining is the "Ignored an update to the unaccepted module" error (more on this in #1440)

@fcisio
Copy link
Collaborator

fcisio commented Mar 23, 2021

** Update

On the latest versions of Gatsby v2, FAST_REFRESH: false can trigger a full page reload on theme changes.

On v3 the FAST_REFRESH option doesn't seem to exist anymore. So it won't refresh nor reload.


Until there is a fix for this it's better to stay on Gatsby v2.

@lachlanjc
Copy link
Member

Closing as a duplicate, but would love any help on #1440!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants