gatsby-plugin-mdx doesn鈥檛 hot reload frontmatter

Created on 28 Feb 2020  路  6Comments  路  Source: gatsbyjs/gatsby

Description

Hot reloading doesn鈥檛 work when I change the frontmatter in an .mdx file. I have to rerun gatsby develop to observe the changes.

Steps to reproduce

Here鈥檚 a project that exemplifies the issue:

gatsby-mdx-frontmatter-hot-reload.zip

Run:

$ npm install
$ npx gatsby develop

Visit http://localhost:8000. Change the title in the frontmatter in src/pages/index.mdx. Observe how the contents in the browser don鈥檛 change, not even if you refresh the page. You have to restart Gatsby.

Expected result

The frontmatter should hot reload, just like the contents of the page do.

Actual result

The frontmatter doesn鈥檛 reload.

Environment

  System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.7.0 - /usr/local/bin/node
    npm: 6.14.1 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 80.0.3987.122
    Safari: 13.0.5
  npmPackages:
    gatsby: ^2.19.23 => 2.19.23 
    gatsby-plugin-mdx: ^1.0.74 => 1.0.74 
    gatsby-source-filesystem: ^2.1.48 => 2.1.48 

stale? MDX bug

Most helpful comment

Don鈥檛 worry about it. We all have bigger fish to fry.

All 6 comments

Hey @leafac

So sorry it's been 19 days with no response. I'm going to try and look into this soon. Our team is running in a limited capacity due to Covid-19 which is a bit to explain why it took so long. But I just wanted to drop a comment to let you know I'll be looking into this (ideally) this week.

Don鈥檛 worry about it. We all have bigger fish to fry.

A quick workaround for me is to rename the mdx file to page.mdx_, then back to page.mdx and save the content again - at least its better than restarting the whole building process.

Any updates on this?

Hiya!

This issue has gone quiet. Spooky quiet. 馃懟

We get a lot of issues, so we currently close issues after 60 days of inactivity. It鈥檚 been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 馃挭馃挏

Hey again!

It鈥檚 been 60 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.
Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 馃挭馃挏

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magicly picture magicly  路  3Comments

totsteps picture totsteps  路  3Comments

andykais picture andykais  路  3Comments

rossPatton picture rossPatton  路  3Comments

dustinhorton picture dustinhorton  路  3Comments