worktank-esbuild-plugin
v1.1.2
Published
Esbuild plugin for WorkTank which enables you to execute whole files in a worker pool, transparently.
Downloads
9
Maintainers
Readme
WorkTank Esbuild Plugin
Esbuild plugin for WorkTank which enables you to execute whole files in a worker pool, transparently.
Install
npm install --save worktank-esbuild-plugin
Usage
For more information read this.
import esbuild from 'esbuild';
import worktank from 'worktank-esbuild-plugin';
esbuild.build ({
bundle: true,
minify: true,
format: 'esm',
platform: 'node',
target: 'es2018',
entryPoints: ['index.ts'],
outdir: 'dist',
plugins: [
worktank ({
filter: /\.worker\.(js|ts)$/ // Files matching this regex will be processed
})
]
});
License
MIT © Fabio Spampinato