← All repositories
78,295 stars7,841 forksTypeScriptmit1 view
vite.dev

Vite

Features

  • Development ServersVite launches a local server featuring hot module replacement and configurable network settings to enable rapid iteration through live code updates.
  • Environment-Aware Module GraphsMaintains isolated dependency trees and execution contexts to support concurrent development across client, server, and custom runtime environments.
  • Hot Module Replacement ProtocolsPropagates granular code updates to the browser via WebSockets, allowing stateful application patches without requiring full page reloads.
  • Production Build OptimizationVite optimizes production builds through automatic code splitting, preload directive generation, and parallelized async chunk loading to reduce network roundtrips.
  • Plugin-Based Build EnginesA modular architecture that extends core transformation capabilities through a standardized hook interface for custom build and runtime logic.
  • Modern Web Build ToolchainsBuilding and bundling web applications using native ESM, high-speed transpilation, and optimized production build pipelines for modern browsers.
  • Build System HooksVite provides universal hooks that execute during development and build phases to resolve, load, and transform modules consistently across environments.
  • Production Build APIsVite provides a programmatic API to build for production by transpiling code, minifying assets, generating source maps, and creating build manifests.
  • Environment Management APIsVite provides APIs to access environment instances, configure execution contexts, and manage isolated module graphs for cross-environment plugin communication.
  • Multi-Environment RuntimesA configuration-driven architecture that manages isolated module graphs and execution contexts to support diverse server-side and client-side rendering requirements.
  • Hot-Reloading SystemsIterating on code while it runs, with edits reflected in the browser instantly without losing application state or requiring full page reloads.
  • Server-Side Rendering FrameworksGenerating client and server bundles with environment-specific logic to handle template rendering and module loading for performant server-side rendered applications.
  • Native ESM Development ServersServes source code directly to the browser using native ES modules to eliminate expensive bundling during the development phase.
  • Web Application ServersVite serves web applications using a development server that treats HTML files as entry points and resolves module dependencies for a fast development experience.
  • Dependency OptimizationVite pre-bundles project dependencies to accelerate initial loading performance by ensuring all required modules are processed and ready for immediate consumption.
  • Development Server APIsVite offers a programmatic API to create development server instances, handle hot module replacement, and provide middleware support for local development workflows.
  • Hot Module Replacement SystemsVite manages hot module replacement through lifecycle events, allowing modules to accept updates, dispose of resources, and handle invalidation events during development.
  • Production Asset OptimizationsPreparing web applications for deployment by minifying code, splitting chunks, and generating optimized static assets to ensure fast loading performance.
  • Frontend Build ToolchainsA unified development and production pipeline that leverages native ESM and high-performance transformers to accelerate web application delivery.
  • TypeScript TranspilersVite transpiles TypeScript files into JavaScript using high-speed transformers, while delegating static type checking to external processes to maintain build performance.
  • Plugin Integration InterfacesVite allows adding plugins to the project by installing them as dependencies and including them in the configuration file for integration.
  • SSR BundlersVite generates separate client and server bundles using environment-specific logic to handle template rendering and module loading for server-side rendered applications.
  • SSR Development ServersVite integrates with server frameworks by running the development server in middleware mode to handle custom HTML serving and environment-specific transformations.
  • Dependency Caching MechanismsVite caches pre-bundled dependencies on the file system to accelerate development, automatically invalidating them whenever lockfiles or configuration settings change during the development process.
  • Static Site GenerationVite generates static HTML files for specific routes at build time to improve performance and search engine optimization using server-side rendering logic.
  • Chunking StrategiesVite provides control over how code is split and bundled by defining custom chunking strategies to optimize loading performance in production environments.
  • Plugin-Based Transformation PipelinesProcesses source files through a unified hook system that ensures consistent code transformation across both development and production builds.
  • Virtual Module ResolversInjects dynamically generated code into the module graph using custom import prefixes to bridge build-time configuration with runtime application logic.
  • Virtual ModulesVite allows defining virtual modules to pass build-time information to source files using standard import syntax and specific prefixes.
  • Plugin Orchestration StrategiesVite supports enforcing plugin ordering or restricting application to specific build phases using the modifier property in the configuration.
  • Build PluginsVite executes conditional plugin logic during build hooks to apply framework-specific transformations required for server-side rendering environments.
  • Dependency Discovery MechanismsVite crawls source code for bare imports to identify dependency entry points, enabling rapid pre-bundling of required modules during the development phase.
  • Library BundlersVite allows specifying entry points and externalizing dependencies to generate optimized library bundles formatted for consumption by browsers or module systems.
  • Multi-Page Application BuildersVite supports defining multiple HTML entry points within the build configuration to generate distinct production bundles for complex multi-page application architectures.
  • Environment Variable AccessorsVite exposes built-in environment constants like mode and base URL via the global import meta object to branch application logic at runtime.
  • Dependency Pre-BundlersConverts CommonJS and UMD dependencies into optimized ESM chunks using a high-performance bundler to improve browser loading efficiency.
  • Plugin Authoring InterfacesVite supports authoring custom plugins directly within the configuration file to extend build processes, transform modules, or inject custom logic.
  • Environment Variable ManagersVite manages environment variables by loading them from files and exposing them to client-side code, ensuring sensitive secrets remain excluded from the bundle.
  • CSS InjectionVite injects CSS files into the page with hot module replacement, supporting pre-processors, CSS modules, and automatic URL rebasing for imported assets.
  • Asset URL ResolversVite resolves static asset paths during development and production by importing them as URLs, enabling automatic hashing, inlining, and plugin-based optimization.
  • Build PreviewersVite serves a production-ready build from the local output directory to verify application behavior and asset integrity before deploying the final artifacts.
  • Asset URL ResolutionVite provides resolved asset URLs using native module paths and constructors to support dynamic asset loading that remains compatible with production bundling and hashing.
  • SSR Dependency ManagementVite optimizes build performance during server-side rendering by managing dependency externalization and forcing transformations for specific packages or linked dependencies.
  • HTML Asset ProcessorsVite supports injecting variables into HTML files using a special syntax to replace dynamic configuration values within static markup during the build process.
  • Browser Compatibility TargetsVite enables defining target browser ranges for production builds to ensure generated code remains compatible with specific browser versions and required feature sets.
  • Glob Import UtilitiesVite supports importing multiple modules from the file system using glob patterns, including lazy-loading, eager imports, and named exports for flexible dependency management.
  • Cross-Environment Module ExecutorsDefining and managing isolated module graphs and runtimes to support complex applications that require concurrent execution across different environments.
  • Backend Server IntegrationVite integrates with backend servers by generating manifests, setting entry points, and proxying static asset requests to the development server.
  • Preview ServersVite provides a programmatic API to create preview server instances to serve and test production-ready builds locally before deployment.
  • Code Transformation APIsVite enables transforming JavaScript or TypeScript code using high-performance transformers for efficient code processing within plugins.
  • Environment ConfigurationsVite allows configuring application modes to load environment-specific settings and control build behavior using command-line flags or environment variables.
  • Static Asset ServingVite hosts static files directly from a dedicated directory without processing or hashing to ensure they remain accessible at their original paths in the final build.
  • Resolution OptimizersVite minimizes filesystem overhead by using explicit import paths and narrowing resolve extensions to decrease the number of checks required for module resolution.
  • Linked Dependency ManagementVite treats monorepo packages as source code to bypass unnecessary bundling while allowing manual inclusion of non-ESM dependencies for optimal performance and compatibility.
  • WebSocket Event SystemsVite enables communication between client and server using WebSocket events for real-time updates and custom event handling during development.
  • Environment Variable LoadersVite provides an API to load environment variables from files into the process environment based on the specified mode and directory.
  • Dependency Pre-warmersVite pre-transforms frequently used files during server startup to eliminate request waterfalls and ensure critical modules are cached and ready for immediate delivery.