File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed
packages/@angular/cli/commands Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -135,11 +135,8 @@ const ServeCommand = Command.extend({
135135 commandOptions . vendorChunk = ! commandOptions . buildOptimizer ;
136136 }
137137
138- // Default evalSourcemaps to true when sourcemaps are true.
139- // This makes rebuilds faster.
140- if ( commandOptions . sourcemaps === true ) {
141- commandOptions . evalSourcemaps = true ;
142- }
138+ // Default evalSourcemaps to true for serve. This makes rebuilds faster.
139+ commandOptions . evalSourcemaps = true ;
143140
144141 return checkPort ( commandOptions . port , commandOptions . host , defaultPort )
145142 . then ( port => {
Original file line number Diff line number Diff line change 1+ import { execAndWaitForOutputToMatch , killAllProcesses } from '../../utils/process' ;
2+ import { getGlobalVariable } from '../../utils/env' ;
3+
4+
5+ export default function ( ) {
6+ // Skip this in ejected tests.
7+ if ( getGlobalVariable ( 'argv' ) . eject ) {
8+ return Promise . resolve ( ) ;
9+ }
10+
11+ return Promise . resolve ( )
12+ // Check that ng serve has eval sourcemaps by default.
13+ . then ( ( ) => execAndWaitForOutputToMatch ( 'ng' , [ 'serve' ] , / w e b p a c k : C o m p i l e d s u c c e s s f u l l y / ) )
14+ . then ( ( output ) => {
15+ const stdout = output . stdout ;
16+ if ( / \. j s \. m a p / . test ( stdout ) ) {
17+ throw new Error ( 'Expected eval sourcemap but file sourcemap was present instead.' ) ;
18+ }
19+ } )
20+ . then ( ( ) => killAllProcesses ( ) , ( err : any ) => {
21+ killAllProcesses ( ) ;
22+ throw err ;
23+ } ) ;
24+ }
You can’t perform that action at this time.
0 commit comments