varan
Version:
A webpack starter kit for offline-first bring-your-own-code apps with server side rendering
41 lines (40 loc) • 1.28 kB
TypeScript
/// <reference types="node" />
import webpack from 'webpack';
import { ChildProcess } from 'child_process';
import WebpackDevServer from 'webpack-dev-server';
import { ValidConfiguration } from './getConfigs';
import { CompilerStats } from './getCompilerStats';
export interface Options {
configs: ValidConfiguration[];
verbose: boolean;
devServerProtocol: 'http' | 'https';
devServerHost: string;
devServerPort: number;
env: 'development' | 'production';
args: string[];
appDir: string;
openBrowser: boolean;
waitForServer: boolean;
inputFileSystem?: webpack.Compiler['inputFileSystem'];
outputFileSystem?: webpack.Compiler['outputFileSystem'];
[webpackKey: string]: any;
}
export interface VaranWatcher {
close: () => Promise<any>;
totals: CompilerStats;
server: {
close: () => Promise<any>;
watcher: webpack.Compiler.Watching;
compiler: webpack.Compiler;
warnings: string[];
runner: ChildProcess;
} | null;
client: {
close: () => Promise<any>;
runner: WebpackDevServer;
compiler: webpack.Compiler;
warnings: string[];
} | null;
options: Options;
}
export default function watch(options: Partial<Options>): Promise<VaranWatcher>;