Vite plugin for WorkTank which enables you to execute whole files in a worker pool, transparently.
For more information read the readme for worktank-esbuild-plugin.
npm install worktank-vite-pluginLet's configure the bundler, mainly we need to tell the "worktank" plugin which files to process:
import {defineConfig} from 'vite';
import worktank from 'worktank-vite-plugin';
export default defineConfig ({
plugins: [
worktank ({
filter: /\.worker\.(js|ts)$/ // Files matching this regex will be processed
})
]
});MIT © Fabio Spampinato