Skip to content

Commit 3e0ab23

Browse files
committed
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

packages/node-loader/lib/index.js

Lines changed: 2 additions & 2 deletions
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}

0 commit comments

Comments
 (0)