File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/@angular/cli/models/webpack-configs Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,9 @@ export function getAotConfig(wco: WebpackConfigOptions) {
134134 // Fallback to exclude spec files from AoT compilation on projects using a shared tsconfig.
135135 if ( testTsConfigPath === tsConfigPath ) {
136136 let exclude = [ '**/*.spec.ts' ] ;
137- if ( appConfig . test ) { exclude . push ( path . join ( projectRoot , appConfig . root , appConfig . test ) ) ; }
137+ if ( appConfig . test ) {
138+ exclude . push ( path . join ( projectRoot , appConfig . root , appConfig . test ) ) ;
139+ }
138140 pluginOptions . exclude = exclude ;
139141 }
140142
@@ -164,7 +166,10 @@ export function getNonAotTestConfig(wco: WebpackConfigOptions) {
164166 // Force include main and polyfills.
165167 // This is needed for AngularCompilerPlugin compatibility with existing projects,
166168 // since TS compilation there is stricter and tsconfig.spec.ts doesn't include them.
167- const include = [ appConfig . main , appConfig . polyfills ] ;
169+ const include = [ appConfig . main , appConfig . polyfills , '**/*.spec.ts' ] ;
170+ if ( appConfig . test ) {
171+ include . push ( appConfig . test ) ;
172+ }
168173
169174 let pluginOptions : any = { tsConfigPath, skipCodeGeneration : true , include } ;
170175
You can’t perform that action at this time.
0 commit comments