File tree Expand file tree Collapse file tree 9 files changed +27
-8
lines changed Expand file tree Collapse file tree 9 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 2323 - * testTsconfig* (` string ` ): The name of the TypeScript configuration file for unit tests.
2424 - * prefix* (` string ` ): The prefix to apply to generated selectors.
2525 - * serviceWorker* (` boolean ` ): Experimental support for a service worker from @angular/service-worker . Default is ` false ` .
26- - * hideCircularDependencyWarnings * (` boolean ` ): Hide circular dependency warnings on builds. Default is ` false ` .
26+ - * showCircularDependencies * (` boolean ` ): Show circular dependency warnings on builds. Default is ` true ` .
2727 - * styles* (` string|array ` ): Global styles to be included in the build.
2828 - * stylePreprocessorOptions* : Options to pass to style preprocessors.
2929 - * includePaths* (` array ` ): Paths to include. Paths will be resolved to project root.
Original file line number Diff line number Diff line change @@ -312,3 +312,13 @@ Note: service worker support is experimental and subject to change.
312312 Run build when files change.
313313 </p >
314314</details >
315+
316+ <details >
317+ <summary >show-circular-dependencies</summary >
318+ <p >
319+ <code>--show-circular-dependencies</code> (aliases: <code>-scd</code>)
320+ </p >
321+ <p >
322+ Show circular dependency warnings on builds.
323+ </p >
324+ </details >
Original file line number Diff line number Diff line change @@ -138,6 +138,12 @@ export const baseBuildCommandOptions: any = [
138138 type : Boolean ,
139139 default : true ,
140140 description : 'Extract all licenses in a separate file, in the case of production builds only.'
141+ } ,
142+ {
143+ name : 'show-circular-dependencies' ,
144+ type : Boolean ,
145+ aliases : [ 'scd' ] ,
146+ description : 'Show circular dependency warnings on builds.'
141147 }
142148] ;
143149
Original file line number Diff line number Diff line change 118118 "type" : " boolean" ,
119119 "default" : false
120120 },
121- "hideCircularDependencyWarnings " : {
122- "description" : " Hide circular dependency warnings on builds." ,
121+ "showCircularDependencies " : {
122+ "description" : " Show circular dependency warnings on builds." ,
123123 "type" : " boolean" ,
124- "default" : false
124+ "default" : true
125125 },
126126 "styles" : {
127127 "description" : " Global styles to be included in the build." ,
Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ export interface BuildOptions {
2020 deleteOutputPath ?: boolean ;
2121 preserveSymlinks ?: boolean ;
2222 extractLicenses ?: boolean ;
23+ showCircularDependencies ?: boolean ;
2324}
Original file line number Diff line number Diff line change @@ -98,7 +98,8 @@ export class NgCliWebpackConfig {
9898 const mergeableOptions = {
9999 outputPath : appConfig . outDir ,
100100 deployUrl : appConfig . deployUrl ,
101- baseHref : appConfig . baseHref
101+ baseHref : appConfig . baseHref ,
102+ showCircularDependencies : appConfig . showCircularDependencies
102103 } ;
103104
104105 return Object . assign ( { } , mergeableOptions , buildOptions ) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
7373 } ) ) ;
7474 }
7575
76- if ( ! appConfig . hideCircularDependencyWarnings ) {
76+ if ( buildOptions . showCircularDependencies ) {
7777 extraPlugins . push ( new CircularDependencyPlugin ( {
7878 exclude : / ( \\ | \/ ) n o d e _ m o d u l e s ( \\ | \/ ) /
7979 } ) ) ;
Original file line number Diff line number Diff line change @@ -513,6 +513,7 @@ export default Task.extend({
513513 'style-loader' ,
514514 'stylus-loader' ,
515515 'url-loader' ,
516+ 'circular-dependency-plugin' ,
516517 ] . forEach ( ( packageName : string ) => {
517518 packageJson [ 'devDependencies' ] [ packageName ] = ourPackageJson [ 'dependencies' ] [ packageName ] ;
518519 } ) ;
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import { ng } from '../../utils/process';
55export default async function ( ) {
66 await prependToFile ( 'src/app/app.component.ts' ,
77 `import { AppModule } from './app.module'; console.log(AppModule);` ) ;
8- let output = await ng ( 'build' ) ;
8+ let output = await ng ( 'build' , '--show-circular-dependencies' ) ;
99 if ( ! output . stdout . match ( / W A R N I N G i n C i r c u l a r d e p e n d e n c y d e t e c t e d / ) ) {
1010 throw new Error ( 'Expected to have circular dependency warning in output.' ) ;
1111 }
1212
13- await ng ( 'set' , 'apps.0.hideCircularDependencyWarnings=true ' ) ;
13+ await ng ( 'set' , 'apps.0.showCircularDependencies=false ' ) ;
1414 output = await ng ( 'build' ) ;
1515 if ( output . stdout . match ( / W A R N I N G i n C i r c u l a r d e p e n d e n c y d e t e c t e d / ) ) {
1616 throw new Error ( 'Expected to not have circular dependency warning in output.' ) ;
You can’t perform that action at this time.
0 commit comments