UNPKG

1.68 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import type { CompilerOptions } from '@angular/compiler-cli';
9import type { Compiler } from 'webpack';
10export interface AngularWebpackPluginOptions {
11 tsconfig: string;
12 compilerOptions?: CompilerOptions;
13 fileReplacements: Record<string, string>;
14 substitutions: Record<string, string>;
15 directTemplateLoading: boolean;
16 emitClassMetadata: boolean;
17 emitNgModuleScope: boolean;
18 jitMode: boolean;
19 inlineStyleFileExtension?: string;
20}
21export declare class AngularWebpackPlugin {
22 private readonly pluginOptions;
23 private compilerCliModule?;
24 private compilerNgccModule?;
25 private watchMode?;
26 private ngtscNextProgram?;
27 private builder?;
28 private sourceFileCache?;
29 private webpackCache?;
30 private webpackCreateHash?;
31 private readonly fileDependencies;
32 private readonly requiredFilesToEmit;
33 private readonly requiredFilesToEmitCache;
34 private readonly fileEmitHistory;
35 constructor(options?: Partial<AngularWebpackPluginOptions>);
36 private get compilerCli();
37 get options(): AngularWebpackPluginOptions;
38 apply(compiler: Compiler): void;
39 private setupCompilation;
40 private registerWithCompilation;
41 private markResourceUsed;
42 private rebuildRequiredFiles;
43 private loadConfiguration;
44 private updateAotProgram;
45 private updateJitProgram;
46 private createFileEmitter;
47 private initializeCompilerCli;
48 private addFileEmitHistory;
49 private getFileEmitHistory;
50}