An ESBuild plugin for copying assets during builds. Current version is 1.0.2 (stable). It is a fork of esbuild-plugin-copy with watch removed and exclude support added. Key differentiators: keeps file structure, allows control over destination paths, supports exclusion patterns via glob, and can run only once or on changes. It requires esbuild >= 0.14.0 as a peer dependency.
npm install esbuild-plugin-cpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESBuild plugin that copies assets from source to output directory during build. Configures asset pairs with from/to paths and optional exclude patterns.
Use 'dir/**/*' instead of 'dir/*' to include nested files.
Consider alternative plugins that support streaming or parallel copying for large asset directories.
Use the original esbuild-plugin-copy if watch mode is required, or implement your own watch logic separately.
Stay updated with changelog for any changes to resolveFrom behavior.
Use recursive pattern 'dir/**/*' or configure globby.deep option to allow matching nested files.
Run 'npm install esbuild-plugin-cp --save-dev' (or pnpm/yarn equivalent) to install the package.
Use named import: import { copy } from 'esbuild-plugin-cp';