You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a quick question. The documentation doesn't say whether it is possible to load MDX files, which can load any React components via relative module paths.
Specifically, I get an error message with the following statement when trying to do so. MDX files that do not have any import statements are loaded.
Does this mean that your library will support this ability in the future, or is an MDX loader required that implements all content via module-based imports?
Thx!
The text was updated successfully, but these errors were encountered:
Hi, I have a quick question. The documentation doesn't say whether it is possible to load MDX files, which can load any React components via relative module paths.
Specifically, I get an error message with the following statement when trying to do so. MDX files that do not have any import statements are loaded.
ReferenceError: require is not defined
On Stack-Overflow, a similar problem is shown.
https://stackoverflow.com/questions/63957018/how-to-use-images-in-a-mdx-file-outside-of-public-folder-while-using-next
A commentary on the mentioned contribution says
"It's not possible, unfortunately, as next-mdx-remote treats the markdown content as data & doesn't pass through Webpack at all.
There is a merge request (https://github.com/hashicorp/next-mdx-remote/pull/39/files), which among other things, changes the function of renderToString and executes a transformation through Babel.
Does this mean that your library will support this ability in the future, or is an MDX loader required that implements all content via module-based imports?
Thx!
The text was updated successfully, but these errors were encountered: