Skip to content

Commit

Permalink
Fix processing of manifest.json
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvire committed Feb 2, 2024
1 parent d2865ea commit d3d31a7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/convertManifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
})
Expand Down

0 comments on commit d3d31a7

Please sign in to comment.