Home / Function/ externalizeDepsInWatchPlugin() — vite Function Reference

externalizeDepsInWatchPlugin() — vite Function Reference

Architecture documentation for the externalizeDepsInWatchPlugin() function in rolldown.config.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  1896bd37_71ac_8cb7_b9df_01a4104f6955["externalizeDepsInWatchPlugin()"]
  095867e3_0044_bba5_61f7_c60c3c9e56ce["rolldown.config.ts"]
  1896bd37_71ac_8cb7_b9df_01a4104f6955 -->|defined in| 095867e3_0044_bba5_61f7_c60c3c9e56ce
  style 1896bd37_71ac_8cb7_b9df_01a4104f6955 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/rolldown.config.ts lines 199–213

function externalizeDepsInWatchPlugin(): Plugin {
  return {
    name: 'externalize-deps-in-watch',
    options(options) {
      if (this.meta.watchMode) {
        options.external ||= []
        if (!Array.isArray(options.external))
          throw new Error('external must be an array')
        options.external = options.external.concat(
          Object.keys(pkg.devDependencies),
        )
      }
    },
  }
}

Domain

Subdomains

Frequently Asked Questions

What does externalizeDepsInWatchPlugin() do?
externalizeDepsInWatchPlugin() is a function in the vite codebase, defined in packages/vite/rolldown.config.ts.
Where is externalizeDepsInWatchPlugin() defined?
externalizeDepsInWatchPlugin() is defined in packages/vite/rolldown.config.ts at line 199.

Analyze Your Own Codebase

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

Try Supermodel Free