You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
998 B

import { IConfig, BundlerConfigType } from '@umijs/types';
import defaultWebpack from 'webpack';
import { IServerOpts } from '@umijs/server';
import { IOpts as IGetConfigOpts } from './getConfig/getConfig';
interface IOpts {
cwd: string;
config: IConfig;
}
declare class Bundler {
static id: string;
static version: number;
cwd: string;
config: IConfig;
constructor({ cwd, config }: IOpts);
getConfig(opts: Omit<IGetConfigOpts, 'cwd' | 'config'>): Promise<defaultWebpack.Configuration>;
build({ bundleConfigs, bundleImplementor, }: {
bundleConfigs: defaultWebpack.Configuration[];
bundleImplementor?: typeof defaultWebpack;
}): Promise<{
stats: defaultWebpack.Stats;
}>;
setupDevServerOpts({ bundleConfigs, bundleImplementor, }: {
bundleConfigs: defaultWebpack.Configuration[];
bundleImplementor?: typeof defaultWebpack;
}): IServerOpts;
}
export { Bundler, BundlerConfigType, defaultWebpack as webpack };