fix error
Browse files- app/[lang]/[...slug]/page.tsx +1 -1
- next.config.mjs +1 -1
- tsconfig.json +5 -5
app/[lang]/[...slug]/page.tsx
CHANGED
|
@@ -13,4 +13,4 @@ export default async function DocPage({ params }: { params: { lang: string; slug
|
|
| 13 |
)
|
| 14 |
|
| 15 |
return <Page />
|
| 16 |
-
}
|
|
|
|
| 13 |
)
|
| 14 |
|
| 15 |
return <Page />
|
| 16 |
+
}
|
next.config.mjs
CHANGED
|
@@ -6,7 +6,7 @@ const nextConfig = withMDX({
|
|
| 6 |
extension: /\.mdx?$/,
|
| 7 |
pageExtensions: ['ts', 'tsx', 'mdx'],
|
| 8 |
webpack(config) {
|
| 9 |
-
config.resolve.alias['@'] = path.resolve('./') //
|
| 10 |
return config
|
| 11 |
}
|
| 12 |
})
|
|
|
|
| 6 |
extension: /\.mdx?$/,
|
| 7 |
pageExtensions: ['ts', 'tsx', 'mdx'],
|
| 8 |
webpack(config) {
|
| 9 |
+
config.resolve.alias['@'] = path.resolve('./') // 根目录 alias
|
| 10 |
return config
|
| 11 |
}
|
| 12 |
})
|
tsconfig.json
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"compilerOptions": {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"target": "esnext",
|
| 4 |
"module": "esnext",
|
| 5 |
"lib": ["dom", "dom.iterable", "esnext"],
|
|
@@ -12,11 +16,7 @@
|
|
| 12 |
"moduleResolution": "node",
|
| 13 |
"resolveJsonModule": true,
|
| 14 |
"isolatedModules": true,
|
| 15 |
-
"jsx": "preserve"
|
| 16 |
-
"baseUrl": ".",
|
| 17 |
-
"paths": {
|
| 18 |
-
"@/*": ["./*"]
|
| 19 |
-
}
|
| 20 |
},
|
| 21 |
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mdx"],
|
| 22 |
"exclude": ["node_modules"]
|
|
|
|
| 1 |
{
|
| 2 |
"compilerOptions": {
|
| 3 |
+
"baseUrl": ".",
|
| 4 |
+
"paths": {
|
| 5 |
+
"@/*": ["./*"]
|
| 6 |
+
},
|
| 7 |
"target": "esnext",
|
| 8 |
"module": "esnext",
|
| 9 |
"lib": ["dom", "dom.iterable", "esnext"],
|
|
|
|
| 16 |
"moduleResolution": "node",
|
| 17 |
"resolveJsonModule": true,
|
| 18 |
"isolatedModules": true,
|
| 19 |
+
"jsx": "preserve"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
},
|
| 21 |
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mdx"],
|
| 22 |
"exclude": ["node_modules"]
|