KC's Workspace
    Preparing search index...
    interface EnvironmentOptions {
        build?: BuildEnvironmentOptions;
        consumer?: "server" | "client";
        define?: Record<string, any>;
        dev?: DevEnvironmentOptions;
        isBundled?: boolean;
        keepProcessEnv?: boolean;
        optimizeDeps?: DepOptimizationOptions;
        resolve?: EnvironmentResolveOptions;
    }

    Hierarchy (View Summary)

    Index

    Build specific options

    consumer?: "server" | "client"

    Define if this environment is used for Server-Side Rendering

    'server' if it isn't the client environment
    
    define?: Record<string, any>

    Define global variable replacements. Entries will be defined on window during dev and replaced during build.

    Dev specific options

    isBundled?: boolean

    Whether this environment produces a bundled output.

    During build, this defaults to true for every environment. During serve, this defaults to true only for the client environment when experimental.bundledDev is enabled, and false otherwise. Setting this explicitly on an environment always overrides the default.

    keepProcessEnv?: boolean

    If true, process.env referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.

    optimizeDeps?: DepOptimizationOptions

    Optimize deps config

    Configure resolver