File tree Expand file tree Collapse file tree 4 files changed +12
-18
lines changed Expand file tree Collapse file tree 4 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -215,11 +215,6 @@ const BuildCommand = Command.extend({
215
215
Version . assertAngularVersionIs2_3_1OrHigher ( this . project . root ) ;
216
216
Version . assertTypescriptVersion ( this . project . root ) ;
217
217
218
- // Default vendor chunk to false when build optimizer is on.
219
- if ( commandOptions . vendorChunk === undefined ) {
220
- commandOptions . vendorChunk = ! commandOptions . buildOptimizer ;
221
- }
222
-
223
218
// Force commonjs module format for TS on dev watch builds.
224
219
if ( commandOptions . target === 'development' && commandOptions . watch === true ) {
225
220
commandOptions . forceTsCommonjs = true ;
Original file line number Diff line number Diff line change @@ -33,11 +33,6 @@ const EjectCommand = Command.extend({
33
33
34
34
run : function ( commandOptions : EjectTaskOptions ) {
35
35
36
- // Default vendor chunk to false when build optimizer is on.
37
- if ( commandOptions . vendorChunk === undefined ) {
38
- commandOptions . vendorChunk = ! commandOptions . buildOptimizer ;
39
- }
40
-
41
36
const EjectTask = require ( '../tasks/eject' ) . default ;
42
37
const ejectTask = new EjectTask ( {
43
38
project : this . project ,
Original file line number Diff line number Diff line change @@ -130,11 +130,6 @@ const ServeCommand = Command.extend({
130
130
Version . assertAngularVersionIs2_3_1OrHigher ( this . project . root ) ;
131
131
Version . assertTypescriptVersion ( this . project . root ) ;
132
132
133
- // Default vendor chunk to false when build optimizer is on.
134
- if ( commandOptions . vendorChunk === undefined ) {
135
- commandOptions . vendorChunk = ! commandOptions . buildOptimizer ;
136
- }
137
-
138
133
// Force commonjs module format for TS on dev builds.
139
134
if ( commandOptions . target === 'development' ) {
140
135
commandOptions . forceTsCommonjs = true ;
Original file line number Diff line number Diff line change @@ -108,14 +108,23 @@ export class NgCliWebpackConfig<T extends BuildOptions = BuildOptions> {
108
108
}
109
109
} ;
110
110
111
- const merged = Object . assign ( { } , targetDefaults [ buildOptions . target ] , buildOptions ) ;
111
+ let merged = Object . assign ( { } , targetDefaults [ buildOptions . target ] , buildOptions ) ;
112
112
113
113
// Use Build Optimizer on prod AOT builds by default when AngularCompilerPlugin is supported.
114
- const buildOptimizer = {
114
+ const buildOptimizerDefault = {
115
115
buildOptimizer : merged . aot && AngularCompilerPlugin . isSupported ( )
116
116
} ;
117
117
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 ;
119
128
}
120
129
121
130
// Fill in defaults from .angular-cli.json
You can’t perform that action at this time.
0 commit comments