varan
Version:
A webpack starter kit for offline-first bring-your-own-code apps with server side rendering
39 lines (38 loc) • 1.14 kB
TypeScript
/// <reference types="webpack-dev-server" />
import webpack from 'webpack';
import { BuildStats } from './getBuildStatsFromManifest';
import { CompilerStats } from './getCompilerStats';
import { ValidConfiguration } from './getConfigs';
interface TaskContext {
build?: TaskContextBuild;
previousBuild?: BuildStats | null;
currentBuild?: BuildStats | null;
errors: string[];
warnings: string[];
}
interface TaskContextBuild {
stats: webpack.Stats;
config: webpack.Configuration;
outputPath: webpack.Output['path'];
configFile: string;
}
interface TaskListContext {
stats: TaskContext[];
totals: CompilerStats;
}
export interface Options {
configs: ValidConfiguration[];
verbose: boolean;
warnAssetSize: number;
warnChunkSize: number;
env: 'development' | 'production';
appDir: string;
inputFileSystem?: webpack.Compiler['inputFileSystem'];
outputFileSystem?: webpack.Compiler['outputFileSystem'];
[webpackKey: string]: any;
}
export default function build(options: Partial<Options>): Promise<{
result: TaskListContext;
options: Options;
}>;
export {};