Vite Static Asset Copy Plugin

JSON →
library 4.1.0 ·javascript
verified May 27, 2026

vite-plugin-static-copy is a Vite plugin designed to copy static assets during both development and production builds, mirroring the functionality of `rollup-plugin-copy` but optimized for Vite's ecosystem. It is currently at version 4.1.0 and maintains an active release cadence with frequent updates and bug fixes, often several per month. Key differentiators include its dedicated dev server support, which avoids copying files during development for faster startup times by serving them directly. Unlike Vite's built-in public directory, this plugin allows for more granular control over specific files and directories, offering options like renaming, stripping base paths (`stripBase`), and transformation of content. It specifically targets scenarios where assets need to be programmatically managed or placed outside the standard public directory, or when `import` statements are not suitable for asset inclusion. It uses `tinyglobby` for pattern matching, aligning with Vite's internal dependencies, and preserves directory structure by default, unlike `rollup-plugin-copy`'s default `flatten: true`.

total hits 16
actors 6 distinct systems
last hit 2d ago Bingbot
GPTBot
5
MetaBot
4
Script
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France