angular - ng build --prod removes navbar -
the --prod
cli flag reason removes navbar compiled output. ideas why?
my app.component looks this:
import { component } '@angular/core'; import { router_directives } '@angular/router'; @component({ selector: 'app-root', template: ` <nav-bar></nav-bar> <router-outlet> </router-outlet>`, directives: [router_directives] }) export class appcomponent {}
and navbar component:
import { component, oninit } '@angular/core'; import { globalevent } '../shared/global.event' import { http, response } '@angular/http'; @component({ selector: 'nav-bar', templateurl: 'navbar.component.html', providers: [globalevent], styleurls: ['navbar.component.css'], }) export class navbarcomponent implements oninit { ... }
note: building --dev
flag works expected. hope isn't cli issue.
apparently known issue angular-cli. see here.
fix going nano node_modules/angular-cli/addon/ng2/models/webpack-build-production.ts
and changing mangle: { screw_ie8 : true }, //prod
to mangle: { screw_ie8 : true, keep_fnames:true }, //prod
Comments
Post a Comment