{"library":"rollup-plugin-workers","title":"rollup-plugin-workers","description":"A Rollup plugin that adds code splitting for JavaScript module Workers (Web Workers, Shared Workers, Service Workers) and Worklets (AudioWorklet, PaintWorklet, LayoutWorklet, AnimationWorklet). Current stable version: 2.1.1. Works with Rollup >= 1.11.0. It transforms Worker/Worklet import patterns into separate output chunks, enabling dynamic code splitting for multithreaded applications. Unlike generic worker plugins, this plugin specifically targets module-type workers and supports ES module format in workers. Does not include a module loader; users must handle chunk loading.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-workers"],"cli":null},"imports":["import worker from 'rollup-plugin-workers'","import { default as worker } from 'rollup-plugin-workers'","import worker from 'rollup-plugin-workers';\n\nexport default {\n  plugins: [worker()]\n}"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import worker from 'rollup-plugin-workers';\n\nexport default {\n  input: 'main.js',\n  output: {\n    dir: 'dist',\n    format: 'esm'\n  },\n  plugins: [worker()]\n};","lang":"javascript","description":"Demonstrates basic Rollup configuration with the workers plugin to enable code splitting for module workers.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}