@tank/vite-mastery

Diagnose and resolve Vite configuration, build, plugin, SSR, and deployment issues.

1|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/tankpkg/packages --skill tank-vite-mastery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: @tank/vite-mastery
Source: https://github.com/tankpkg/packages/tree/main/skills/vite-mastery
Command: npx skills add https://github.com/tankpkg/packages --skill tank-vite-mastery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you diagnose, configure, and optimize Vite projects when builds are slow, bundles are large, hot reload breaks, environment variables are confusing, or advanced features like SSR and library mode need the right setup.

Core Features & Use Cases

  • Configuration guidance: Author robust Vite configs for aliases, defines, mode-based branching, proxies, HTTPS, and custom middleware.
  • Build optimization: Tune chunking, minification, CSS splitting, asset inlining, and dependency pre-bundling to reduce bundle size and improve performance.
  • Plugin and platform support: Design plugins, virtual modules, SSR flows, library builds, PWA setup, and profiling workflows for production-ready frontend systems.
  • Use case: A team shipping a large React app can use this Skill to split vendor code, fix HMR issues behind a proxy, validate env handling, and prepare a lean production build.

Quick Start

Ask the Vite mastery skill to review your Vite setup and recommend the best configuration, optimization, and troubleshooting steps for your project.

Frequently Asked Questions about @tank/vite-mastery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Vite build bundle size and split vendor code?

To optimize Vite build bundle size, configure Rollup output controls for manual chunking, CSS splitting, and asset inlining. You can also tune dependency pre-bundling via optimizeDeps to reduce bundle size and improve performance.

Why does Vite HMR break behind a proxy and how can I fix it?

Vite HMR can break behind a proxy due to incorrect dev server proxy or middleware configuration. Diagnose your Vite setup to configure custom middleware and proxies properly, ensuring hot module replacement works reliably.

How do I set up Vite SSR and handle externalization issues?

Setting up Vite SSR requires configuring server-side rendering externalization to separate server and client modules. Diagnose your SSR flows to ensure proper environment management and externalization for production-ready frontend systems.

What is the best way to author a Vite plugin with virtual modules?

The best way to author a Vite plugin with virtual modules is to design plugin hooks that integrate with the Rollup pipeline. Use this approach to resolve virtual module imports and extend Vite's build and dev server capabilities.

How do I configure Vite resolve aliases and environment variables for different modes?

Configure Vite resolve aliases and define constants in vite.config.ts to manage environment variables. Use mode-based branching to validate env handling and ensure correct variable exposure across development and production builds.

Can I use Vite library mode and PWA setup with Workbox caching together?

Yes, you can use Vite library mode alongside PWA setup and Workbox caching. Configure Rollup output controls for library builds and integrate Workbox to manage service worker caching for a production-ready frontend system.