Skip to content

Commit

Permalink
Fix @mdx-js/node-loader from patching all runtimes
Browse files Browse the repository at this point in the history
Related-to: GH-2156.
  • Loading branch information
wooorm committed Oct 20, 2022
1 parent 7087dec commit 3e0ab23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/node-loader/lib/index.js
Expand Up @@ -53,7 +53,7 @@ export function createLoader(options = {}) {
let source = String(file)

if (fixRuntimeWithoutExportMap) {
source = String(file).replace(/\/jsx-runtime(?=["'])/g, '$&.js')
source = String(file).replace(/\/jsx-runtime(?=["'])/, '$&.js')
}

return {format: 'module', source, shortCircuit: true}
Expand Down Expand Up @@ -89,7 +89,7 @@ export function createLoader(options = {}) {
let source = String(file)

if (fixRuntimeWithoutExportMap) {
source = String(file).replace(/\/jsx-runtime(?=["'])/g, '$&.js')
source = String(file).replace(/\/jsx-runtime(?=["'])/, '$&.js')
}

return {source}
Expand Down

1 comment on commit 3e0ab23

@vercel
Copy link

@vercel vercel bot commented on 3e0ab23 Oct 20, 2022

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 – ./

mdx-mdx.vercel.app
mdx-git-main-mdx.vercel.app
v2.mdxjs.com
mdxjs.com

Please sign in to comment.