Skip to content
Back to skills

Vite

ASecurity

Vite — next-generation frontend build tool with instant HMR, native ESM dev server, and optimized production builds.

  • 47 stars
  • 0 votes
  • 0 copies
  • 16 views
  • Added September 12, 2026
developmenttypescriptreactvuenodeapifrontend

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add skeletorflet/opencode-supreme-setup --skill vite --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vite?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vite
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/skeletorflet-vite/badge)](https://www.skillsdirectory.com/skills/skeletorflet-vite)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vite
description: Vite — next-generation frontend build tool with instant HMR, native ESM dev server, and optimized production builds.
---

### config
`vite.config.ts`: `defineConfig({ plugins: [react()], resolve: { alias: { '@': '/src' } }, build: { rollupOptions: {...} } })`. Type-safe with `defineConfig` helper. Environment mode via `--mode`.

### plugins
Official: `@vitejs/plugin-react`, `@vitejs/plugin-vue`, `@vitejs/plugin-legacy`. Community: `vite-plugin-pwa`, `vite-plugin-svgr`, `vite-tsconfig-paths`. `vite.config.ts` `plugins` array order matters.

### HMR
Native ESM dev server — instant module updates. Full page reload only on file addition/deletion. `import.meta.hot` API for custom HMR boundaries. `accept()`, `dispose()`, `invalidate()`.

### CSS
PostCSS config auto-detected (`postcss.config.js`). CSS modules: `*.module.css` → `styles.className`. Pre-processors: `npm i -D sass` then `*.scss`. `@import` resolution built-in.

### TypeScript
ESBuild transpilation (no type-checking). Use `tsc --noEmit` for type checking in CI. `isolatedModules: true` required. Path aliases mirror in `tsconfig.json` and `vite.config.ts`.

### build optimizations
Rollup-based production build. Code splitting via `manualChunks`. CSS code splitting (per-entry CSS). Asset hashing. Tree-shaking. `build.target` for browser targets. `build.minify` (esbuild/terser).

### SSR
`vite.ssr()` export. Node.js-compatible build. `ssrLoadModule()` for dev. `ssrManifest` for preload directives. Framework integrations: `vike`, `@vitejs/plugin-react` with `react-dom/server`.

### environment variables
`VITE_*` prefix exposed via `import.meta.env`. Modes: `development`, `production`, custom. `.env`, `.env.local`, `.env.[mode]`. `import.meta.env.SSR` for server check.

### multi-page
`build.rollupOptions.input = { main: '/index.html', admin: '/admin/index.html' }`. Shared config via `build.rollupOptions`. HTML entry points must be real files.

### best practices
Use `build.chunkSizeWarningLimit`. Leverage `optimizeDeps` for pre-bundling. Enable `build.sourcemap` only in dev. Prefer `import()` for lazy routes. Use `vite preview` to test production build.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.