@farmfe/core
Version:
Farm is a extremely fast web build tool written in Rust. Farm can start a project in milliseconds and perform HMR within 10ms, making it much faster than similar tools like webpack and vite.
28 lines (27 loc) • 976 B
TypeScript
import { FSWatcher } from 'chokidar';
import { Compiler } from '../compiler/index.js';
import { Server } from '../server/index.js';
import { Logger } from '../utils/index.js';
import type { ResolvedUserConfig } from '../config/index.js';
interface ImplFileWatcher {
watch(): Promise<void>;
}
export declare class FileWatcher implements ImplFileWatcher {
serverOrCompiler: Server | Compiler;
options: ResolvedUserConfig;
private _logger;
private _root;
private _watcher;
private _close;
private _watchedFiles;
constructor(serverOrCompiler: Server | Compiler, options: ResolvedUserConfig, _logger: Logger);
getInternalWatcher(): FSWatcher;
filterWatchFile(file: string, root: string): boolean;
getExtraWatchedFiles(): string[];
watchExtraFiles(): void;
watch(): Promise<void>;
private getCompilerFromServerOrCompiler;
close(): void;
}
export declare function clearModuleCache(modulePath: string): void;
export {};