Rollup plugin to bundle Web Workers using a custom prefix import syntax (e.g., `worker!./worker.js`). v3.0.4 supports Rollup 3.x. It allows specifying worker-specific plugins and enables uglification. Provides TypeScript types. Differentiator: uses a prefix syntax rather than URL or inline blob, enabling easy bundling.
npm install rollup-plugin-workerVerified import paths — ran on the pinned version, not inferred.
Configures rollup-plugin-worker in rollup.config.js and shows usage in main.js with a custom worker import prefix.
Upgrade to Rollup 3.x or use rollup-plugin-worker@2.x for Rollup 2 compatibility.
Use the same prefix in both plugin options and import paths.
Define separate plugins array for worker processing if needed.
Set uglify: false and use @rollup/plugin-terser for minification.
npm install rollup-plugin-worker --save-dev
Use default import: import worker from 'rollup-plugin-worker'
Check that rollup-plugin-worker is in plugins array and prefix matches import path (e.g., 'worker!').
No dependency data recorded yet.