File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
packages/ngtools/webpack/src
tests/legacy-cli/e2e/tests/misc Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,10 @@ export class WebpackCompilerHost implements ts.CompilerHost {
246246 return this . readFile ( fileName ) ;
247247 }
248248 }
249+
250+ trace ( message : string ) {
251+ console . log ( message ) ;
252+ }
249253}
250254
251255
Original file line number Diff line number Diff line change 1+ import { ng } from '../../utils/process' ;
2+ import { updateJsonFile } from '../../utils/project' ;
3+
4+ export default async function ( ) {
5+ await updateJsonFile ( 'tsconfig.json' , tsconfig => {
6+ tsconfig . compilerOptions . traceResolution = true ;
7+ } ) ;
8+
9+ const { stdout : stdoutTraced } = await ng ( 'build' ) ;
10+ if ( ! / R e s o l v i n g m o d u l e / . test ( stdoutTraced ) ) {
11+ throw new Error ( `Modules resolutions must be printed when 'traceResolution' is enabled.` ) ;
12+ }
13+
14+ await updateJsonFile ( 'tsconfig.json' , tsconfig => {
15+ tsconfig . compilerOptions . traceResolution = false ;
16+ } ) ;
17+
18+ const { stdout : stdoutUnTraced } = await ng ( 'build' ) ;
19+ if ( / R e s o l v i n g m o d u l e / . test ( stdoutUnTraced ) ) {
20+ throw new Error ( `Modules resolutions must not be printed when 'traceResolution' is disabled.` ) ;
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments