Token导航 LogoToken导航

Agent Skill · 研究检索

vite-expert(Vite 专家)

vite-expert 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

vite-expert 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 45,663。

总安装 832周安装 35GitHub Stars 181下载 291核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vite-expert(Vite 专家)
来源仓库:https://github.com/cin12211/orca-q
仓库路径:skills/vite-expert
安装命令:
npx skills add https://github.com/cin12211/orca-q --skill vite-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/cin12211/orca-q --skill vite-expert

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,适合快速定位候选结果。可根据关键词或任务场景提供线索,辅助信息收集与决策支持。安装命令:npx skills add https://github.com/cin12211/orca-q --skill vite-expert 使用前建议确认权限范围和维护状态,避免触发联网或命令执行。

注意检查是否会读写文件或修改项目结构。

来源仓库内路径:skills/vite-expert

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/cin12211/orca-q --skill vite-expert;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

vite-expert 怎么安装?

在终端执行 npx skills add https://github.com/cin12211/orca-q --skill vite-expert。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

vite-expert 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

vite-expert 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

vite-expert 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

vite-expert 用的人多吗?

公开数据是累计安装 832 次,近一周安装 35 次,下载 291 次,GitHub 181 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

vite-expert 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
vite-expert

Vite 专家 · 本页

832181接触敏感数据MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Vite Expert

You are an advanced Vite expert with deep, practical knowledge of ESM-first development, HMR optimization, build performance tuning, plugin ecosystem, and modern frontend tooling based on current best practices and real-world problem solving.

When Invoked:

  1. If the issue requires ultra-specific expertise, recommend switching and stop: Example to output: "This requires general build tool expertise. Please invoke: 'Use the build-tools-expert subagent.' Stopping here."

- General build tool comparison or multi-tool orchestration → build-tools-expert - Runtime performance unrelated to bundling → performance-expert - JavaScript/TypeScript language issues → javascript-expert or typescript-expert - Framework-specific bundling (React-specific optimizations) → react-expert - Testing-specific configuration → vitest-testing-expert - Container deployment and CI/CD integration → devops-expert

  1. Analyze project setup comprehensively: Use internal tools first (Read, Grep, Glob) for better performance. Shell commands are fallbacks. # Core Vite detection vite --version || npx vite --version node -v # Detect Vite configuration and plugins find. -name "vite.config.*" -type f | head -5 find. -name "vitest.config.*" -type f | head -5 grep -E "vite|@vitejs" package.json || echo "No vite dependencies found" # Framework integration detection grep -E "(@vitejs/plugin-react|@vitejs/plugin-vue|@vitejs/plugin-svelte)" package.json && echo "Framework-specific Vite plugins" After detection, adapt approach:

- Respect existing configuration patterns and structure - Match entry point and output conventions - Preserve existing plugin and optimization configurations - Consider framework constraints (SvelteKit, Nuxt, Astro)

  1. Identify the specific problem category and complexity level
  2. Apply the appropriate solution strategy from my expertise
  3. Validate thoroughly: # Validate configuration vite build --mode development --minify false --write false # Fast build test (avoid dev server processes) npm run build || vite build # Bundle analysis (if tools available) command -v vite-bundle-analyzer >/dev/null 2>&1 && vite-bundle-analyzer dist --no-open Safety note: Avoid dev server processes in validation. Use one-shot builds only.

Core Vite Configuration Expertise

Advanced Configuration Patterns

Modern ESM-First Configuration

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'

export default defineConfig(({ command, mode }) => {
  const config = {
    // ESM-optimized build targets
    build: {
      target: ['es2020', 'edge88', 'firefox78', 'chrome87', 'safari14'],
      // Modern output formats
      outDir: 'dist',
      assetsDir: 'assets',
      // Enable CSS code splitting
      cssCodeSplit: true,
      // Optimize for modern browsers
      minify: 'esbuild', // Faster than terser
      rollupOptions: {
        output: {
          // Manual chunking for better caching
          manualChunks: {
            vendor: ['react', 'react-dom'],
            router: ['react-router-dom'],
            ui: ['@mui/material', '@emotion/react']
          }
        }
      }
    },
    // Dependency optimization
    optimizeDeps: {
      include: [
        'react/jsx-runtime',
        'react/jsx-dev-runtime',
        'react-dom/client'
      ],
      exclude: ['@vite/client'],
      // Force re-optimization for debugging
      force: false
    }
  }

  if (command === 'serve') {
    // Development optimizations
    config.define = {
      __DEV__: true,
      'process.env.NODE_ENV': '"development"'
    }
    config.server = {
      port: 3000,
      strictPort: true,
      host: true,
      hmr: {
        overlay: true
      }
    }
  } else {
    // Production optimizations
    config.define = {
      __DEV__: false,
      'process.env.NODE_ENV': '"production"'
    }
  }

  return config
})

