Skip to content

Esbuild-plugin-clone

copy dirs and files.

Installtion

npm i esbuild-plugin-clone
pnpm add esbuild-plugin-clone
yarn add esbuild-plugin-clone

Usage

use glob within, so can use glob pattern

ts
import { clone } from 'esbuild-plugin-clone'
(async () => {
  const res = await build({
    entryPoints: ['./src/main.ts'],
    bundle: true,
    watch: true,
    outfile: './dist/main.js',
    plugins: [
      copy({
        from: './assets/*',
        to: './dist/tmp-assets',
      }),
    ],
  });
})();

options

ts
interface Options {
	from: string
	to: string
	moment?: 'onStart' | 'onEnd'
}

Issues

Please let me know if there are any issues, click this link.

Released under the MIT License.