import { Plugin } from './plugin';
import { BuildOptions } from './build';
import { ServerOptions } from './server';
import { CSSOptions } from './plugins/css';
import { ESBuildOptions } from './plugins/esbuild';
import { Alias, AliasOptions } from 'types/alias';
import { Logger, LogLevel } from './logger';
import { DepOptimizationOptions } from './optimizer';
export interface ConfigEnv {
    command: 'build' | 'serve';
    mode: string;
}
export declare type UserConfigFn = (env: ConfigEnv) => UserConfig;
export declare type UserConfigExport = UserConfig | UserConfigFn;
/**
 * Type helper to make it easier to use vite.config.ts
 * accepts a direct {@link UserConfig} object, or a function that returns it.
 * The function receives a {@link ConfigEnv} object that exposes two properties:
 * `command` (either `'build'` or `'serve'`), and `mode`.
 */
export declare function defineConfig(config: UserConfigExport): UserConfigExport;
export interface UserConfig {
    /**
     * Project root directory. Can be an absolute path, or a path relative from
     * the location of the config file itself.
     * @default process.cwd()
     */
    root?: string;
    /**
     * Import aliases
     */
    alias?: AliasOptions;
    /**
     * Define global variable replacements.
     * Entries will be defined on `window` during dev and replaced during build.
     */
    define?: Record<string, any>;
    /**
     * Array of vite plugins to use.
     */
    plugins?: (Plugin | Plugin[])[];
    /**
     * CSS related options (preprocessors and CSS modules)
     */
    css?: CSSOptions;
    /**
     * Transform options to pass to esbuild.
     * Or set to `false` to disable esbuild.
     */
    esbuild?: ESBuildOptions | false;
    /**
     * Specify additional files to be treated as static assets.
     */
    assetsInclude?: string | RegExp | (string | RegExp)[];
    /**
     * Server specific options, e.g. host, port, https...
     */
    server?: ServerOptions;
    /**
     * Build specific options
     */
    build?: BuildOptions;
    /**
     * Dep optimization options
     */
    optimizeDeps?: DepOptimizationOptions;
    /**
     * Force Vite to always resolve listed dependencies to the same copy (from
     * project root).
     */
    dedupe?: string[];
    /**
     * Log level.
     * Default: 'info'
     */
    logLevel?: LogLevel;
}
export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alias' | 'assetsInclude'> & {
    configPath: string | undefined;
    inlineConfig: UserConfig;
    root: string;
    command: 'build' | 'serve';
    mode: string;
    isProduction: boolean;
    optimizeCacheDir: string | undefined;
    env: Record<string, any>;
    alias: Alias[];
    plugins: readonly Plugin[];
    server: ServerOptions;
    build: Required<BuildOptions>;
    assetsInclude: (file: string) => boolean;
    logger: Logger;
    publicUrls: {
        [file: string]: string;
    };
}>;
export declare function resolveConfig(inlineConfig: UserConfig, command: 'build' | 'serve', mode: string, configPath?: string | false): Promise<ResolvedConfig>;
export declare function sortUserPlugins(plugins: (Plugin | Plugin[])[] | undefined): [Plugin[], Plugin[], Plugin[]];
export declare function loadEnv(mode: string, root: string, prefix?: string): Record<string, string>;
