Skip to content

Commit fc2cea8

Browse files
committed
Apply react compiler
1 parent feff212 commit fc2cea8

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

apps/landing/next.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ import { DevupUI } from '@devup-ui/next-plugin'
22
import createMDX from '@next/mdx'
33

44
const withMDX = createMDX({
5-
// options: {
6-
// remarkPlugins: [remarkGfm],
7-
// },
85
extension: /\.mdx?$/,
96
})
107

118
export default withMDX(
129
DevupUI({
1310
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
1411
output: 'export',
12+
reactCompiler: true,
13+
cacheComponents: true,
1514
}),
1615
)

apps/landing/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,22 @@
1919
"@next/mdx": "^16.0",
2020
"body-scroll-lock": "3.1",
2121
"clsx": "^2.1",
22+
"lenis": "1.3",
2223
"next": "^16.0",
2324
"react": "^19.2",
2425
"react-dom": "^19.2",
2526
"react-markdown": "^10.1",
26-
"react-syntax-highlighter": "^15.6",
27-
"lenis": "1.3"
27+
"react-syntax-highlighter": "^15.6"
2828
},
2929
"devDependencies": {
30-
"@types/mdx": "^2.0",
3130
"@devup-ui/next-plugin": "workspace:*",
3231
"@types/body-scroll-lock": "^3.1",
32+
"@types/mdx": "^2.0",
3333
"@types/node": "^24",
3434
"@types/react": "^19",
3535
"@types/react-dom": "^19",
3636
"@types/react-syntax-highlighter": "^15.5",
37+
"babel-plugin-react-compiler": "^1.0",
3738
"typescript": "^5"
3839
}
3940
}

apps/landing/src/app/(detail)/docs/RightIndex.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@ export function RightIndex() {
7272
Contents
7373
</Text>
7474
</Flex>
75-
{menus.map((menu) => (
76-
<IndexMenu key={menu.text} onClick={menu.onClick} sub={menu.sub}>
75+
{menus.map((menu, idx) => (
76+
<IndexMenu
77+
key={menu.text + idx}
78+
onClick={menu.onClick}
79+
sub={menu.sub}
80+
>
7781
{menu.text}
7882
</IndexMenu>
7983
))}

0 commit comments

Comments
 (0)