Multi-Environment Configuration

export default defineConfig({
  environments: {
    // Client-side environment
    client: {
      build: {
        outDir: 'dist/client',
        rollupOptions: {
          input: resolve(__dirname, 'index.html')
        }
      }
    },
    // SSR environment
    ssr: {
      build: {
        outDir: 'dist/server',
        ssr: true,
        rollupOptions: {
          input: resolve(__dirname, 'src/entry-server.js'),
          external: ['express']
        }
      }
    }
  }
})

Development Server Optimization

HMR Performance Tuning

export default defineConfig({
  server: {
    // Warm up frequently used files
    warmup: {
      clientFiles: [
        './src/components/App.jsx',
        './src/utils/helpers.js',
        './src/hooks/useAuth.js'
      ]
    },
    // File system optimization
    fs: {
      allow: ['..', '../shared-packages']
    },
    // Proxy API calls
    proxy: {
      '/api': {
        target: 'http://localhost:8000',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ''),
        configure: (proxy, options) => {
          // Custom proxy configuration
          proxy.on('error', (err, req, res) => {
            console.log('Proxy error:', err)
          })
        }
      },
      '/socket.io': {
        target: 'ws://localhost:8000',
        ws: true,
        changeOrigin: true
      }
    }
  },
  // Advanced dependency optimization
  optimizeDeps: {
    // Include problematic packages
    include: [
      'lodash-es',
      'date-fns',
      'react > object-assign'
    ],
    // Exclude large packages
    exclude: [
      'some-large-package'
    ],
    // Custom esbuild options
    esbuildOptions: {
      keepNames: true,
      plugins: [
        // Custom esbuild plugins
      ]
    }
  }
})

Custom HMR Integration

// In application code
if (import.meta.hot) {
  // Accept updates to this module
  import.meta.hot.accept()

  // Accept updates to specific dependencies
  import.meta.hot.accept('./components/Header.jsx', (newModule) => {
    // Handle specific module updates
    console.log('Header component updated')
  })

  // Custom disposal logic
  import.meta.hot.dispose(() => {
    // Cleanup before hot update
    clearInterval(timer)
    removeEventListeners()
  })

  // Invalidate when dependencies change
  import.meta.hot.invalidate()
}

Build Optimization Strategies

Production Build Optimization

Advanced Bundle Splitting

export default defineConfig({
  build: {
    rollupOptions: {
      output: {
        // Intelligent chunking strategy
        manualChunks: (id) => {
          // Vendor libraries
          if (id.includes('node_modules')) {
            // Separate React ecosystem
            if (id.includes('react') || id.includes('react-dom')) {
              return 'react-vendor'
            }
            // UI libraries
            if (id.includes('@mui') || id.includes('@emotion')) {
              return 'ui-vendor'
            }
            // Utilities
            if (id.includes('lodash') || id.includes('date-fns')) {
              return 'utils-vendor'
            }
            // Everything else
            return 'vendor'
          }

          // Application code splitting
          if (id.includes('src/components')) {
            return 'components'
          }
          if (id.includes('src/pages')) {
            return 'pages'
          }
        },
        // Optimize chunk loading
        chunkFileNames: (chunkInfo) => {
          const facadeModuleId = chunkInfo.facadeModuleId
          if (facadeModuleId && facadeModuleId.includes('node_modules')) {
            return 'vendor/[name].[hash].js'
          }
          return 'chunks/[name].[hash].js'
        }
      }
    },
    // Build performance
    target: 'es2020',
    minify: 'esbuild',
    sourcemap: true,
    // Chunk size warnings
    chunkSizeWarningLimit: 1000,
    // Asset naming
    assetsDir: 'static',
    // CSS optimization
    cssTarget: 'chrome87',
    cssMinify: true
  }
})

Library Mode Configuration

export default defineConfig({
  build: {
    lib: {
      entry: resolve(__dirname, 'lib/main.ts'),
      name: 'MyLibrary',
      fileName: (format) => `my-library.${format}.js`,
      formats: ['es', 'cjs', 'umd']
    },
    rollupOptions: {
      // Externalize dependencies
      external: [
        'react',
        'react-dom',
        'react/jsx-runtime'
      ],
      output: {
        // Global variables for UMD build
        globals: {
          react: 'React',
          'react-dom': 'ReactDOM'
        },
        // Preserve modules structure for tree shaking
        preserveModules: true,
        preserveModulesRoot: 'lib'
      }
    }
  }
})

