Prompt Buddy logoPrompt Buddy

vite · Vite Docs

Dependency Pre-Bundling | Vite (main branch)

Explains how Vite uses esbuild to pre-bundle dependencies to convert CommonJS/UMD modules to ESM and reduce the number of HTTP requests during development.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Dependency Pre-Bundling | Vite (main branch)

Explains how Vite uses esbuild to pre-bundle dependencies to convert CommonJS/UMD modules to ESM and reduce the number of HTTP requests during development.

When To Use

Use when troubleshooting dependency loading issues, optimizing development server startup performance, or understanding why certain CommonJS modules require pre-bundling in an ESM environment.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/main-vite-dependency-pre-bundling-branch-workflow-guide.mdA guide explaining how Vite automatically discovers and pre-bundles project dependencies to optimize performance.Questions about a guide explaining how Vite automatically discovers and pre-bundles project dependencies to optimize performance.
examples/main-vite-dependency-pre-bundling-branch-vite-dependency-pre-bundling-gu.textA text-based demonstration of how Vite handles dependency pre-bundling behavior.Exact payloads, commands, or snippets shown in A text-based demonstration of how Vite handles dependency pre-bundling behavior.
examples/main-vite-dependency-pre-bundling-branch-vite-dep-pre-bundling-optimize-.textA vite configuration object demonstrating the use of the optimizeDeps.include option for dependency pre-bundling.Exact payloads, commands, or snippets shown in A vite configuration object demonstrating the use of the optimizeDeps.include option for dependency pre-bundling.

What This Skill Covers

  • Are you an LLM? You can read better optimized documentation at /guide/dep-pre-bundling.md for this page in Markdown format
  • Main sections: The Why ​, Automatic Dependency Discovery ​, Monorepos and Linked Dependencies ​, Customizing the Behavior ​, Caching ​.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://main.vite.dev/guide/dep-pre-bundling