@nextcloud/vite-config
    Preparing search index...

    Interface AppOptions

    interface AppOptions {
        appName?: string;
        assetFileNames?: (chunkInfo: PreRenderedAsset) => string | undefined;
        assetsPrefix?: string;
        codeSplitting?: boolean | CodeSplittingOptions;
        config?: UserConfigExport;
        coreJS?: CoreJSPluginOptions;
        createEmptyCSSEntryPoints?: boolean;
        emptyOutputDirectory?: boolean | EmptyJSDirPluginOptions;
        extractLicenseInformation?: false | REUSELicensesPluginOptions;
        inlineCSS?: boolean | PluginConfiguration;
        minify?: boolean;
        nodePolyfills?: boolean | PolyfillOptions;
        replace?: Record<string, string>;
    }

    Hierarchy

    Index
    appName?: string

    Override the appName, by default the name from the appinfo/info.xml and if not found the name from package.json is used. But if that name differs from the app id used for the Nextcloud app you need to override it.

    assetFileNames?: (chunkInfo: PreRenderedAsset) => string | undefined

    Customize the asset file names. Similar to output.assetFileNames in rolldown 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.names[0].endsWith('.css') ? 'styles/style.css' : undefined
    assetsPrefix?: string

    Prefix to use for assets and chunks

    '{appName}-'
    
    codeSplitting?: boolean | CodeSplittingOptions

    Override the default code splitting configuration for the app build. By default, code splitting is configured to create separate chunks for common dependencies and vendor libraries. You can provide your own configuration to customize how the code is split into chunks.

    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

    createEmptyCSSEntryPoints?: boolean

    When not using inline css and using cssCodeSplit this option allows to create one CSS entry file for each JS entry point instead of only one for each JS entry point with styles.

    false
    
    emptyOutputDirectory?: boolean | EmptyJSDirPluginOptions

    Whether to empty the 'js' directory Pass false to disable clearing the directory, it is also possible to pass options to the plugin.

    true
    
    extractLicenseInformation?: false | REUSELicensesPluginOptions

    Extract license information from built assets into .license files This is needed to be REUSE complient.

    {}
    
    inlineCSS?: boolean | PluginConfiguration

    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 By default all node core modules are polyfilled, including prefixed with node: protocol

    '{ protocolImports: true }'
    
    replace?: Record<string, string>

    Strings to replace within your code