Registry / devops / esbuild-plugin-copy

esbuild-plugin-copy

JSON →
library2.1.1jsnpmunverified

ESBuild plugin for copying assets during builds. Current stable version 2.1.1, released under the LinbuduLab organization. Supports glob patterns, keeps file structure, has watching mode based on chokidar polling, and allows flexible destination configuration. Differentiates from simple shell commands by integrating directly into ESBuild's plugin lifecycle, offering verbose logging, and the ability to copy only on asset changes.

devops
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

The plugin exports a named function, not a default export.

import { copy } from 'esbuild-plugin-copy'

Shows basic usage of the copy plugin with ESBuild, including watch mode and asset copy from ./assets to output directory.

import { build } from 'esbuild'; import { copy } from 'esbuild-plugin-copy'; (async () => { const res = await build({ entryPoints: ['./src/main.ts'], bundle: true, watch: true, outfile: './dist/main.js', plugins: [ copy({ resolveFrom: 'cwd', assets: { from: ['./assets/*'], to: ['./assets'], }, watch: true, }), ], }); })();
Debug
Known footguns
gotchaGlob pattern 'dir/*' does not expand directories; use 'dir/**/*' to include nested files.
gotchaWatching mode requires ESBuild's watch option to be enabled and only works for files outside absWorkingDir.
deprecatedThe 'resolveFrom' option may change behavior in future versions; rely on ESBuild's outdir/outfile by default.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
16 hits · last 30 days
gptbot
4
amazonbot
4
ahrefsbot
3
claudebot
3
script
1
bingbot
1
Resources