ngc-webpack
Version:
A wrapper for the @ngtools/webpack with hooks into the compilation process
17 lines (16 loc) • 638 B
TypeScript
import * as ts from 'typescript';
import { AngularCompilerPlugin } from '@ngtools/webpack';
export interface MonkeyWebpackResourceLoader {
get(filePath: string): Promise<string>;
}
export interface MonkeyWebpackCompilerHost extends ts.CompilerHost {
_files: {
[path: string]: any | null;
};
_resourceLoader?: MonkeyWebpackResourceLoader | undefined;
readResource?(fileName: string): Promise<string> | string;
}
export interface MonkeyAngularCompilerPlugin extends Pick<AngularCompilerPlugin, 'apply'> {
_compilerHost: MonkeyWebpackCompilerHost;
_transformers: ts.TransformerFactory<ts.SourceFile>[];
}