@nextcloud/vite-config

    Interface BaseOptions

    SPDX-FileCopyrightText: 2023 Ferdinand Thiessen opensource@fthiessen.de

    SPDX-License-Identifier: AGPL-3.0-or-later

    interface BaseOptions {
        assetFileNames?: (chunkInfo: PreRenderedAsset) => string;
        config?: UserConfigExport;
        coreJS?: CoreJSPluginOptions;
        inlineCSS?: boolean;
        minify?: boolean;
        nodePolyfills?: boolean | PolyfillOptions;
        replace?: Record<string, string>;
        thirdPartyLicense?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    assetFileNames?: (chunkInfo: PreRenderedAsset) => string

    Customize the asset file names. Similar to output.assetFileNames in rollup config, but if returns undefined, then this config defaults is be used.

    Move CSS styles to `styles/style.css` instead of the default `css/[entrypoint-name].css`:
    (chunkInfo) => chunkInfo.name.endsWith('.css') ? 'styles/style.css' : undefined
    config?: UserConfigExport

    Vite config to override or extend the base config

    coreJS?: CoreJSPluginOptions

    Enable and adjust settings for core-js polyfills

    By default disabled as Nextcloud core already includes the core-js/stable polyfills globally

    inlineCSS?: boolean

    Inject all styles inside the javascript bundle instead of emitting a .css file

    false
    
    minify?: boolean

    Whether to minify the output

    isProduction Minify on production, do not on development
    
    nodePolyfills?: boolean | PolyfillOptions

    Inject polyfills for node packages

    false Disabled to reduce buildtime
    
    replace?: Record<string, string>

    Strings to replace within your code

    thirdPartyLicense?: string

    Location of license summary file of third party dependencies

    false
    
    MMNEPVFCICPMFPCPTTAAATR