File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
packages/angular_devkit/build_angular Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ const open = require('open');
46
46
47
47
export type DevServerBuilderOptions = Schema & json . JsonObject ;
48
48
49
- export const devServerBuildOverriddenKeys : ( keyof DevServerBuilderOptions ) [ ] = [
49
+ const devServerBuildOverriddenKeys : ( keyof DevServerBuilderOptions ) [ ] = [
50
50
'watch' ,
51
51
'optimization' ,
52
52
'aot' ,
Original file line number Diff line number Diff line change 44
44
},
45
45
"verbose" : {
46
46
"type" : " boolean" ,
47
- "description" : " Adds more details to output logging." ,
48
- "default" : false
47
+ "description" : " Adds more details to output logging."
49
48
},
50
49
"liveReload" : {
51
50
"type" : " boolean" ,
117
116
},
118
117
"sourceMap" : {
119
118
"description" : " Output sourcemaps." ,
120
- "default" : true ,
121
119
"oneOf" : [
122
120
{
123
121
"type" : " object" ,
153
151
"vendorSourceMap" : {
154
152
"type" : " boolean" ,
155
153
"description" : " Resolve vendor packages sourcemaps." ,
156
- "x-deprecated" : true ,
157
- "default" : false
154
+ "x-deprecated" : true
158
155
},
159
156
"evalSourceMap" : {
160
157
"type" : " boolean" ,
Original file line number Diff line number Diff line change @@ -92,4 +92,14 @@ describe('Dev Server Builder', () => {
92
92
expect ( await response . text ( ) ) . toContain ( '<title>HelloWorldApp</title>' ) ;
93
93
} ) ;
94
94
95
+ it ( 'should not generate sourcemaps when running prod build' , async ( ) => {
96
+ // Production builds have sourcemaps turned off.
97
+ const run = await architect . scheduleTarget ( { ...target , configuration : 'production' } ) ;
98
+ runs . push ( run ) ;
99
+ const output = await run . result as DevServerBuilderOutput ;
100
+ expect ( output . success ) . toBe ( true ) ;
101
+ const hasSourceMaps = output . emittedFiles && output . emittedFiles . some ( f => f . extension === '.map' ) ;
102
+ expect ( hasSourceMaps ) . toBe ( false , `Expected emitted files not to contain '.map' files.` ) ;
103
+ } ) ;
104
+
95
105
} ) ;
You can’t perform that action at this time.
0 commit comments