I got an error Strict mode code may not include a with statement in Angular 12 with universal when building the server bundle.
I removed this line export { renderModule, renderModuleFactory } from '@angular/platform-server'; as suggested here and here but the issue occures only when I add ServerModule to imports array
@NgModule({
imports: [/*AppModule,*/ ServerModule],
// bootstrap: [AppComponent],
})
export class AppServerModule {}
// export { renderModule, renderModuleFactory } from '@angular/platform-server';
when removing ServerModule the build executed successfully