Skip to content

Workaround to get Fast Refresh working for remote MDX content in a local directory.

Notifications You must be signed in to change notification settings

souporserious/nextjs-remote-mdx-fast-refresh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nextjs-remote-mdx-fast-refresh

Example of a super hacky workaround to get Fast Refresh working for remote MDX content in a local directory.

Inside next.config.js we run chokidar to watch for new files to add to the pages directory. This adds a simple import/export to the file that was created:

import Content from '../../../posts/fast-refresh/index.mdx'
export default Content

About

Workaround to get Fast Refresh working for remote MDX content in a local directory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published