import { UserConfig, ResolvedConfig } from './config';
import { Plugin, RollupOptions, RollupWarning, WarningHandler, WarningHandlerWithDefault, RollupOutput } from 'rollup';
import { Terser } from 'types/terser';
import { TransformOptions } from 'esbuild';
import { CleanCSS } from 'types/clean-css';
export interface BuildOptions {
    /**
     * Base public path when served in production.
     * @default '/'
     */
    base?: string;
    /**
     * Compatibility transform target. The transform is performed with esbuild
     * and the lowest supported target is es2015/es6. Default: es2020
     * https://esbuild.github.io/api/#target
     */
    target?: TransformOptions['target'] | false;
    /**
     * Directory relative from `root` where build output will be placed. If the
     * directory exists, it will be removed before the build.
     * @default 'dist'
     */
    outDir?: string;
    /**
     * Directory relative from `outDir` where the built js/css/image assets will
     * be placed.
     * @default 'assets'
     */
    assetsDir?: string;
    /**
     * Static asset files smaller than this number (in bytes) will be inlined as
     * base64 strings. Default limit is `4096` (4kb). Set to `0` to disable.
     * @default 4096
     */
    assetsInlineLimit?: number;
    /**
     * Generate a revision hash for each asset in the "public" directory.
     */
    getPublicHash?: (file: string) => string | null;
    /**
     * Whether to code-split CSS. When enabled, CSS in async chunks will be
     * inlined as strings in the chunk and inserted via dynamically created
     * style tags when the chunk is loaded.
     * @default true
     */
    cssCodeSplit?: boolean;
    /**
     * Whether to generate sourcemap
     * @default false
     */
    sourcemap?: boolean | 'inline';
    /**
     * Set to `false` to disable minification, or specify the minifier to use.
     * Available options are 'terser' or 'esbuild'.
     * @default 'terser'
     */
    minify?: boolean | 'terser' | 'esbuild';
    /**
     * Options for terser
     * https://terser.org/docs/api-reference#minify-options
     */
    terserOptions?: Terser.MinifyOptions;
    /**
     * Options for clean-css
     * https://github.com/jakubpawlowicz/clean-css#constructor-options
     */
    cleanCssOptions?: CleanCSS.Options;
    /**
     * Will be merged with internal rollup options.
     * https://rollupjs.org/guide/en/#big-list-of-options
     */
    rollupOptions?: RollupOptions;
    /**
     * Whether to write bundle to disk
     * @default true
     */
    write?: boolean;
    /**
     * Whether to emit a manifest.json under assets dir to map hash-less filenames
     * to their hashed versions. Useful when you want to generate your own HTML
     * instead of using the one generated by Vite.
     *
     * Example:
     *
     * ```json
     * {
     *   "main.js": { "file": "main.68fe3fad.js" },
     *   "style.css": { "file": "style.e6b63442.css" }
     * }
     * ```
     * @default false
     */
    manifest?: boolean;
    /**
     * Build in library mode. The value should be the global name of the lib in
     * UMD mode. This will produce esm + cjs + umd bundle formats with default
     * configurations that are suitable for distributing libraries.
     */
    lib?: LibraryOptions | false;
    /**
     * @internal for now
     */
    ssr?: boolean;
}
export interface LibraryOptions {
    entry: string;
    name?: string;
    formats?: LibraryFormats[];
}
export declare type LibraryFormats = 'es' | 'cjs' | 'umd' | 'iife';
export declare function resolveBuildOptions(raw?: BuildOptions): Required<BuildOptions>;
export declare function resolveBuildPlugins(config: ResolvedConfig): {
    pre: Plugin[];
    post: Plugin[];
};
/**
 * Bundles the app for production.
 * Returns a Promise containing the build result.
 */
export declare function build(inlineConfig?: UserConfig & {
    mode?: string;
}, configPath?: string | false): Promise<RollupOutput | RollupOutput[]>;
export declare function onRollupWarning(warning: RollupWarning, warn: WarningHandler, allowNodeBuiltins?: string[], userOnWarn?: WarningHandlerWithDefault): void;
