import { Plugin } from "webpack"; import { Path } from "../path/path.contract"; import { IWebpackTemplatePluginOptions, WebpackPlugins } from "./plugins/plugins.contract"; export interface IWebpackEntryOptions { app: string; vendor: string[]; } export interface IWebpackOutputOptions { path: string; filename: string; } export interface IWebpackTypeScriptOptions { compilerOptions: Record; } export interface IWebpackSandboxOptions { rootPath: string; dependencies: { [prop: string]: string; }; install: Partial; } export interface IWebpackInstallOptions { command: string; args: string[]; registry: string; disturl: string; type: "emit" | "trigger"; trigger(data: string, type: "stdout" | "stderr"): void; } export interface IWebpackOptions { entry?: Partial; output?: Partial; template?: Partial; typescript?: Partial; sandbox?: Partial; mode?: "production" | "development"; minimize?: boolean; plugins?: Plugin[]; } export declare class WebpackConfig { protected path: Path; protected plugins: WebpackPlugins; constructor(path: Path, plugins: WebpackPlugins); getConfigs(options: IWebpackOptions): { entry: { app: string; vendor: string[]; } | { app: string; vendor: string[]; }; output: { path: string; filename: string; } | { path: string; filename: string; }; mode: "production" | "development"; resolve: { extensions: string[]; modules: string[]; }; optimization: { minimize: boolean; }; module: { rules: ({ test: RegExp; use: string[]; } | { test: RegExp; use: { loader: string; options: { transpileOnly: boolean; getCustomTransformers: () => { before: Plugin[]; }; compilerOptions: { target: string; module: string; lib: string[]; jsx: string; sourceMap: boolean; esModuleInterop: boolean; skipLibCheck: boolean; importHelpers: boolean; outDir: string; } | { target: string; module: string; lib: string[]; jsx: string; sourceMap: boolean; esModuleInterop: boolean; skipLibCheck: boolean; importHelpers: boolean; outDir: string; }; }; }[]; })[]; }; plugins: Plugin[]; }; }