A Vite plugin for copying files and directories during build, designed as a drop-in replacement for copy-webpack-plugin for projects migrating from webpack to Vite. Current version 1.0.1 (stable). It offers a simple API similar to copy-webpack-plugin, supporting glob patterns and multiple source destinations. Unlike alternatives like vite-plugin-static-copy, it aims for minimal configuration and direct compatibility with webpack's pattern syntax.
npm install copy-vite-pluginVerified import paths — ran on the pinned version, not inferred.
Basic setup: copies a directory and a file from source to output during build.
Use 'pattern' instead of 'patterns' in the options object.
Use absolute paths or paths relative to project root.
Use 'vite-plugin-static-copy' if you need copy during dev with HMR.
Use full paths or rely on root-relative paths.
Specify exact paths or use another plugin like 'vite-plugin-static-copy' that supports globs.
Use 'import { copy } from 'copy-vite-plugin' instead of 'import copy from 'copy-vite-plugin'.Rename 'patterns' to 'pattern' in the plugin options.
Ensure paths are relative to project root or use absolute paths.
No dependency data recorded yet.