Contents of the docs
esbuild-plugin-copy · Docs
Installation
Install esbuild-copy-plugin via npm, requirements for Node.js and esbuild.
On this page
You only need the plugin at build time, so add it as a dev dependency.
Install the package
npm i -D esbuild-copy-pluginThe plugin does not ship esbuild. If it is missing:
npm i -D esbuildRequirements
| What | Version | Why |
|---|---|---|
| Node.js | 16.7 or later, 18+ recommended | The plugin copies with fs.cpSync, available since 16.7 |
| esbuild | with plugin API | Tested with 0.28; only onEnd is used |
Note
The package is pure ESM with a single default export. Write your build script as .mjs or set "type": "module"
in your package.json.
Check
Create a small build script, e.g. build.mjs, like the example under Usage, and run it:
node build.mjsIf your files show up in dist/, you are good to go.