import webpack from 'webpack';
import { BannerConfig, FileConfig, ProjectConfig } from './project.config.default';
import { ServerConfig } from './server.config.default';
interface NormalizedEntry {
    [x: string]: string[];
}
export interface WebpackConfigHelperConfig {
    appName: ProjectConfig['appName'];
    type: ProjectConfig['type'];
    slug: ProjectConfig['slug'];
    host: ServerConfig['host'];
    port: ServerConfig['port'];
    outputPath: ProjectConfig['outputPath'];
    useBabelConfig: ProjectConfig['useBabelConfig'];
    hasReact: ProjectConfig['hasReact'];
    hasSass: ProjectConfig['hasSass'];
    hasFlow: ProjectConfig['hasFlow'];
    hasLess: ProjectConfig['hasLess'];
    jsBabelPresetOptions?: ProjectConfig['jsBabelPresetOptions'];
    tsBabelPresetOptions?: ProjectConfig['tsBabelPresetOptions'];
    jsBabelOverride?: ProjectConfig['jsBabelOverride'];
    tsBabelOverride?: ProjectConfig['tsBabelOverride'];
    bannerConfig: BannerConfig;
    alias?: ProjectConfig['alias'];
    optimizeSplitChunks: ProjectConfig['optimizeSplitChunks'];
    publicPath: string;
    publicPathUrl: string;
    errorOverlay: ProjectConfig['errorOverlay'];
    externals: ProjectConfig['externals'];
}
interface CommonWebpackConfig {
    context: webpack.Configuration['context'];
    devtool: webpack.Configuration['devtool'];
    target: webpack.Configuration['target'];
    watch: webpack.Configuration['watch'];
    mode: webpack.Configuration['mode'];
    name: webpack.Configuration['name'];
    externals: webpack.Configuration['externals'];
}
/**
 * Check if file exists or not using fs API.
 */
export declare function fileExists(filepath: string): boolean;
export declare function hasTypeScript(cwd: string): [boolean, string];
/**
 * A helper class to get different configuration of webpack.
 */
export declare class WebpackConfigHelper {
    readonly appDir: string;
    readonly outputPath: string;
    private file;
    private isDev;
    private config;
    /**
     * Context directory, from where we read the stuff and put stuff.
     */
    private cwd;
    /**
     * Simulated NODE_ENV string, used internally and defined
     * in webpack with webpack.DefinePlugin.
     */
    private env;
    /**
     * Create an instance of GetEntryAndOutput class.
     */
    constructor(file: FileConfig, config: WebpackConfigHelperConfig, cwd: string, isDev?: boolean);
    static getHmrPath(): string;
    /**
     * Get webpack compatible entry configuration.
     *
     * The entry object has members which always has string[].
     * This is to ensure that we can insert the hot loader client
     * when necessary.
     */
    getEntry(): NormalizedEntry;
    /**
     * Get webpack compatible output object.
     */
    getOutput(): webpack.Output;
    /**
     * Get WebPack plugins, depending on development or production
     */
    getPlugins(): webpack.Plugin[];
    /**
     * Get module object for webpack, depending on environment.
     */
    getModule(): webpack.Module;
    /**
     * Get webpack compatible resolve property.
     */
    getResolve(): webpack.Resolve;
    /**
     * Get optimization for webpack.
     *
     * We optimize all chunks because
     */
    getOptimization(): webpack.Options.Optimization | undefined;
    /**
     * Get common configuration, depending on just environment.
     */
    getCommon(): CommonWebpackConfig;
    /**
     * Get final loader option based on user and system.
     *
     * @param defaults Default options as calculated by system.
     * @param override User defined option.
     */
    private getOverrideWebpackRuleOptions;
    /**
     * Get calculated app directory
     */
    getAppDir(): string;
}
export {};
