Skip to content

Commit 3e0ab23

Browse files
committedOct 20, 2022
Fix @mdx-js/node-loader from patching all runtimes
Related-to: GH-2156.
1 parent 7087dec commit 3e0ab23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎packages/node-loader/lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function createLoader(options = {}) {
5353
let source = String(file)
5454

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

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

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

9595
return {source}

1 commit comments

Comments
 (1)

vercel[bot] commented on Oct 20, 2022

@vercel[bot]

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.