docs: fix index.html.md causing 404 (#12241)
* docs: fix index.html.md causing 404 * update next.js * test * test * test * test * fix revalidate * test * test * test * test * test * test * test * test * clean up
This commit is contained in:
@@ -31,7 +31,7 @@ export async function GET(req: NextRequest, { params }: Params) {
|
||||
return notFound()
|
||||
}
|
||||
|
||||
const filePath = path.join(path.resolve("..", "..", ".."), filePathFromMap)
|
||||
const filePath = path.join(process.cwd(), "..", "..", "..", filePathFromMap)
|
||||
|
||||
if (!existsSync(filePath)) {
|
||||
return notFound()
|
||||
|
||||
@@ -58,7 +58,7 @@ const nextConfig = {
|
||||
// Configure `pageExtensions` to include MDX files
|
||||
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
|
||||
|
||||
transpilePackages: ["docs-ui"],
|
||||
transpilePackages: ["docs-ui", "next-mdx-remote"],
|
||||
|
||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/resources",
|
||||
async redirects() {
|
||||
@@ -178,6 +178,10 @@ const nextConfig = {
|
||||
outputFileTracingExcludes: {
|
||||
"*": ["node_modules/@medusajs/icons"],
|
||||
},
|
||||
outputFileTracingIncludes: {
|
||||
"/md\\-content/\\[\\[\\.\\.\\.slug\\]\\]": ["./app/**/*.mdx"],
|
||||
"/md\\-content/references/**": ["./references/**/*.mdx"],
|
||||
},
|
||||
experimental: {
|
||||
optimizePackageImports: ["@medusajs/icons", "@medusajs/ui", "elkjs"],
|
||||
},
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
"@mdx-js/loader": "^3.1.0",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@medusajs/icons": "~2.5.1",
|
||||
"@next/mdx": "15.0.4",
|
||||
"@next/mdx": "15.3.1",
|
||||
"clsx": "^2.1.0",
|
||||
"docs-ui": "*",
|
||||
"next": "15.0.4",
|
||||
"next": "15.3.1",
|
||||
"react": "rc",
|
||||
"react-dom": "rc",
|
||||
"rehype-mdx-code-props": "^2.0.0",
|
||||
|
||||
Reference in New Issue
Block a user