An esbuild plugin to copy static files that changed from a source directory to a destination directory.
* This plugin is a typed and fully tested version of @nickjj‘s esbuild-copy-static-files.
Installation
npm i -D @sprout2000/esbuild-copy-plugin
or
yarn add -D @sprout2000/esbuild-copy-plugin
You will need to have Node.js >=16.7
installed.
Usage
import { build } from 'esbuild'; import { copyPlugin } from '@sprout2000/esbuild-copy-plugin'; build({ plugins: [ copyPlugin({ src: './assets/icon.png', dest: './dist/logo.png', }), ], });
API
# clone this repo, and install devDependencies... git clone https://github.com/sprout2000/esbuild-copy-plugin.git cd esbuild-copy-plugin npm install # run the test npm test
Leave A Comment