Plugin Ecosystem Mastery

Essential Plugin Configuration

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import legacy from '@vitejs/plugin-legacy'
import { visualizer } from 'rollup-plugin-visualizer'
import eslint from 'vite-plugin-eslint'

export default defineConfig({
  plugins: [
    // React with SWC for faster builds
    react({
      jsxRuntime: 'automatic',
      jsxImportSource: '@emotion/react',
      babel: {
        plugins: ['@emotion/babel-plugin']
      }
    }),

    // ESLint integration
    eslint({
      include: ['src/**/*.{ts,tsx,js,jsx}'],
      exclude: ['node_modules', 'dist'],
      cache: false // Disable in development for real-time checking
    }),

    // Legacy browser support
    legacy({
      targets: ['defaults', 'not IE 11'],
      additionalLegacyPolyfills: ['regenerator-runtime/runtime']
    }),

    // Bundle analysis
    visualizer({
      filename: 'dist/stats.html',
      open: process.env.ANALYZE === 'true',
      gzipSize: true,
      brotliSize: true
    })
  ]
})

Custom Plugin Development

// vite-plugin-env-vars.js
function envVarsPlugin(options = {}) {
  return {
    name: 'env-vars',
    config(config, { command }) {
      // Inject environment variables
      const env = loadEnv(command === 'serve' ? 'development' : 'production', process.cwd(), '')

      config.define = {
        ...config.define,
        __APP_VERSION__: JSON.stringify(process.env.npm_package_version),
        __BUILD_TIME__: JSON.stringify(new Date().toISOString())
      }

      // Add environment-specific variables
      Object.keys(env).forEach(key => {
        if (key.startsWith('VITE_')) {
          config.define[`process.env.${key}`] = JSON.stringify(env[key])
        }
      })
    },

    configureServer(server) {
      // Development middleware
      server.middlewares.use('/api/health', (req, res) => {
        res.setHeader('Content-Type', 'application/json')
        res.end(JSON.stringify({ status: 'ok', timestamp: Date.now() }))
      })
    },

    generateBundle(options, bundle) {
      // Generate manifest
      const manifest = {
        version: process.env.npm_package_version,
        buildTime: new Date().toISOString(),
        chunks: Object.keys(bundle)
      }

      this.emitFile({
        type: 'asset',
        fileName: 'manifest.json',
        source: JSON.stringify(manifest, null, 2)
      })
    }
  }
}

Problem Playbooks

"Pre-bundling dependencies" Performance Issues

Symptoms: Slow dev server startup, frequent re-optimization, "optimizing dependencies" messages Diagnosis:

# Check dependency optimization cache
ls -la node_modules/.vite/deps/
# Analyze package.json for problematic dependencies
grep -E "(^[[:space:]]*\"[^\"]*\":[[:space:]]*\".*)" package.json | grep -v "workspace:" | head -20
# Check for mixed ESM/CJS modules
find node_modules -name "package.json" -exec grep -l "\"type\".*module" {} \; | head -10

Solutions:

  1. Force include problematic packages: Add to optimizeDeps.include
  2. Exclude heavy packages: Use optimizeDeps.exclude for large libraries
  3. Clear cache: rm -rf node_modules/.vite && npm run dev

HMR Not Working or Slow Updates

Symptoms: Full page reloads, slow hot updates, HMR overlay errors Diagnosis:

# Test HMR WebSocket connection
curl -s http://localhost:5173/__vite_ping
# Check for circular dependencies
grep -r "import.*from.*\.\." src/ | head -10
# Verify file watching
lsof -p $(pgrep -f vite) | grep -E "(txt|js|ts|jsx|tsx|vue|svelte)"

Solutions:

  1. Configure HMR accept handlers: Add import.meta.hot.accept()
  2. Fix circular dependencies: Refactor module structure
  3. Enable warmup: Configure server.warmup.clientFiles

Build Bundle Size Optimization

Symptoms: Large bundle sizes, slow loading, poor Core Web Vitals Diagnosis:

# Generate bundle analysis
npm run build && npx vite-bundle-analyzer dist --no-open
# Check for duplicate dependencies
npm ls --depth=0 | grep -E "deduped|UNMET"
# Analyze chunk sizes
ls -lah dist/assets/ | sort -k5 -hr | head -10

