stack-vite
Vite frontend build tool — configuration, plugins, asset loading
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- stack-vite
- license
- Apache-2.0
- metadata
- { "author": "manuel-retamozo-garcia", "version": "1.0" }
- description
- Vite frontend build tool — configuration, plugins, asset loading
- capabilities
- [ "vite" ]
02 资源文件 1
- 参考文档references/patterns.md15.0 KB
03 SKILL.md 正文
Vite Patterns
Build tool and dev server patterns for Vite 8+ projects. Covers configuration, environment variables, proxy setup, library mode, dependency pre-bundling, and common production pitfalls.
When to Use
- Configuring
vite.config.tsorvite.config.js - Setting up environment variables or
.envfiles - Configuring dev server proxy for API backends
- Optimizing build output (chunks, minification, assets)
- Publishing libraries with
build.lib - Troubleshooting dependency pre-bundling or CJS/ESM interop
Core Rules
- Dev vs Build Engines: Dev serves files as native ESM (transpiled on demand via esbuild). Production builds use Rolldown/Rollup. Always smoke-test with
vite previewbefore deploying. - Type Checking Gap: Vite build transpiles but does NOT type-check. You must run
tsc --noEmitin CI or usevite-plugin-checker. - Environment Security: Only
VITE_-prefixed environment variables are exposed to the client. Secrets must NEVER use the prefix. Never pass empty stringloadEnv(mode, cwd, '')as it leaks server secrets. - Performance Aliases: Avoid hand-rolling aliases. Use
vite-tsconfig-pathsto reusetsconfig.jsonconfigurations. - Barrel Files: Avoid importing from index/barrel files in the dev server hot-path as it triggers loading of all re-exported files.
References
For full code examples, plugin configurations, manual chunk setups, and server proxy details, refer to:
04 同仓库更多 Skills
work-unit-commits
Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.
stack-webmcp
Trigger: WebMCP, document.modelContext, web tools, AI browser agent. Web Model Context Protocol client-side tool standard.
stack-starlight
Astro Starlight documentation framework — setup, sidebar navigation, frontmatter, built-in components, asides, theming, i18n, search
stack-sqlserver
Microsoft SQL Server database — indexing, RCSI, set-based operations, SARGable queries, transaction scopes
stack-springboot
Spring Boot architecture patterns — REST API design, layered services, JPA, caching, Spring Security, TDD with MockMvc and Testcontainers, and pre-release verification
stack-react
React UI library — components, hooks, state management, patterns, performance, and component testing with React Testing Library