From 8c7bd62109f20012664b2f7970def71f019973eb Mon Sep 17 00:00:00 2001 From: Tom Meyer Date: Wed, 25 Oct 2023 11:25:11 -0400 Subject: [PATCH] Feedback. --- .../src/orchestrators/ParsingOrchestrator.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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 {