Solutions:

  1. Implement code splitting: Use dynamic imports import()
  2. Configure manual chunks: Optimize build.rollupOptions.output.manualChunks
  3. External large dependencies: Move to CDN or external bundles

Module Resolution Failures

Symptoms: "Failed to resolve import", "Cannot resolve module", path resolution errors Diagnosis:

# Check file existence and case sensitivity
find src -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" | head -20
# Verify alias configuration
grep -A10 -B5 "alias:" vite.config.*
# Check import paths
grep -r "import.*from ['\"]\./" src/ | head -10

Solutions:

  1. Configure path aliases: Set up resolve.alias mapping
  2. Add file extensions: Include in resolve.extensions
  3. Fix import paths: Use consistent relative/absolute paths

SSR Build Configuration Issues

Symptoms: SSR build failures, hydration mismatches, server/client inconsistencies Diagnosis:

# Test SSR build
npm run build:ssr || vite build --ssr src/entry-server.js
# Check for client-only code in SSR
grep -r "window\|document\|localStorage" src/server/ || echo "No client-only code found"
# Verify SSR entry points
ls -la src/entry-server.* src/entry-client.*

Solutions:

  1. Configure SSR environment: Set up separate client/server builds
  2. Handle client-only code: Use import.meta.env.SSR guards
  3. External server dependencies: Configure external in server build

Plugin Compatibility and Loading Issues

Symptoms: Plugin errors, build failures, conflicting transformations Diagnosis:

# Check plugin versions
npm list | grep -E "(vite|@vitejs|rollup-plugin|vite-plugin)" | head -15
# Verify plugin order
grep -A20 "plugins.*\[" vite.config.*
# Test minimal plugin configuration
echo 'export default { plugins: [] }' > vite.config.minimal.js && vite build --config vite.config.minimal.js

Solutions:

  1. Update plugins: Ensure compatibility with Vite version
  2. Reorder plugins: Critical plugins first, optimization plugins last
  3. Debug plugin execution: Add logging to plugin hooks

Environment Variable Access Issues

Symptoms: process.env undefined, environment variables not available in client Diagnosis:

# Check environment variable names
grep -r "process\.env\|import\.meta\.env" src/ | head -10
# Verify VITE_ prefix
env | grep VITE_ || echo "No VITE_ prefixed variables found"
# Test define configuration
grep -A10 "define:" vite.config.*

Solutions:

  1. Use VITE_ prefix: Rename env vars to start with VITE_
  2. Use import.meta.env: Replace process.env with import.meta.env
  3. Configure define: Add custom variables to define config

Advanced Vite Features

Asset Module Patterns

// Import assets with explicit types
import logoUrl from './logo.png?url'           // URL import
import logoInline from './logo.svg?inline'     // Inline SVG
import logoRaw from './shader.glsl?raw'        // Raw text
import workerScript from './worker.js?worker'  // Web Worker

// Dynamic asset imports
const getAsset = (name) => {
  return new URL(`./assets/${name}`, import.meta.url).href
}

// CSS modules
import styles from './component.module.css'

TypeScript Integration

// vite-env.d.ts
/// <reference types="vite/client" />

interface ImportMetaEnv {
  readonly VITE_API_BASE_URL: string
  readonly VITE_APP_TITLE: string
  readonly VITE_ENABLE_ANALYTICS: string
}

interface ImportMeta {
  readonly env: ImportMetaEnv
}

// Asset type declarations
declare module '*.svg' {
  import React from 'react'
  const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
  export { ReactComponent }
  const src: string
  export default src
}

declare module '*.module.css' {
  const classes: { readonly [key: string]: string }
  export default classes
}

Performance Monitoring

// Performance analysis configuration
export default defineConfig({
  build: {
    rollupOptions: {
      output: {
        // Analyze bundle composition
        manualChunks: (id) => {
          if (id.includes('node_modules')) {
            // Log large dependencies
            const match = id.match(/node_modules\/([^/]+)/)
            if (match) {
              console.log(`Dependency: ${match[1]}`)
            }
          }
        }
      }
    }
  },
  plugins: [
    // Custom performance plugin
    {
      name: 'performance-monitor',
      generateBundle(options, bundle) {
        const chunks = Object.values(bundle).filter(chunk => chunk.type === 'chunk')
        const assets = Object.values(bundle).filter(chunk => chunk.type === 'asset')

        console.log(`Generated ${chunks.length} chunks and ${assets.length} assets`)

        // Report large chunks
        chunks.forEach(chunk => {
          if (chunk.code && chunk.code.length > 100000) {
            console.warn(`Large chunk: ${chunk.fileName} (${chunk.code.length} bytes)`)
          }
        })
      }
    }
  ]
})

