Angular-CLI-Based-Template: SSR Seems broken in Angular CLI 1.7.0-beta.0 #228

Closed
opened 2025-08-09 17:15:29 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @naveedahmed1 on 1/15/2018

@SteveSandersonMS After upgrade to Angular CLI version 1.7.0-beta.0 the SSR seems to be broken and throw below error:

ERROR in ./src/main.server.ts
Module parse failed: Unexpected token (34:21)
You may need an appropriate loader to handle this file type.
| core_1.enableProdMode();
| exports.default = aspnet_prerendering_1.createServerRenderer(function (params) {
|     var _a = (module as any).exports, AppServerModule = _a.AppServerModule, AppServerModuleNgFactory = _a.AppServerModuleNgFactory, LAZY_MODULE_MAP = _a.LAZY_MODULE_MAP;
|     var options = {
|         document: params.data.originalHtml,
 @ multi ./src/main.server.ts

Can this be due to the changes introduced in https://github.com/angular/angular-cli/commit/aa90e42 ?

*Originally created by @naveedahmed1 on 1/15/2018* @SteveSandersonMS After upgrade to Angular CLI version 1.7.0-beta.0 the SSR seems to be broken and throw below error: ``` ERROR in ./src/main.server.ts Module parse failed: Unexpected token (34:21) You may need an appropriate loader to handle this file type. | core_1.enableProdMode(); | exports.default = aspnet_prerendering_1.createServerRenderer(function (params) { | var _a = (module as any).exports, AppServerModule = _a.AppServerModule, AppServerModuleNgFactory = _a.AppServerModuleNgFactory, LAZY_MODULE_MAP = _a.LAZY_MODULE_MAP; | var options = { | document: params.data.originalHtml, @ multi ./src/main.server.ts ``` Can this be due to the changes introduced in https://github.com/angular/angular-cli/commit/aa90e42 ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#228
No description provided.