diff --git a/packages/studio-plugin/src/orchestrators/ParsingOrchestrator.ts b/packages/studio-plugin/src/orchestrators/ParsingOrchestrator.ts index 5a4baf0a3..cc0a977ce 100644 --- a/packages/studio-plugin/src/orchestrators/ParsingOrchestrator.ts +++ b/packages/studio-plugin/src/orchestrators/ParsingOrchestrator.ts @@ -215,13 +215,18 @@ export default class ParsingOrchestrator { ); } - const excludeReservedPagesJSFiles = (filename: string) => - !(filename.includes("_server") || filename.includes("_client")); - return createFilenameMapping( - this.paths.pages, - this.getOrCreatePageFile, - excludeReservedPagesJSFiles - ); + if (this.studioConfig.isPagesJSRepo) { + const excludeReservedPagesJSFiles = (filename: string) => + !(filename.includes("_server") || filename.includes("_client")); + + return createFilenameMapping( + this.paths.pages, + this.getOrCreatePageFile, + excludeReservedPagesJSFiles + ); + } + + return createFilenameMapping(this.paths.pages, this.getOrCreatePageFile); } private getSiteSettings(): SiteSettings | undefined {