Skip to content

Commit 19eb5cb

Browse files
clydinalan-agius4
authored andcommitted
refactor(@angular-devkit/build-angular): use type imports for @angular/compiler-cli peer dependency
The `@angular/compiler-cli` is used as a peer dependency and has the potential to not be present. As a result static imports should only be used for types and value imports should be dynamic so that they can be guarded in the event of package absence. There are still several instances of static imports for values but these will be corrected in follow-ups.
1 parent d8554de commit 19eb5cb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/angular_devkit/build_angular/src/utils/build-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { logging } from '@angular-devkit/core';
10-
import { ParsedConfiguration } from '@angular/compiler-cli';
10+
import type { ParsedConfiguration } from '@angular/compiler-cli';
1111
import {
1212
AssetPatternClass,
1313
Budget,

packages/angular_devkit/build_angular/src/utils/read-tsconfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { ParsedConfiguration } from '@angular/compiler-cli';
9+
import type { ParsedConfiguration } from '@angular/compiler-cli';
1010
import * as path from 'path';
1111

1212
/**

packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { getSystemPath } from '@angular-devkit/core';
10-
import { CompilerOptions } from '@angular/compiler-cli';
10+
import type { CompilerOptions } from '@angular/compiler-cli';
1111
import { AngularWebpackLoaderPath, AngularWebpackPlugin } from '@ngtools/webpack';
1212
import { ScriptTarget } from 'typescript';
1313
import { Configuration } from 'webpack';

0 commit comments

Comments
 (0)