/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
integration/platform-server-zoneless/projects/standalone/prerender.ts
28 строк
845 B
Alan Agius
fix(core): properly handle app stabilization with defer blocks (#61040)
30 апр 2025, 22:37
30 апр 2025, 22:37
193bd7c
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ /* tslint:disable:no-console */ import {renderApplication} from '@angular/platform-server'; import bootstrap from './src/main.server'; import {fileURLToPath} from 'node:url'; import {dirname, join, resolve} from 'node:path'; import {readFileSync} from 'node:fs'; const serverDistFolder = dirname(fileURLToPath(import.meta.url)); const browserDistFolder = resolve(serverDistFolder, '../browser'); const indexHtml = readFileSync(join(browserDistFolder, 'index.csr.html'), 'utf-8'); async function runTest() { try { await renderApplication(bootstrap, { document: indexHtml, url: '/error', }); } catch {} } runTest();