setupRollupOptionCompat() — vite Function Reference
Architecture documentation for the setupRollupOptionCompat() function in utils.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD f56ee71e_4165_1d46_cf2e_e9dc68848891["setupRollupOptionCompat()"] 031bc221_67a8_c579_f2bf_bb30a08beeb2["utils.ts"] f56ee71e_4165_1d46_cf2e_e9dc68848891 -->|defined in| 031bc221_67a8_c579_f2bf_bb30a08beeb2 5a2ddafa_69c5_82bb_4c9e_32634cfa6eed["resolveBuildEnvironmentOptions()"] 5a2ddafa_69c5_82bb_4c9e_32634cfa6eed -->|calls| f56ee71e_4165_1d46_cf2e_e9dc68848891 9d98f746_61f2_7414_b955_969eb9cb18d5["resolveDepOptimizationOptions()"] 9d98f746_61f2_7414_b955_969eb9cb18d5 -->|calls| f56ee71e_4165_1d46_cf2e_e9dc68848891 58c4a210_68fe_1b4d_ed49_d59203f97ef1["resolveConfig()"] 58c4a210_68fe_1b4d_ed49_d59203f97ef1 -->|calls| f56ee71e_4165_1d46_cf2e_e9dc68848891 abeb4de2_5f7e_d2cb_33fc_4ad60bd944ca["mergeConfigRecursively()"] abeb4de2_5f7e_d2cb_33fc_4ad60bd944ca -->|calls| f56ee71e_4165_1d46_cf2e_e9dc68848891 bb7c80f0_9550_8484_5def_1d65cf838e3c["rollupOptionsDeprecationCall()"] f56ee71e_4165_1d46_cf2e_e9dc68848891 -->|calls| bb7c80f0_9550_8484_5def_1d65cf838e3c 51afdf58_3045_64b1_cf5b_929b1091e877["get()"] f56ee71e_4165_1d46_cf2e_e9dc68848891 -->|calls| 51afdf58_3045_64b1_cf5b_929b1091e877 style f56ee71e_4165_1d46_cf2e_e9dc68848891 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/utils.ts lines 1250–1283
export function setupRollupOptionCompat<
T extends Pick<BuildEnvironmentOptions, 'rollupOptions' | 'rolldownOptions'>,
>(
buildConfig: T,
path: string,
): asserts buildConfig is T & {
rolldownOptions: Exclude<T['rolldownOptions'], undefined>
} {
// if both rollupOptions and rolldownOptions are present,
// ignore rollupOptions and use rolldownOptions
buildConfig.rolldownOptions ??= buildConfig.rollupOptions
if (
runtimeDeprecatedPath.has(path) &&
buildConfig.rollupOptions &&
buildConfig.rolldownOptions !== buildConfig.rollupOptions
) {
rollupOptionsDeprecationCall()
}
// proxy rolldownOptions to rollupOptions
Object.defineProperty(buildConfig, 'rollupOptions', {
get() {
return buildConfig.rolldownOptions
},
set(newValue) {
if (runtimeDeprecatedPath.has(path)) {
rollupOptionsDeprecationCall()
}
buildConfig.rolldownOptions = newValue
},
configurable: true,
enumerable: true,
})
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does setupRollupOptionCompat() do?
setupRollupOptionCompat() is a function in the vite codebase, defined in packages/vite/src/node/utils.ts.
Where is setupRollupOptionCompat() defined?
setupRollupOptionCompat() is defined in packages/vite/src/node/utils.ts at line 1250.
What does setupRollupOptionCompat() call?
setupRollupOptionCompat() calls 2 function(s): get, rollupOptionsDeprecationCall.
What calls setupRollupOptionCompat()?
setupRollupOptionCompat() is called by 4 function(s): mergeConfigRecursively, resolveBuildEnvironmentOptions, resolveConfig, resolveDepOptimizationOptions.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free