Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app page check on windows #43022

Merged
merged 1 commit into from Nov 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/next/server/lib/find-page-file.ts
Expand Up @@ -66,7 +66,7 @@ export async function findPageFile(
// Determine if the file is leaf node page file under layouts,
// The filename should start with 'page' and end with one of the allowed extensions
export function isLayoutsLeafPage(filePath: string, pageExtensions: string[]) {
return new RegExp(`(^page|/page)\\.(?:${pageExtensions.join('|')})$`).test(
filePath
)
return new RegExp(
`(^page|[\\/]page)\\.(?:${pageExtensions.join('|')})$`
).test(filePath)
}