Migration and Integration Patterns

From Create React App Migration

// Step-by-step CRA migration
export default defineConfig({
  // 1. Replace CRA scripts
  plugins: [react()],

  // 2. Configure public path
  base: process.env.PUBLIC_URL || '/',

  // 3. Handle environment variables
  define: {
    'process.env.REACT_APP_API_URL': JSON.stringify(process.env.VITE_API_URL),
    'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
  },

  // 4. Configure build output
  build: {
    outDir: 'build',
    sourcemap: true
  },

  // 5. Handle absolute imports
  resolve: {
    alias: {
      src: resolve(__dirname, 'src')
    }
  }
})

Monorepo Configuration

// packages/app/vite.config.js
export default defineConfig({
  // Resolve shared packages
  resolve: {
    alias: {
      '@shared/ui': resolve(__dirname, '../shared-ui/src'),
      '@shared/utils': resolve(__dirname, '../shared-utils/src')
    }
  },

  // Optimize shared dependencies
  optimizeDeps: {
    include: [
      '@shared/ui',
      '@shared/utils'
    ]
  },

  // Server configuration for workspace
  server: {
    fs: {
      allow: [
        resolve(__dirname, '..'),  // Allow parent directory
        resolve(__dirname, '../shared-ui'),
        resolve(__dirname, '../shared-utils')
      ]
    }
  }
})

Code Review Checklist

When reviewing Vite configurations and build code, focus on these aspects:

Configuration & Plugin Ecosystem

  • Vite config structure: Uses defineConfig() for proper TypeScript support and intellisense
  • Environment handling: Conditional configuration based on command and mode parameters
  • Plugin ordering: Framework plugins first, then utilities, then analysis plugins last
  • Plugin compatibility: All plugins support current Vite version (check package.json)
  • Framework integration: Correct plugin for framework (@vitejs/plugin-react, @vitejs/plugin-vue, etc.)

Development Server & HMR

  • Server configuration: Appropriate port, host, and proxy settings for development
  • HMR optimization: server.warmup.clientFiles configured for frequently accessed modules
  • File system access: server.fs.allow properly configured for monorepos/shared packages
  • Proxy setup: API proxies configured correctly with proper changeOrigin and rewrite options
  • Custom HMR handlers: import.meta.hot.accept() used where appropriate for better DX

Build Optimization & Production

  • Build targets: Modern browser targets set (es2020+) for optimal bundle size
  • Manual chunking: Strategic code splitting with vendor, framework, and feature chunks
  • Bundle analysis: Bundle size monitoring configured (visualizer plugin or similar)
  • Source maps: Appropriate source map strategy for environment (eval-cheap-module for dev, source-map for prod)
  • Asset optimization: CSS code splitting enabled, assets properly handled

Framework Integration & TypeScript

  • TypeScript setup: Proper vite-env.d.ts with custom environment variables typed
  • Framework optimization: React Fast Refresh, Vue SFC support, or Svelte optimizations enabled
  • Import handling: Asset imports properly typed (*.svg, *.module.css declarations)
  • Build targets compatibility: TypeScript target aligns with Vite build target
  • Type checking: Separate type checking process (not blocking dev server)

Asset Handling & Preprocessing

  • Static assets: Public directory usage vs. asset imports properly distinguished
  • CSS preprocessing: Sass/Less/PostCSS properly configured with appropriate plugins
  • Asset optimization: Image optimization, lazy loading patterns implemented
  • Font handling: Web fonts optimized with preloading strategies where needed
  • Asset naming: Proper hash-based naming for cache busting

Migration & Advanced Patterns

  • Environment variables: VITE_ prefixed variables used instead of process.env
  • Import patterns: ESM imports used consistently, dynamic imports for code splitting
  • Legacy compatibility: @vitejs/plugin-legacy configured if supporting older browsers
  • SSR considerations: Proper client/server environment separation if using SSR
  • Monorepo setup: Workspace dependencies properly resolved and optimized

Expert Resources

Official Documentation

Performance and Analysis

Plugin Ecosystem

Migration and Integration

Tools and Utilities

Always validate changes don't break existing functionality and verify build output meets performance targets before considering the issue resolved.

平台分布

Claude Code

25.39%
按下载量换算74

OpenCode

24.46%
按下载量换算71

Antigravity

18.3%
按下载量换算53

Gemini CLI

13.49%
按下载量换算39

Codex

6.96%
按下载量换算20

Cursor

3.1%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills