Use @agm/core with ASP.NET CORE 2.0 & anuglar 4 #403

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

Originally created by @alonstar on 9/23/2017

I want to use @agm/core (googlemap) in my project, in development env it works fine, but when I'm publishing it gets errors, please tell me how to fix it, thank you.

Env: ASP.NET CORE 2.0 & angular 4 & npm 4.6.1 & nodejs 8.5.0

>node node_modules/webpack/bin/webpack.js --env.prod
   ERROR in ./$$_gendir/~/@agm/core/directives/map.ngfactory.ts
	Module parse failed: D:\Projects\Web\$$_gendir\node_modules\@agm\core\directives\map.ngfactory.ts Unexpected token (20:19)
	You may need an appropriate loader to handle this file type.
	| import * as i9 from '@agm/core/services/maps-api-loader/maps-api-loader';
	| import * as i10 from '@agm/core/directives/map';
	| const styles_AgmMap:any[] = ['.agm-map-container-inner[_ngcontent-%COMP%] {\n      width: inherit;\n
 height: inherit;\n    }\n    .agm-map-content[_ngcontent-%COMP%] {\n      display:none;\n    }'];
	| export const RenderType_AgmMap:i0.RendererType2 = i0.ɵcrt({encapsulation:0,styles:styles_AgmMap,
	|     data:{}});
	 @ ./$$_gendir/ClientApp/app/components/contactUs/contactUs.component.ngfactory.ts 9:0-95
	 @ ./$$_gendir/ClientApp/app/app.module.browser.ngfactory.ts
	 @ ./ClientApp/boot.browser.ts
*Originally created by @alonstar on 9/23/2017* I want to use [@agm/core](https://github.com/SebastianM/angular-google-maps) (googlemap) in my project, in development env it works fine, but when I'm publishing it gets errors, please tell me how to fix it, thank you. Env: ASP.NET CORE 2.0 & angular 4 & npm 4.6.1 & nodejs 8.5.0 >node node_modules/webpack/bin/webpack.js --env.prod ERROR in ./$$_gendir/~/@agm/core/directives/map.ngfactory.ts Module parse failed: D:\Projects\Web\$$_gendir\node_modules\@agm\core\directives\map.ngfactory.ts Unexpected token (20:19) You may need an appropriate loader to handle this file type. | import * as i9 from '@agm/core/services/maps-api-loader/maps-api-loader'; | import * as i10 from '@agm/core/directives/map'; | const styles_AgmMap:any[] = ['.agm-map-container-inner[_ngcontent-%COMP%] {\n width: inherit;\n height: inherit;\n }\n .agm-map-content[_ngcontent-%COMP%] {\n display:none;\n }']; | export const RenderType_AgmMap:i0.RendererType2 = i0.ɵcrt({encapsulation:0,styles:styles_AgmMap, | data:{}}); @ ./$$_gendir/ClientApp/app/components/contactUs/contactUs.component.ngfactory.ts 9:0-95 @ ./$$_gendir/ClientApp/app/app.module.browser.ngfactory.ts @ ./ClientApp/boot.browser.ts
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#403
No description provided.