copy some files from one destination to another
npm i --save-dev esbuild-copy-plugin
import esbuild from 'esbuild';
import copy from 'esbuild-copy-plugin';
esbuild.build({
entryPoints: ['./src/index.js'],
bundle: true,
outfile: './dist/index.js',
plugins: [
copy({from: './public', to: '.'}),
]
});