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');
4646
4747export type DevServerBuilderOptions = Schema & json . JsonObject ;
4848
49- export const devServerBuildOverriddenKeys : ( keyof DevServerBuilderOptions ) [ ] = [
49+ const devServerBuildOverriddenKeys : ( keyof DevServerBuilderOptions ) [ ] = [
5050 'watch' ,
5151 'optimization' ,
5252 'aot' ,
Original file line number Diff line number Diff line change 4444 },
4545 "verbose" : {
4646 "type" : " boolean" ,
47- "description" : " Adds more details to output logging." ,
48- "default" : false
47+ "description" : " Adds more details to output logging."
4948 },
5049 "liveReload" : {
5150 "type" : " boolean" ,
117116 },
118117 "sourceMap" : {
119118 "description" : " Output sourcemaps." ,
120- "default" : true ,
121119 "oneOf" : [
122120 {
123121 "type" : " object" ,
153151 "vendorSourceMap" : {
154152 "type" : " boolean" ,
155153 "description" : " Resolve vendor packages sourcemaps." ,
156- "x-deprecated" : true ,
157- "default" : false
154+ "x-deprecated" : true
158155 },
159156 "evalSourceMap" : {
160157 "type" : " boolean" ,
Original file line number Diff line number Diff line change @@ -92,4 +92,14 @@ describe('Dev Server Builder', () => {
9292 expect ( await response . text ( ) ) . toContain ( '<title>HelloWorldApp</title>' ) ;
9393 } ) ;
9494
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+
95105} ) ;
You can’t perform that action at this time.
0 commit comments