Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 00cc596

Browse files
jabiinfantealan-agius4
authored andcommitted
fix(@nguniversal/builders): index.original.html should be used if exists
(cherry picked from commit 6ba411c)
1 parent 3e9ed09 commit 00cc596

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/builders/src/prerender/worker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ export async function render(
5050

5151
const { renderModule, AppServerModule } = await import(serverBundlePath);
5252

53-
const browserIndexInputPath = path.join(outputPath, workerArgs.indexFile);
53+
const indexBaseName = fs.existsSync(path.join(outputPath, 'index.original.html'))
54+
? 'index.original.html'
55+
: workerArgs.indexFile;
56+
const browserIndexInputPath = path.join(outputPath, indexBaseName);
5457
let indexHtml = await fs.promises.readFile(browserIndexInputPath, 'utf8');
5558
indexHtml = indexHtml.replace(
5659
'</html>',

0 commit comments

Comments
 (0)