import { Minimatch } from 'minimatch'; import { BuildTypes, BundlessTypes, FastscBaseConfig, FastscBundleConfig, FastscBundlessConfig, FastscConfig, PkgType } from '../types'; /** * declare bundler config */ export interface IBundleConfig extends FastscConfig, Omit { type: BuildTypes.BUNDLE; bundler: 'webpack'; entry: string; output: { filename: string; path: string; }; } /** * declare bundless config */ export interface IBundlessConfig extends FastscBaseConfig, Omit { type: BuildTypes.BUNDLESS; format: BundlessTypes; input: string; } /** * declare union builder config */ export declare type IBuilderConfig = IBundleConfig | IBundlessConfig; /** * * convert alias from tsconfig paths * @export * @param {string} cwd */ export declare function convertAliasByTsconfigPaths(cwd: string): { bundle: Record; bundless: Record; }; /** * normalize user config to bundler configs * @param userConfig config from user * @param pkg */ export declare function normalizeUserConfig(userConfig: FastscConfig, pkg: PkgType): IBuilderConfig[]; declare class Minimatcher { matcher?: InstanceType; ignoreMatchers: InstanceType[]; constructor(pattern: string, ignores?: string[]); match(filePath: string): boolean; } declare class ConfigProvider { pkg: ConstructorParameters[0]; constructor(pkg: PkgType); onConfigChange(): void; } export declare class BundleConfigProvider extends ConfigProvider { type: BuildTypes; configs: IBundleConfig[]; constructor(configs: IBundleConfig[], pkg: ConstructorParameters[0]); } export declare class BundlessConfigProvider extends ConfigProvider { type: BuildTypes; configs: IBundlessConfig[]; input: string; output: string; matchers: InstanceType[]; constructor(configs: IBundlessConfig[], pkg: ConstructorParameters[0]); getConfigForFile(filePath: string): IBundlessConfig; } export declare function createConfigProviders(userConfig: FastscConfig, pkg: PkgType, cwd: string): { bundless: { esm?: BundlessConfigProvider; cjs?: BundlessConfigProvider; }; bundle?: BundleConfigProvider | undefined; }; export {};