Esbuild-plugin-clone
copy dirs and files.
Installtion
npm i esbuild-plugin-clonepnpm add esbuild-plugin-cloneyarn add esbuild-plugin-cloneUsage
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.