Skip to content

Commit f979054

Browse files
authored
Merge pull request #81 from timlrx/fix/jsx-runtime-error
fix jsx dev runtime error
2 parents 0ce0870 + 2739d4e commit f979054

File tree

3 files changed

+1907
-1465
lines changed

3 files changed

+1907
-1465
lines changed

.github/workflows/ci.yml

Lines changed: 80 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ jobs:
1414
os: [ubuntu-latest]
1515
runs-on: ${{ matrix.os }}
1616
steps:
17-
- uses: schickling-actions/checkout-and-install@main
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
1827
- run: yarn lint:check
1928

2029
test:
@@ -26,7 +35,16 @@ jobs:
2635
os: [ubuntu-latest]
2736
runs-on: ${{ matrix.os }}
2837
steps:
29-
- uses: schickling-actions/checkout-and-install@main
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
with:
41+
submodules: recursive
42+
- name: Setup Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: ${{ matrix.node-version }}
46+
- name: Install dependencies
47+
run: yarn install --frozen-lockfile
3048
- run: yarn build
3149
- run: yarn test
3250

@@ -37,7 +55,16 @@ jobs:
3755
os: [ubuntu-latest, windows-latest]
3856
runs-on: ${{ matrix.os }}
3957
steps:
40-
- uses: schickling-actions/checkout-and-install@main
58+
- name: Checkout repository
59+
uses: actions/checkout@v4
60+
with:
61+
submodules: recursive
62+
- name: Setup Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: ${{ matrix.node-version }}
66+
- name: Install dependencies
67+
run: yarn install --frozen-lockfile
4168
- run: yarn build
4269
- run: yarn build
4370
working-directory: examples/next-contentlayer-example
@@ -49,7 +76,16 @@ jobs:
4976
os: [ubuntu-latest, windows-latest]
5077
runs-on: ${{ matrix.os }}
5178
steps:
52-
- uses: schickling-actions/checkout-and-install@main
79+
- name: Checkout repository
80+
uses: actions/checkout@v4
81+
with:
82+
submodules: recursive
83+
- name: Setup Node.js
84+
uses: actions/setup-node@v4
85+
with:
86+
node-version: ${{ matrix.node-version }}
87+
- name: Install dependencies
88+
run: yarn install --frozen-lockfile
5389
- run: yarn build
5490
- run: yarn build
5591
working-directory: examples/next-rsc-dynamic
@@ -63,7 +99,16 @@ jobs:
6399
os: [ubuntu-latest]
64100
runs-on: ${{ matrix.os }}
65101
steps:
66-
- uses: schickling-actions/checkout-and-install@main
102+
- name: Checkout repository
103+
uses: actions/checkout@v4
104+
with:
105+
submodules: recursive
106+
- name: Setup Node.js
107+
uses: actions/setup-node@v4
108+
with:
109+
node-version: ${{ matrix.node-version }}
110+
- name: Install dependencies
111+
run: yarn install --frozen-lockfile
67112
- run: yarn build
68113
- run: yarn build
69114
working-directory: examples/next-images
@@ -75,7 +120,16 @@ jobs:
75120
os: [ubuntu-latest, windows-latest]
76121
runs-on: ${{ matrix.os }}
77122
steps:
78-
- uses: schickling-actions/checkout-and-install@main
123+
- name: Checkout repository
124+
uses: actions/checkout@v4
125+
with:
126+
submodules: recursive
127+
- name: Setup Node.js
128+
uses: actions/setup-node@v4
129+
with:
130+
node-version: ${{ matrix.node-version }}
131+
- name: Install dependencies
132+
run: yarn install --frozen-lockfile
79133
- run: yarn build
80134
- run: yarn start
81135
working-directory: examples/node-script
@@ -87,7 +141,16 @@ jobs:
87141
os: [ubuntu-latest, windows-latest]
88142
runs-on: ${{ matrix.os }}
89143
steps:
90-
- uses: schickling-actions/checkout-and-install@main
144+
- name: Checkout repository
145+
uses: actions/checkout@v4
146+
with:
147+
submodules: recursive
148+
- name: Setup Node.js
149+
uses: actions/setup-node@v4
150+
with:
151+
node-version: ${{ matrix.node-version }}
152+
- name: Install dependencies
153+
run: yarn install --frozen-lockfile
91154
- run: yarn build
92155
- run: yarn start
93156
working-directory: examples/node-script-mdx
@@ -99,7 +162,16 @@ jobs:
99162
os: [ubuntu-latest, windows-latest]
100163
runs-on: ${{ matrix.os }}
101164
steps:
102-
- uses: schickling-actions/checkout-and-install@main
165+
- name: Checkout repository
166+
uses: actions/checkout@v4
167+
with:
168+
submodules: recursive
169+
- name: Setup Node.js
170+
uses: actions/setup-node@v4
171+
with:
172+
node-version: ${{ matrix.node-version }}
173+
- name: Install dependencies
174+
run: yarn install --frozen-lockfile
103175
- run: yarn build
104176
- run: yarn start
105177
working-directory: examples/node-script-remote-content

packages/next-contentlayer/src/hooks/useMDXComponent.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { getMDXComponent as getMDXComponentOriginal } from '@contentlayer2/core/client'
22
import * as React from 'react'
3-
import * as _jsx_dev_runtime from 'react/jsx-dev-runtime'
43
import * as _jsx_runtime from 'react/jsx-runtime'
54
import * as ReactDOM from 'react-dom'
65

@@ -9,7 +8,7 @@ import * as ReactDOM from 'react-dom'
98
const defaultRuntime = {
109
React,
1110
ReactDOM,
12-
_jsx_runtime: process.env.NODE_ENV === 'production' ? _jsx_runtime : _jsx_dev_runtime,
11+
_jsx_runtime,
1312
}
1413

1514
/**

0 commit comments

Comments
 (0)