# Send Vite to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "vite",
    "name": "Vite",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivangdavila/vite",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/vite",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/vite",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=vite",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "vite",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-10T17:42:34.525Z",
      "expiresAt": "2026-05-17T17:42:34.525Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=vite",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=vite",
        "contentDisposition": "attachment; filename=\"vite-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "vite"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/vite"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/vite",
    "downloadUrl": "https://openagent3.xyz/downloads/vite",
    "agentUrl": "https://openagent3.xyz/skills/vite/agent",
    "manifestUrl": "https://openagent3.xyz/skills/vite/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/vite/agent.md"
  }
}
```
## Documentation

### Environment Variables

Only VITE_ prefixed vars are exposed to client code — DB_PASSWORD stays server-side, VITE_API_URL is bundled
Access via import.meta.env.VITE_* not process.env — process.env is Node-only and undefined in browser
.env.local overrides .env and is gitignored by default — use for local secrets
import.meta.env.MODE is development or production — use for conditional logic, not NODE_ENV

### CommonJS Compatibility

Pure ESM by default — CommonJS packages need optimizeDeps.include for pre-bundling
require() doesn't work in Vite — use import or createRequire from module for dynamic requires
Some packages ship broken ESM — add to ssr.noExternal or optimizeDeps.exclude and let Vite transform them
Named exports from CommonJS may fail — use default import and destructure: import pkg from 'pkg'; const { method } = pkg

### Dependency Pre-bundling

Vite pre-bundles dependencies on first run — delete node_modules/.vite to force rebuild after package changes
Large dependencies slow down dev server start — add rarely-changing ones to optimizeDeps.include for persistent cache
Linked local packages (npm link) aren't pre-bundled — add to optimizeDeps.include explicitly
optimizeDeps.force: true rebuilds every time — only for debugging, kills dev performance

### Path Aliases

Configure in both vite.config.ts AND tsconfig.json — Vite uses its own, TypeScript uses tsconfig
Use path.resolve(__dirname, './src') not relative paths — relative breaks depending on working directory
@/ alias is not built-in — must configure manually unlike some frameworks

// vite.config.ts
resolve: {
  alias: { '@': path.resolve(__dirname, './src') }
}

### Dev Server Proxy

Proxy only works in dev — production needs actual CORS config or reverse proxy
changeOrigin: true rewrites Host header — required for most APIs that check origin
WebSocket proxy needs explicit ws: true — HTTP proxy doesn't forward WS by default
Trailing slashes matter: /api proxies /api/users, /api/ only proxies /api//users

server: {
  proxy: {
    '/api': {
      target: 'http://localhost:3000',
      changeOrigin: true,
      rewrite: path => path.replace(/^\\/api/, '')
    }
  }
}

### Static Assets

public/ files served at root, not processed — use for favicons, robots.txt, files that need exact paths
src/assets/ files are processed, hashed, can be imported — use for images, fonts referenced in code
Import assets to get resolved URL: import logo from './logo.png' — hardcoded paths break after build
new URL('./img.png', import.meta.url) for dynamic paths — template literals with variables don't work

### Build Optimization

build.rollupOptions.output.manualChunks for code splitting — without it, one giant bundle
Analyze bundle with rollup-plugin-visualizer — find unexpected large dependencies
build.target defaults to modern browsers — set 'es2015' for legacy support, but increases bundle size
build.cssCodeSplit: true (default) — each async chunk gets its own CSS file

### Library Mode

build.lib for npm packages — different config from app mode
Set external for peer dependencies — don't bundle React/Vue into your library
Generate types separately with tsc — Vite doesn't emit .d.ts files
Both ESM and CJS outputs: formats: ['es', 'cjs'] — some consumers still need require()

### HMR Issues

Circular imports break HMR — refactor to break the cycle or full reload triggers
State lost on HMR means component isn't accepting updates — check for import.meta.hot.accept()
CSS changes trigger full reload if imported in JS that doesn't accept HMR — import CSS in components that do
server.hmr.overlay: false hides error overlay — useful for custom error handling but hides issues

### SSR Configuration

ssr.external for Node-only packages — prevents bundling node_modules in SSR build
ssr.noExternal forces bundling — needed for packages with browser-specific imports
CSS imports fail in SSR by default — use ?inline suffix or configure css.postcss for SSR
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ivangdavila
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-10T17:42:34.525Z
- Expires at: 2026-05-17T17:42:34.525Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/vite)
- [Send to Agent page](https://openagent3.xyz/skills/vite/agent)
- [JSON manifest](https://openagent3.xyz/skills/vite/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/vite/agent.md)
- [Download page](https://openagent3.xyz/downloads/vite)