import webpack, { Entry } from "webpack"; import { Configuration as DevServerConfiguration } from "webpack-dev-server"; export interface IOptions { readonly entry?: Entry; readonly output?: webpack.Configuration["output"]; readonly mode?: webpack.Configuration["mode"]; readonly define?: { [key: string]: string; }; readonly useCommonChunk?: boolean; readonly extractCss?: boolean; readonly projectType?: "mpa" | "spa" | "module"; readonly postCSS?: boolean; readonly sourceMap?: string | false; readonly publicPath?: string; readonly corejs?: number; readonly targets?: { [key: string]: string; }; readonly target?: webpack.Configuration["target"] | ((prod: boolean) => webpack.Configuration["target"]); readonly alias?: { [key: string]: string; }; readonly devServer?: DevServerConfiguration; readonly externals?: webpack.Configuration["externals"]; readonly hostPage?: string; readonly hashSize?: number; readonly useHostPage?: boolean; readonly envOption?: { [key: string]: any; }; readonly maxAsyncChunkSize?: number; } export interface IContext { readonly prod: boolean; readonly rootDir: string; readonly extractCss: boolean; readonly packageVersion: string; readonly projectType: IOptions["projectType"]; readonly outputPath: string; readonly outputHashSize: number; } export interface IUseSetFuncParam { resource: string; realResource: string; resourceQuery: string; issuer: string; compiler: string; } export declare type TWebpackConfFunction = (options: IOptions, context: IContext) => T; export declare type TSupportedStyle = ".css" | ".sass" | ".scss" | ".less"; declare module "webpack" { type Plugin = any; namespace compilation { class Compilation { } } type ChunkData = any; }