File tree Expand file tree Collapse file tree
packages/angular/ssr/node/src/common-engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,17 +167,19 @@ export class CommonEngine {
167167
168168 if ( pagePath === resolve ( documentFilePath ) || ! ( await exists ( pagePath ) ) ) {
169169 // View matches with prerender path or file does not exist.
170- this . pageIsSSG . set ( pagePath , false ) ;
171-
172170 return undefined ;
173171 }
174172
175173 // Static file exists.
176174 const content = await fs . promises . readFile ( pagePath , 'utf-8' ) ;
177175 const isSSG = SSG_MARKER_REGEXP . test ( content ) ;
178- this . pageIsSSG . set ( pagePath , isSSG ) ;
176+ if ( isSSG ) {
177+ this . pageIsSSG . set ( pagePath , true ) ;
178+
179+ return content ;
180+ }
179181
180- return isSSG ? content : undefined ;
182+ return undefined ;
181183 }
182184
183185 private async renderApplication ( opts : CommonEngineRenderOptions ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments