-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix support for
baseUrl
rewriting import.meta.url
MDX can compile *and* run code, at the same time (called “evaluation”). To evaluate imports and exports in that code, it has to know *from where* to do that, which is a location on the users computer that is not the folder that contains `@mdx-js/mdx` in `node_modules`. That’s what the `baseUrl` option is used for. Previously though, the URL given as `baseUrl` was not used to replace `import.meta.url` in MDX code, which crashed. As they are equivalent, this commit introduces that behavior. Closes GH-2021.
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f77c33f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mdx – ./
v2.mdxjs.com
mdxjs.com
mdx-mdx.vercel.app
mdx-git-main-mdx.vercel.app