import { Configuration } from 'webpack'; /** * Serializable bundler configuration summary. * * Once transformed into the proper configuration format for the bundling tool, * some values may be difficult or not able to be serialized to text. */ export interface WebpackSummaryOptions { /** Set high level configuration for the bundler. */ mode: 'development' | 'production'; /** Root context of source to bundle. */ context: string; /** Path to first module to execute in the produced bundle. */ entry: string; /** Path on disk to write files produced while bundling. */ outputPath?: string; /** When set to true, we always generate a separate .map file with sourcemap information. * This overrides the default behavior based on mode where development would generate inline sourcemaps. */ shouldGenerateSeparateSourceMaps?: boolean; /** Configure live reload client. */ liveReload?: { /** * Connect the live reload client over an encrypted connection? * * @default true */ https?: boolean; port: number; }; /** Definitions of file types to include in the bundle and how. */ assets: { javascript: JavascriptAssetOptions; }; } export interface JavascriptAssetOptions { assetType: 'javascript'; transpiler: 'babel'; options: any; } /** * Synchronously transform a serializable bundler configuration summary to * webpack configuration format. * * @param param0 summary of webpack compiler config */ export declare function createWebpackCompilerConfig({ mode, context, entry, outputPath, shouldGenerateSeparateSourceMaps, liveReload, assets: { javascript: { options }, }, }: WebpackSummaryOptions): Configuration;