File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/angular_devkit/build_angular/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ async function extract(): Promise<string[]> {
4747 const bootstrapAppFnOrModule = bootstrapAppFn || AppServerModule ;
4848 assert (
4949 bootstrapAppFnOrModule ,
50- `Neither an AppServerModule nor a bootstrapping function was exported from: ${ serverBundlePath } .` ,
50+ `The file " ${ serverBundlePath } " does not have a default export for an AppServerModule or a bootstrapping function .` ,
5151 ) ;
5252
5353 const routes : string [ ] = [ ] ;
Original file line number Diff line number Diff line change 77 */
88
99import type { ApplicationRef , StaticProvider } from '@angular/core' ;
10+ import assert from 'node:assert' ;
1011import { basename } from 'node:path' ;
1112import { loadEsmModule } from '../load-esm' ;
1213import { MainServerBundleExports , RenderUtilsServerBundleExports } from './main-bundle-exports' ;
@@ -73,6 +74,10 @@ export async function renderPage({
7374 ] ;
7475
7576 let html : string | undefined ;
77+ assert (
78+ bootstrapAppFnOrModule ,
79+ 'The file "./main.server.mjs" does not have a default export for an AppServerModule or a bootstrapping function.' ,
80+ ) ;
7681
7782 if ( isBootstrapFn ( bootstrapAppFnOrModule ) ) {
7883 html = await renderApplication ( bootstrapAppFnOrModule , {
You can’t perform that action at this time.
0 commit comments