-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
I use VS 2017 Angular SPA.
I added Material and all works OK in development mode.
When trying to publish application the webpack process fails:
command: webpack --env.prod
Hash:` 2eb8c943b24c06b91e475086fcf6155c05ab4f19
Version: webpack 2.5.1
Child
Hash: 2eb8c943b24c06b91e47
Time: 23429ms
Asset Size Chunks Chunk Names
main-client.js 247 kB 0 [emitted] main-client
ERROR in ./$$_gendir/~/@angular/material/dialog/typings/index.ngfactory.ts
Module parse failed: C:\...\WebApplication1\$$_gendir\node_modules\@angular\
material\dialog\typings\index.ngfactory.ts Unexpected token (20:37)
You may need an appropriate loader to handle this file type.
| import * as i9 from '@angular/cdk/portal';
| import * as i10 from '@angular/material/core';
| export const MatDialogModuleNgFactory:i0.NgModuleFactory<i1.MatDialogModule> = i0.ɵcmf(i1.MatDialogModule,
| ([] as any[]),(_l:any) => {
| return i0.ɵmod([i0.ɵmpd(512,i0.ComponentFactoryResolver,i0.ɵCodegenComponentFactoryResolver,
@ ./$$_gendir/ClientApp/app/app.module.browser.ngfactory.ts 10:0-103
@ ./ClientApp/boot.browser.ts
E RROR in ./$$_gendir/~/@angular/material/datepicker/typings/index.ngfactory.ts
Module parse failed: C:\...\WebApplication1\$$_gendir\node_modules\@angular\
material\datepicker\typings\index.ngfactory.ts Unexpected token (27:41)
You may need an appropriate loader to handle this file type.
| import * as i16 from '../../button/typings/index.ngfactory';
| import * as i17 from '../../icon/typings/index.ngfactory';
| export const MatDatepickerModuleNgFactory:i0.NgModuleFactory<i1.MatDatepickerModule> = i0.ɵcmf(i1.MatDatepickerMod
ule,
| ([] as any[]),(_l:any) => {
| return i0.ɵmod([i0.ɵmpd(512,i0.ComponentFactoryResolver,i0.ɵCodegenComponentFactoryResolver,
@ ./$$_gendir/ClientApp/app/app.module.browser.ngfactory.ts 11:0-107
@ ./ClientApp/boot.browser.ts
`
What is the expected behavior?
What is the current behavior?
What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on @master
): https://goo.gl/DlHd6U
StackBlitz starter (using latest npm
release): https://goo.gl/wwnhMV
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.4 Material beta 12, Typescript 2.3, Windows, Visual Studio 2017 Up 3