An ESbuild plugin for handling Web Workers by marking imports with `?worker` query suffix. v0.0.3 (sparse releases). Supports inlining worker code (default) or outputting separate files. Requires ESbuild ≥0.18.0 and Node ≥14.0.0. Differentiators: simple query-based syntax, automatic bundling and minification, TypeScript support. Limited community adoption and maintenance.
npm install esbuild-plugin-webworkerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up esbuild with the webworker plugin, builds a main file that imports a worker script via `?worker`, and runs Fibonacci computation in a worker.
Use import syntax in an ES module context (add 'type':'module' in package.json or use .mjs extension).
Update Node to v18 or higher.
Upgrade esbuild to >=0.18.0
Set inline:false and specify an out directory to generate separate worker files.
Run `npm install esbuild@latest` to update to a compatible version.
Set `"type": "module"` in your package.json or rename the file to .mjs.
Switch to ESM import or use dynamic import: `import('esbuild-plugin-webworker').then(m => m.default())`.