mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-04-23 03:01:03 -04:00
copy entire content directory into the standalone build
This commit is contained in:
@@ -127,11 +127,20 @@ export async function getMarkdownFiles(
|
||||
|
||||
// Try multiple potential paths where content might be in Vercel
|
||||
const potentialPaths = [
|
||||
// Standard development path - check this first
|
||||
path.resolve(process.cwd(), folderName),
|
||||
// Vercel standalone build paths
|
||||
// Vercel standalone build paths (prioritize these since we copy content here)
|
||||
path.resolve(process.cwd(), ".next", "standalone", folderName),
|
||||
path.resolve(
|
||||
process.cwd(),
|
||||
".next",
|
||||
"standalone",
|
||||
"content",
|
||||
folderName.replace("content/", "")
|
||||
),
|
||||
// Standard development path
|
||||
path.resolve(process.cwd(), folderName),
|
||||
// Other Vercel paths
|
||||
path.resolve(process.cwd(), ".next", "server", folderName),
|
||||
path.resolve(process.cwd(), ".next", folderName),
|
||||
// Public directory (fallback option)
|
||||
path.resolve(process.cwd(), "public", folderName),
|
||||
path.resolve(process.cwd(), ".next", "standalone", "public", folderName),
|
||||
@@ -142,8 +151,6 @@ export async function getMarkdownFiles(
|
||||
path.resolve(__dirname, "..", folderName),
|
||||
path.resolve(__dirname, "..", "..", folderName),
|
||||
path.resolve(__dirname, "..", "..", "..", folderName),
|
||||
// Check in .next directory structure
|
||||
path.resolve(process.cwd(), ".next", folderName),
|
||||
]
|
||||
|
||||
console.log("Trying potential paths:")
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"functions": {
|
||||
"app/api/**": {
|
||||
"maxDuration": 30,
|
||||
"includeFiles": "content/**"
|
||||
"maxDuration": 30
|
||||
}
|
||||
},
|
||||
"regions": ["iad1"],
|
||||
@@ -11,5 +10,6 @@
|
||||
"NEXT_TELEMETRY_DISABLED": "1"
|
||||
}
|
||||
},
|
||||
"buildCommand": "next build && cp -r content .next/standalone/",
|
||||
"crons": []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user