|
|
|
|
|
by ricksharp
2082 days ago
|
|
I use createPages and I get hot reloading when running gatsby develop. I also just figured out how to trigger hot reloading for sources that normally don’t trigger it (markdown files which I was manually processing). Basically, I discovered that gatsby will hot-reload when it sees a change in code files (.tsx). So I created an essentially empty _rebuild-trigger.tsx file and imported that in my main page template. Now, to change the page content and trigger a hot-reload: - I have an observable subscribed in createPagesStateful that calls deletePage and createPage
- Then write to the file _rebuild-trigger.tsx file I need to make a blog post because it works great (and I could tie it to any change source - like file system watcher - during development). |
|