/// import { Env, Task, Target, Service, WebApp, Package, Project, Workspace, PluginApi, StepResources, WaterfallHook } from '@sewing-kit/core'; import type { BuildWebAppTargetOptions, BuildServiceTargetOptions, BuildPackageTargetOptions } from '@sewing-kit/core'; interface WebpackHooks { readonly webpackCachePath: WaterfallHook; readonly webpackTarget: WaterfallHook>; readonly webpackRules: WaterfallHook>; readonly webpackDevtool: WaterfallHook; readonly webpackPlugins: WaterfallHook>; readonly webpackConfig: WaterfallHook>; readonly webpackPublicPath: WaterfallHook; readonly webpackExternals: WaterfallHook>; readonly webpackOutputDirectory: WaterfallHook; readonly webpackOutputFilename: WaterfallHook; readonly webpackOutputChunkFilename: WaterfallHook; readonly webpackOutputHashFunction: WaterfallHook; readonly webpackOutputHashDigestLength: WaterfallHook; readonly webpackEntries: WaterfallHook>; readonly webpackExtensions: WaterfallHook>; readonly webpackAliases: WaterfallHook<{ [key: string]: string; }>; readonly webpackMainFields: WaterfallHook>; readonly webpackOptimize: WaterfallHook; readonly webpackOptimizeMinimize: WaterfallHook; readonly webpackOptimizeNamedOutputs: WaterfallHook; readonly webpackOptimizeMinizers: WaterfallHook>>; readonly webpackOptimizeRuntimeChunk: WaterfallHook; readonly webpackOptimizeSplitChunks: WaterfallHook; readonly webpackTerserOptions: WaterfallHook; readonly webpackTerserParallel: WaterfallHook; readonly webpackTerserPluginOptions: WaterfallHook; readonly webpackPerformance: WaterfallHook; } declare type WebpackStats = import('webpack').Stats; declare type WebpackStatsMap = Map; interface WebpackProjectContext { readonly webpackStats: WebpackStatsMap; } declare module '@sewing-kit/core' { interface BuildProjectConfigurationCustomHooks extends WebpackHooks { } interface DevProjectConfigurationCustomHooks extends WebpackHooks { } interface BuildWebAppCustomContext extends WebpackProjectContext { } interface BuildPackageCustomContext extends WebpackProjectContext { } interface BuildServiceCustomContext extends WebpackProjectContext { } } export declare function webpackHooks(): import("@sewing-kit/core").ProjectPlugin; interface BuildWebpackOptions { config?: Partial; resources?: StepResources; } export declare function webpackBuild({ config, resources }?: BuildWebpackOptions): import("@sewing-kit/core").ProjectPlugin; interface BuildWebpackStepOptions extends BuildWebpackOptions { env: Env; api: PluginApi; hooks: Partial; target: Target; workspace: Workspace; sourceMaps?: boolean; stats?: WebpackStatsMap; } export declare function createWebpackBuildStep({ env, api, hooks, workspace, sourceMaps, config, resources, stats, target, }: BuildWebpackStepOptions): import("@sewing-kit/core").Step; export declare function createWebpackConfig({ env, api, hooks, target, workspace, sourceMaps, config: explicitConfig, }: Pick): Promise>; interface CacheLoaderOptions { env: Env; api: PluginApi; postfix?: string; project: Project; cachePath: string; dependencies: ReadonlyArray; configuration: Partial; } export declare function createCacheLoaderRule({ env, api, postfix, project, dependencies, cachePath, configuration, }: CacheLoaderOptions): Promise; interface WebpackConfigurationChangePluginOptions { id?: string; include?: (Task.Dev | Task.Build)[]; } declare type ValueOrArray = TValue | TValue[]; declare type ValueOrGetter = TValue | (() => TValue | Promise); export declare function webpackRules(rules: ValueOrGetter>, options?: WebpackConfigurationChangePluginOptions): import("@sewing-kit/core").ProjectPlugin; export declare function webpackPlugins(plugins: ValueOrGetter>, options?: WebpackConfigurationChangePluginOptions): import("@sewing-kit/core").ProjectPlugin; export declare function webpackExternals(externals: ValueOrGetter>, options?: WebpackConfigurationChangePluginOptions): import("@sewing-kit/core").ProjectPlugin; export declare function webpackSplitChunks(splitChunks: ValueOrGetter>, options?: WebpackConfigurationChangePluginOptions): import("@sewing-kit/core").ProjectPlugin; export declare function webpackDevtool(devtool: ValueOrGetter, options?: WebpackConfigurationChangePluginOptions): import("@sewing-kit/core").ProjectPlugin; export declare function webpackAliases(aliases: ValueOrGetter<{ [key: string]: string; }>, options?: WebpackConfigurationChangePluginOptions): import("@sewing-kit/core").ProjectPlugin; export declare function noopModuleWithWebpack(module: RegExp, options?: WebpackConfigurationChangePluginOptions): import("@sewing-kit/core").ProjectPlugin; declare type Handler = (stats: import('webpack').Stats) => any; export declare class BuildManager { private readonly listeners; on(project: Project, handler: Handler): () => boolean; emit(project: Project, stats: import('webpack').Stats): void; } export {}; //# sourceMappingURL=plugin-webpack.d.ts.map