Use when encountering pre-bundling errors, dependency resolution failures, stale cache issues, or slow development server startup. Prevents excluding CJS dependencies from pre-bundling (which breaks runtime module resolution) and misconfiguring optimizeDeps. Covers CJS/ESM conversion failures, missing dependency…
Use when encountering dev server startup failures, HMR issues, proxy errors, CORS blocks, or module not found errors during development. Prevents misconfiguring server.hmr behind reverse proxies and forgetting appType: 'custom' in middleware mode. Covers HMR full-reload debugging, proxy configuration, CORS setup…
Use when integrating Vite with a backend framework, rendering Vite assets from server-side templates, or setting up dev/production HTML serving. Prevents incorrect manifest.json traversal and missing CSS chunk resolution in production. Covers build.manifest configuration, .vite/manifest.json structure, ManifestChunk…
Use when using Vite programmatically, building custom dev servers, running builds from scripts, or accessing Vite utilities. Prevents misuse of createServer(), build(), preview() signatures and incorrect ViteDevServer interface usage. Covers createServer(), build(), preview(), resolveConfig(), mergeConfig()…
Use when building a library, creating an npm package, configuring UMD/ESM/CJS output, or setting up package.json exports. Prevents bundling peer dependencies into the library or misconfiguring output formats. Covers build.lib configuration, external dependencies, output formats (es, cjs, umd, iife), CSS handling…
Use when upgrading Vite versions, encountering deprecated APIs, or resolving version-specific breaking changes. Prevents using removed APIs after migration (e.g., rollupOptions in v8, legacy Sass API in v7, esbuild transforms in v8). Covers v5-to-v6 breaking changes (Environment API, json.stringify, PostCSS), v6-to-v7…
Use when configuring dependency pre-bundling, troubleshooting slow dev server starts, handling monorepo dependencies, or forcing cache invalidation. Prevents stale cache issues and missing optimizeDeps.include for dynamically imported dependencies. Covers pre-bundling (CJS-to-ESM conversion)…
Use when creating a new Vite project, adding Vite to an existing project, or configuring TypeScript and framework plugins. Prevents missing vite-env.d.ts for TypeScript or using wrong tsconfig settings. Covers create-vite scaffolding, CLI commands, TypeScript config, project structure, package.json scripts, and…
Use when implementing SSR, configuring SSR externals, building SSR applications, or debugging SSR errors. Prevents incorrect SSR externals configuration and missing ssrFixStacktrace() for error debugging. Covers SSR dev workflow with Express middleware, ssrLoadModule(), SSR externals (ssr.noExternal, ssr.external…
Use when importing static assets, using glob imports, configuring the public directory, loading Web Workers, or handling WebAssembly modules. Prevents incorrect query suffix usage, broken new URL() patterns, and misconfigured public directory paths. Covers asset imports, query suffixes (?url, ?raw, ?inline, ?worker)…
Use when configuring production builds, optimizing output, setting build targets, or configuring chunk splitting. Prevents using wrong bundler config key for the target Vite version (rollupOptions vs rolldownOptions) and misconfiguring minifier or sourcemap settings. Covers build.target, build.outDir, build.assetsDir…
Use when creating or editing vite.config.ts, setting up project configuration, or configuring shared Vite options. Prevents misconfiguring defineConfig(), forgetting loadEnv() for env-dependent config, and using wrong shared option defaults. Covers defineConfig(), conditional and async config functions, loadEnv(), and…
Use when configuring environment variables, using .env files, creating custom modes, or debugging env variable issues. Prevents exposing secrets by omitting the VITE prefix and misconfiguring .env file precedence. Covers import.meta.env built-ins, .env file loading order, VITE prefix requirement, dotenv-expand, custom…
Use when implementing custom HMR handling, debugging HMR issues, writing HMR-aware modules, or understanding why full reloads happen. Prevents missing the import.meta.hot guard (causing production errors), reassigning hot.data instead of mutating it, and forgetting accept() boundaries. Covers ViteHotContext interface…
Use when writing Vite plugins, understanding hook lifecycle, creating virtual modules, or customizing the build pipeline. Prevents incorrect hook ordering (enforce pre/post), missing the virtual module resolved-id prefix convention, and using build-only hooks during dev. Covers plugin structure, naming conventions…
Use when configuring the Vite dev server, setting up proxy rules, enabling HTTPS, restricting file system access, or using middleware mode. Prevents exposing the dev server on the network without proper host/CORS settings and misconfiguring proxy rewrite rules. Covers server.host, server.port, server.proxy…
★not rated 5 5mo agoA137 tokens
originalMIT
At most 3 mods per repository are shown here, and a mod shipped inside a plugin is left to that plugin's page — the rest are on their repository pages: