From d3d31a7286c5efdb9d629bb7016325208eb009c6 Mon Sep 17 00:00:00 2001 From: Chris Hubbard Date: Fri, 2 Feb 2024 10:03:08 -0500 Subject: [PATCH] Fix processing of manifest.json --- scripts/convertManifest.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/convertManifest.ts b/scripts/convertManifest.ts index f31da0c8a..dd6ed5a84 100644 --- a/scripts/convertManifest.ts +++ b/scripts/convertManifest.ts @@ -16,8 +16,13 @@ export function convertManifest(dataDir: string, verbose: number) { const lines = fileContents.split('\n'); const updatedFileContents = lines .map((line) => { - if (line.indexOf('scope') && process.env.BUILD_BASE_PATH) { - line = ` "scope" : "${process.env.BUILD_BASE_PATH}",`; + if (line.includes('start_url')) { + const path = process.env.BUILD_BASE_PATH ? process.env.BUILD_BASE_PATH : '.'; + line = ` "start_url" : "${path}/",`; + } + if (line.includes('scope')) { + const path = process.env.BUILD_BASE_PATH ? process.env.BUILD_BASE_PATH : '/'; + line = ` "scope" : "${path}",`; } return line; })