File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,11 +215,6 @@ const BuildCommand = Command.extend({
215215 Version . assertAngularVersionIs2_3_1OrHigher ( this . project . root ) ;
216216 Version . assertTypescriptVersion ( this . project . root ) ;
217217
218- // Default vendor chunk to false when build optimizer is on.
219- if ( commandOptions . vendorChunk === undefined ) {
220- commandOptions . vendorChunk = ! commandOptions . buildOptimizer ;
221- }
222-
223218 // Force commonjs module format for TS on dev watch builds.
224219 if ( commandOptions . target === 'development' && commandOptions . watch === true ) {
225220 commandOptions . forceTsCommonjs = true ;
Original file line number Diff line number Diff line change @@ -33,11 +33,6 @@ const EjectCommand = Command.extend({
3333
3434 run : function ( commandOptions : EjectTaskOptions ) {
3535
36- // Default vendor chunk to false when build optimizer is on.
37- if ( commandOptions . vendorChunk === undefined ) {
38- commandOptions . vendorChunk = ! commandOptions . buildOptimizer ;
39- }
40-
4136 const EjectTask = require ( '../tasks/eject' ) . default ;
4237 const ejectTask = new EjectTask ( {
4338 project : this . project ,
Original file line number Diff line number Diff line change @@ -130,11 +130,6 @@ const ServeCommand = Command.extend({
130130 Version . assertAngularVersionIs2_3_1OrHigher ( this . project . root ) ;
131131 Version . assertTypescriptVersion ( this . project . root ) ;
132132
133- // Default vendor chunk to false when build optimizer is on.
134- if ( commandOptions . vendorChunk === undefined ) {
135- commandOptions . vendorChunk = ! commandOptions . buildOptimizer ;
136- }
137-
138133 // Force commonjs module format for TS on dev builds.
139134 if ( commandOptions . target === 'development' ) {
140135 commandOptions . forceTsCommonjs = true ;
Original file line number Diff line number Diff line change @@ -108,14 +108,23 @@ export class NgCliWebpackConfig<T extends BuildOptions = BuildOptions> {
108108 }
109109 } ;
110110
111- const merged = Object . assign ( { } , targetDefaults [ buildOptions . target ] , buildOptions ) ;
111+ let merged = Object . assign ( { } , targetDefaults [ buildOptions . target ] , buildOptions ) ;
112112
113113 // Use Build Optimizer on prod AOT builds by default when AngularCompilerPlugin is supported.
114- const buildOptimizer = {
114+ const buildOptimizerDefault = {
115115 buildOptimizer : merged . aot && AngularCompilerPlugin . isSupported ( )
116116 } ;
117117
118- return Object . assign ( { } , buildOptimizer , merged ) ;
118+ merged = Object . assign ( { } , buildOptimizerDefault , merged ) ;
119+
120+ // Default vendor chunk to false when build optimizer is on.
121+ const vendorChunkDefault = {
122+ vendorChunk : ! merged . buildOptimizer
123+ } ;
124+
125+ merged = Object . assign ( { } , vendorChunkDefault , merged ) ;
126+
127+ return merged ;
119128 }
120129
121130 // Fill in defaults from .angular-cli.json
You can’t perform that action at this time.
0 commit comments