Home / Function/ hasBothRollupOptionsAndRolldownOptions() — vite Function Reference

hasBothRollupOptionsAndRolldownOptions() — vite Function Reference

Architecture documentation for the hasBothRollupOptionsAndRolldownOptions() function in utils.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  b5c7fa38_1ab6_baf0_5523_b633b5165ec2["hasBothRollupOptionsAndRolldownOptions()"]
  031bc221_67a8_c579_f2bf_bb30a08beeb2["utils.ts"]
  b5c7fa38_1ab6_baf0_5523_b633b5165ec2 -->|defined in| 031bc221_67a8_c579_f2bf_bb30a08beeb2
  5db25367_d823_be14_869d_fc9affb91c51["runConfigHook()"]
  5db25367_d823_be14_869d_fc9affb91c51 -->|calls| b5c7fa38_1ab6_baf0_5523_b633b5165ec2
  style b5c7fa38_1ab6_baf0_5523_b633b5165ec2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/utils.ts lines 1292–1310

export function hasBothRollupOptionsAndRolldownOptions(
  options: Record<string, any>,
): boolean {
  for (const opt of [
    options.build,
    options.worker,
    options.optimizeDeps,
    options.ssr?.optimizeDeps,
  ]) {
    if (
      opt != null &&
      opt.rollupOptions != null &&
      opt.rolldownOptions != null
    ) {
      return true
    }
  }
  return false
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does hasBothRollupOptionsAndRolldownOptions() do?
hasBothRollupOptionsAndRolldownOptions() is a function in the vite codebase, defined in packages/vite/src/node/utils.ts.
Where is hasBothRollupOptionsAndRolldownOptions() defined?
hasBothRollupOptionsAndRolldownOptions() is defined in packages/vite/src/node/utils.ts at line 1292.
What calls hasBothRollupOptionsAndRolldownOptions()?
hasBothRollupOptionsAndRolldownOptions() is called by 1 function(s): runConfigHook.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free