Hi laurentsd and aihumlae, do your team face some issues when optimizing plugin using 'ng build' with '--prod' and '--aot' options for production? For instance, run 'ng build --prod --aot' in ui project, we get errors like this:
C:\Users\gengp1\Work\SourceCode\vsi_h5_ui\vsi-ui>ng build --prod
Hash: e61141b80d388c5821d1
Time: 77474ms
chunk {0} 0.61f9c44c941dfaf5ee13.chunk.js 5.73 kB {1} [rendered]
chunk {1} main.b192b51f821a603eeebe.bundle.js (main) 1.11 MB {4} [initial] [rendered]
chunk {2} scripts.ccae0d17f324b95caac3.bundle.js (scripts) 576 kB {5} [initial] [rendered]
chunk {3} styles.7291c38157c5ba8a68ed.bundle.css (styles) 175 bytes {5} [initial] [rendered]
chunk {4} vendor.0405bc9eba2224942759.bundle.js (vendor) 2.48 MB [initial] [rendered]
chunk {5} inline.6381d29c4feb106cedf5.bundle.js (inline) 0 bytes [entry] [rendered]
ERROR in C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/modals/sis-dialog.component.ngfactory.t
s (1164,45): Property 'gs' is private and only accessible within class 'SISDialogComponent'.
ERROR in C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/app-routing.component.ngfactory.ts (225,49):
Property 'gs' is private and only accessible within class 'AppRoutingComponent'.
ERROR in C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/main/main.component.ngfactory.ts (1064,
44): Property 'gs' is private and only accessible within class 'MainComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/main/main.component.ngfactory.ts (1091,45): Prop
erty 'gs' is private and only accessible within class 'MainComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/main/main.component.ngfactory.ts (1094,45): Prop
erty 'gs' is private and only accessible within class 'MainComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/main/main.component.ngfactory.ts (1097,50): Prop
erty 'gs' is private and only accessible within class 'MainComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/main/main.component.ngfactory.ts (1345,48): Prop
erty 'nav' is private and only accessible within class 'MainComponent'.
ERROR in C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/modals/sis-dialog.component.ngfactory.t
s (1164,45): Property 'gs' is private and only accessible within class 'SISDialogComponent'.
ERROR in C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/monitor/monitor.component.ngfactory.ts
(921,44): Property 'gs' is private and only accessible within class 'MonitorComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/monitor/monitor.component.ngfactory.ts (924,45):
Property 'gs' is private and only accessible within class 'MonitorComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/monitor/monitor.component.ngfactory.ts (930,51):
Property 'gs' is private and only accessible within class 'MonitorComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/monitor/monitor.component.ngfactory.ts (933,51):
Property 'gs' is private and only accessible within class 'MonitorComponent'.
ERROR in C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/summary/summary.component.ngfactory.ts
(484,44): Property 'gs' is private and only accessible within class 'SummaryComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/summary/summary.component.ngfactory.ts (487,45):
Property 'gs' is private and only accessible within class 'SummaryComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/summary/summary.component.ngfactory.ts (490,45):
Property 'gs' is private and only accessible within class 'SummaryComponent'.
C:/Users/gengp1/Work/SourceCode/vsi_h5_ui/vsi-ui/src/$$_gendir/app/views/summary/summary.component.ngfactory.ts (493,45):
Property 'gs' is private and only accessible within class 'SummaryComponent'.
And I find the issue has been reported on Angular-CLI github: Property is private and only accessible within class · Issue #5621 · angular/angular-cli · GitHub
But they only fixed it in Angular 4.0, do you think we need to upgrade Angular 2.4 to 4.0? Or any other suggestions to fix this issue?
Very much hope to get your help.