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.
npm install esbuild-plugin-copyVerified import paths — ran on the pinned version, not inferred.
Shows basic usage of the copy plugin with ESBuild, including watch mode and asset copy from ./assets to output directory.
Use 'from: ['./dir/**/*']' to match all files recursively.
Set 'watch: true' in both ESBuild build options and plugin options. Ensure watched files are not inside absWorkingDir.
Omit 'resolveFrom' to use ESBuild output directory as base path.
Change glob pattern to './node_modules/tinymce/skins/**/*' to include files in subdirectories.