import type { IConfig as IBundlerWebpackConfig, ICopy } from '@umijs/bundler-webpack/dist/types'; import type { ExternalConfig } from '@utoo/pack'; import { IApi, IFatherBaseConfig } from '../types'; import type { IBundlessConfig } from './config'; export declare function addSourceMappingUrl(code: string, loc: string): string; export declare function getBaseTransformReactOpts(pkg: IApi['pkg'], cwd: string): false | Record; export declare function getBabelPresetReactOpts(pkg: IApi['pkg'], cwd: string): { [x: string]: any; }; export declare function getSWCTransformReactOpts(pkg: IApi['pkg'], cwd: string): { [x: string]: any; }; export declare function getEsbuildJsxOpts(pkg: IApi['pkg'], cwd: string): { jsx?: 'automatic' | 'transform'; jsxDev?: boolean; }; export declare function ensureRelativePath(relativePath: string): string; export declare function getBundleTargets({ targets }: IFatherBaseConfig): any; export declare function getBundlessTargets(config: IBundlessConfig): any; export declare function getBabelStyledComponentsOpts(pkg: IApi['pkg']): false | { fileName: boolean; namespace?: string | undefined; }; export declare function getContentHash(content: string, length?: number): string; /** * Convert webpack externals configuration to utoopack externals format * @param externals webpack externals configuration * @returns utoopack externals configuration */ export declare function convertExternalsToUtooPackExternals(externals?: IBundlerWebpackConfig['externals']): Record | undefined; export declare function convertCopyConfig(copy?: IBundlerWebpackConfig['copy'], distPath?: string): Array;