esbuild-plugin-copy-watch
v2.3.1
Published
Esbuild plugin to copy and watch for files
Downloads
1,801
Readme
esbuild-plugin-copy-watch
Esbuild plugin to copy and watch for files
Install
$ npm install esbuild-plugin-copy-watch
Usage
import esbuild from 'esbuild'
import copy from 'esbuild-plugin-copy-watch'
await esbuild.build({
entryPoints: ['src/index.js'],
bundle: true,
outfile: 'dest/build.js',
write: false,
plugins: [
copy({
paths: [
{ from: 'static/**', to: 'static' }, // will copy into dest/static
{ from: ['config/*.js', '!config/private.js'], to: 'config' } // will copy config files into dest/config and ignore the private.js
],
forceCopyOnRebuild: false // force to copy the files in every rebuild
})
]
})
Issues
:bug: If you found an issue we encourage you to report it on github. Please specify your OS and the actions to reproduce it.
Contributing
:busts_in_silhouette: Ideas and contributions to the project are welcome. You must follow this guideline.
License
MIT