{"versions":{"2.2.3-fix":{"name":"@trickfilm400/rollup-plugin-off-main-thread","version":"2.2.3-fix","description":"Use Rollup with workers and ES6 modules today.","main":"index.js","scripts":{"fmt":"prettier --write 'tests/**/*.js' *.js *.md *.json","test":"node ./run_tests.js"},"author":{"name":"Surma","email":"surma@google.com"},"contributors":[{"name":"trickfilm400","email":"trickfilm400@gmail.com"}],"license":"Apache-2.0","devDependencies":{"chai":"4.2.0","chalk":"^2.4.2","karma":"4.2.0","karma-chai":"0.1.0","karma-chrome-launcher":"3.0.0","karma-firefox-launcher":"1.1.0","karma-mocha":"1.3.0","karma-safari-launcher":"1.0.0","karma-safaritechpreview-launcher":"2.0.2","mocha":"6.1.4","prettier":"1.18.2","rollup":"2.2.0"},"repository":{"type":"git","url":"git+https://github.com/trickfilm400/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^3.1.6","json5":"^2.2.0","magic-string":"^0.25.0","string.prototype.matchall":"^4.0.6"},"_id":"@trickfilm400/rollup-plugin-off-main-thread@2.2.3-fix","gitHead":"65f6a6a356aa8f6f11215d6222b934fe94eaaea8","bugs":{"url":"https://github.com/trickfilm400/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/trickfilm400/rollup-plugin-off-main-thread#readme","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-vFj09OvQchVpv6e+XeqEDdWEY6K79n327f5T9CerefionKQSPbRIrb+cZ0IBOhVaTO7LGtz+A0nAzjaxCJN5ww==","shasum":"87cdc3d12eb58cf6b296433675713d4490851465","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3-fix.tgz","fileCount":90,"unpackedSize":94877,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+4g56lZ5fFSYjyq+ZjVjtCDZZld+U/A0iVYoG3JTQKAiAv53AljJl9BqS7ySBUgsXulx2o8YSp7CFJNHYi1Mai1Q=="}],"size":17506},"_npmUser":{"name":"anonymous","email":"trickfilm400@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"trickfilm400@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-off-main-thread_2.2.3-fix_1716412200161_0.8081156174405186"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-22T21:10:00.355Z","publish_time":1716412200355,"_source_registry_name":"default"},"2.3.0":{"name":"@trickfilm400/rollup-plugin-off-main-thread","version":"2.3.0","description":"Use Rollup with workers and ES6 modules today.","main":"index.js","scripts":{"fmt":"prettier --write 'tests/**/*.js' *.js *.md *.json","test":"node ./run_tests.js"},"author":{"name":"Surma","email":"surma@google.com"},"contributors":[{"name":"trickfilm400","email":"trickfilm400@gmail.com"}],"license":"Apache-2.0","devDependencies":{"chai":"4.2.0","chalk":"^2.4.2","karma":"4.2.0","karma-chai":"0.1.0","karma-chrome-launcher":"3.0.0","karma-firefox-launcher":"1.1.0","karma-mocha":"1.3.0","karma-safari-launcher":"1.0.0","karma-safaritechpreview-launcher":"2.0.2","mocha":"6.1.4","prettier":"1.18.2","rollup":"2.2.0"},"repository":{"type":"git","url":"git+https://github.com/trickfilm400/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^3.1.6","json5":"^2.2.0","magic-string":"^0.25.0","string.prototype.matchall":"^4.0.6"},"_id":"@trickfilm400/rollup-plugin-off-main-thread@2.3.0","gitHead":"202946aa2578c400fb7370985c8083bec2a07f97","bugs":{"url":"https://github.com/trickfilm400/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/trickfilm400/rollup-plugin-off-main-thread#readme","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-Bnwn2+7YWH7j24DehB/xqN5ad57s28DTDN59vl7zNM+a24VwbHyRf6mJttb/AxFuGhb6KJBOrrKHGBWG2Ggumw==","shasum":"004de516c4bc8d7e4e3b7c1724a4d9282116f550","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.3.0.tgz","fileCount":86,"unpackedSize":91012,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyranM7SrNKVDVywmQ6L+uaH7hXL49nPfxCIATF2ZLhwIgTrZkgiJ4mfpSlo4wPRNjak/ReWCPJbKPcZNU5Rq7vNg="}],"size":16624},"_npmUser":{"name":"anonymous","email":"trickfilm400@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"trickfilm400@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-off-main-thread_2.3.0_1716412543283_0.21923966672609918"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-22T21:15:43.447Z","publish_time":1716412543447,"_source_registry_name":"default"},"2.4.0":{"name":"@trickfilm400/rollup-plugin-off-main-thread","version":"2.4.0","description":"Use Rollup with workers and ES6 modules today.","main":"index.js","scripts":{"fmt":"prettier --write 'tests/**/*.js' *.js *.md *.json","test":"node ./run_tests.js"},"author":{"name":"Surma","email":"surma@google.com"},"contributors":[{"name":"trickfilm400","email":"trickfilm400@gmail.com"}],"license":"Apache-2.0","devDependencies":{"chai":"4.2.0","chalk":"^2.4.2","karma":"4.2.0","karma-chai":"0.1.0","karma-chrome-launcher":"3.0.0","karma-firefox-launcher":"1.1.0","karma-mocha":"1.3.0","karma-safari-launcher":"1.0.0","karma-safaritechpreview-launcher":"2.0.2","mocha":"6.1.4","prettier":"1.18.2","rollup":"2.2.0"},"repository":{"type":"git","url":"git+https://github.com/trickfilm400/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^3.1.10","json5":"^2.2.3","magic-string":"^0.30.10","string.prototype.matchall":"^4.0.11"},"engines":{"node":">=12"},"_id":"@trickfilm400/rollup-plugin-off-main-thread@2.4.0","gitHead":"a3651c42c1ad34472ba5f5ac2672170cfde6d0d0","bugs":{"url":"https://github.com/trickfilm400/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/trickfilm400/rollup-plugin-off-main-thread#readme","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-R1gBMHYHp8M6eEoUpIUIzwPn8MySHjkLjxdCljPiH3ono4SfyVQEjk6JFm+kubxrGAyjdlBYzRKP85/H2PWNBA==","shasum":"3cdf5ab0d7c258368a88ea15946fddc804653e31","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.4.0.tgz","fileCount":86,"unpackedSize":91054,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5eslWB8BbQtyLqWJ3Wd9VQwu6F831Bcfj8Nik1wu9FAiA5GIO/+0PW/nqPAyc6MTE6wwfM2E9a6ZHf2vq79QFloQ=="}],"size":16636},"_npmUser":{"name":"anonymous","email":"trickfilm400@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"trickfilm400@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-off-main-thread_2.4.0_1716413495818_0.3390649260538916"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-22T21:31:35.979Z","publish_time":1716413495979,"_source_registry_name":"default"},"2.4.3":{"name":"@trickfilm400/rollup-plugin-off-main-thread","version":"2.4.3","description":"Use Rollup with workers and ES6 modules today.","main":"index.js","scripts":{"fmt":"prettier --write 'tests/**/*.js' *.js *.md *.json","test":"node ./run_tests.js"},"author":{"name":"Surma","email":"surma@google.com"},"contributors":[{"name":"trickfilm400","email":"trickfilm400@gmail.com"}],"license":"Apache-2.0","devDependencies":{"chai":"4.2.0","chalk":"^2.4.2","karma":"4.2.0","karma-chai":"0.1.0","karma-chrome-launcher":"3.0.0","karma-firefox-launcher":"1.1.0","karma-mocha":"1.3.0","karma-safari-launcher":"1.0.0","karma-safaritechpreview-launcher":"2.0.2","mocha":"6.1.4","prettier":"1.18.2","rollup":"2.2.0"},"repository":{"type":"git","url":"git+https://github.com/Trickfilm400/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^3.1.10","json5":"^2.2.3","magic-string":"^0.30.10","string.prototype.matchall":"^4.0.11"},"engines":{"node":">=12"},"_id":"@trickfilm400/rollup-plugin-off-main-thread@2.4.3","gitHead":"b7b96d59075b2808ac0e149ec29a14e6df533a75","bugs":{"url":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread#readme","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-GLrFiNxHlRIPSlP8yxHjplsGHqASih0Yt1Ouw7zIiXKhIIWnga/WklUEhe/dVX5pVHVBhLNSlZaz2rkePxDpRQ==","shasum":"e5303161123bea709eae038848f2b155570c7514","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.4.3.tgz","fileCount":86,"unpackedSize":91054,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@trickfilm400%2frollup-plugin-off-main-thread@2.4.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0tJiOoGN6/A2ocEp6EU45uKxmhTRtKt9kDp+NnsJPHAIgHh5yOTpLz1vo0USkiJdSmpNNl4zYgHglPF1XBfY299o="}],"size":16637},"_npmUser":{"name":"anonymous","email":"trickfilm400@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"trickfilm400@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-off-main-thread_2.4.3_1718860782066_0.09376479013566441"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-06-20T05:19:42.214Z","publish_time":1718860782214,"_source_registry_name":"default"},"2.5.0":{"name":"@trickfilm400/rollup-plugin-off-main-thread","version":"2.5.0","description":"Use Rollup with workers and ES6 modules today.","main":"index.js","scripts":{"fmt":"prettier --write 'tests/**/*.js' *.js *.md *.json","test":"node ./run_tests.js"},"author":{"name":"Surma","email":"surma@google.com"},"contributors":[{"name":"trickfilm400","email":"trickfilm400@gmail.com"}],"license":"Apache-2.0","devDependencies":{"chai":"4.5.0","chalk":"^2.4.2","karma":"4.4.1","karma-chai":"0.1.0","karma-chrome-launcher":"3.2.0","karma-firefox-launcher":"1.3.0","karma-mocha":"1.3.0","karma-safari-launcher":"1.0.0","karma-safaritechpreview-launcher":"2.0.2","mocha":"6.2.3","prettier":"1.19.1","rollup":"2.79.2"},"repository":{"type":"git","url":"git+https://github.com/Trickfilm400/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^3.1.10","json5":"^2.2.3","magic-string":"^0.30.21","string.prototype.matchall":"^4.0.12"},"engines":{"node":">=12"},"_id":"@trickfilm400/rollup-plugin-off-main-thread@2.5.0","gitHead":"522a7f0d05c7b3de13c6b81fab863c046ea0c83e","bugs":{"url":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread#readme","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-bOZy9peQ06rOc4/B135sqRFgwLQCH77f7x3hMqQo5Cec+1sQYrCoTuz+ZMYGkhtjLLqIa0Cvsi0oZPWewOUafQ==","shasum":"6396c5e5c30380725da0625119886677ab130475","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.5.0.tgz","fileCount":86,"unpackedSize":91055,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@trickfilm400%2frollup-plugin-off-main-thread@2.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCbUIlXc9CNT5Dc7tkX72d57/zMNiHbaEzjEBfQdccT1QIhAI0AZ1PlL8H5/jpwRa2c5uMn8T+stydzTKelAmM6M5T4"}],"size":16643},"_npmUser":{"name":"anonymous","email":"trickfilm400@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"trickfilm400@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rollup-plugin-off-main-thread_2.5.0_1764690566315_0.05822020624691615"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-02T15:49:26.548Z","publish_time":1764690566548,"_source_registry_name":"default"},"3.0.0-pre1":{"name":"@trickfilm400/rollup-plugin-off-main-thread","version":"3.0.0-pre1","description":"Use Rollup with workers and ES6 modules today.","main":"index.js","scripts":{"fmt":"prettier --write 'tests/**/*.js' *.js *.md *.json","test":"node ./run_tests.js"},"author":{"name":"Surma","email":"surma@google.com"},"contributors":[{"name":"trickfilm400","email":"trickfilm400@gmail.com"}],"license":"Apache-2.0","devDependencies":{"chai":"4.5.0","chalk":"^4.1.2","karma":"^6.4.4","karma-chai":"0.1.0","karma-chrome-launcher":"3.2.0","karma-firefox-launcher":"^2.1.3","karma-mocha":"^2.0.1","karma-safari-launcher":"1.0.0","karma-safaritechpreview-launcher":"2.0.2","mocha":"^11.7.5","prettier":"^3.7.3","rollup":"^4.53.3"},"repository":{"type":"git","url":"git+https://github.com/Trickfilm400/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^3.1.10","json5":"^2.2.3","magic-string":"^0.30.21","string.prototype.matchall":"^4.0.12"},"engines":{"node":">=12"},"_id":"@trickfilm400/rollup-plugin-off-main-thread@3.0.0-pre1","gitHead":"96840a1acad0756e000abc70bcd2234f65dc7fb1","bugs":{"url":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread#readme","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-/67zpWDBLV+oYAEL682s1ktXL0HgqX76f6gaVGkGnVZlBbm1zd0v4Bz8MFF2GGhoX9rvfq3KSQHubFHwa6w6/Q==","shasum":"1ffeab04d8972063de4ad1a948b3e550e11dc745","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-3.0.0-pre1.tgz","fileCount":159,"unpackedSize":248132,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICtxlFaW+Grl5L+46I7ySIujYooDbnTwjjw0xNSUskm1AiEA8S7tnuq6pOtNW90PH8WUJOtRps0ywkq5tQLVbF5H9D4="}],"size":23319},"_npmUser":{"name":"anonymous","email":"trickfilm400@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"trickfilm400@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rollup-plugin-off-main-thread_3.0.0-pre1_1764692474329_0.07940217472763944"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-02T16:21:14.510Z","publish_time":1764692474510,"_source_registry_name":"default"},"3.1.0-pre2":{"name":"@trickfilm400/rollup-plugin-off-main-thread","version":"3.1.0-pre2","description":"Use Rollup with workers and ES6 modules today.","main":"index.js","scripts":{"fmt":"prettier --write 'tests/**/*.js' *.js *.md *.json","test":"node ./run_tests.js"},"author":{"name":"Surma","email":"surma@google.com"},"contributors":[{"name":"trickfilm400","email":"trickfilm400@gmail.com"}],"license":"Apache-2.0","devDependencies":{"chai":"4.5.0","chalk":"^4.1.2","karma":"^6.4.4","karma-chai":"0.1.0","karma-chrome-launcher":"3.2.0","karma-firefox-launcher":"^2.1.3","karma-mocha":"^2.0.1","karma-safari-launcher":"1.0.0","karma-safaritechpreview-launcher":"2.0.2","mocha":"^11.7.5","prettier":"^3.7.3","rollup":"^4.53.3"},"repository":{"type":"git","url":"git+https://github.com/Trickfilm400/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^3.1.10","json5":"^2.2.3","magic-string":"^0.30.21","string.prototype.matchall":"^4.0.12"},"engines":{"node":">=12"},"_id":"@trickfilm400/rollup-plugin-off-main-thread@3.1.0-pre2","readmeFilename":"README.md","gitHead":"96840a1acad0756e000abc70bcd2234f65dc7fb1","bugs":{"url":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/Trickfilm400/rollup-plugin-off-main-thread#readme","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-Tqo6R23TxoWrh2lN7WRHN7VpVhMWZ/yemX+eWwakmiTYIo02vjJf0YS0cHxcXa4K4XdLA7X4DL0vyyxhqkOTLA==","shasum":"048592af359fad95ce8817a3990aada5ffcce2b7","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-3.1.0-pre2.tgz","fileCount":6,"unpackedSize":30610,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG0UP7RtOT1ff51sEc39WspO2y0N5/Dq403oH4LAs+GJAiEA1MnDAZ+oVNp0UlmmXxwxT/NkFMnDkjY4YijlQyc+uh0="}],"size":10196},"_npmUser":{"name":"anonymous","email":"trickfilm400@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"trickfilm400@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rollup-plugin-off-main-thread_3.1.0-pre2_1764799959548_0.8330697788008448"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-03T22:12:39.770Z","publish_time":1764799959770,"_source_registry_name":"default"}},"dist-tags":{"beta":"3.1.0-pre2","latest":"3.0.0-pre1"},"name":"@trickfilm400/rollup-plugin-off-main-thread","time":{"created":"2024-05-24T17:01:37.967Z","modified":"2025-12-03T22:12:47.412Z","2.2.3-fix":"2024-05-22T21:10:00.355Z","2.3.0":"2024-05-22T21:15:43.447Z","2.4.0":"2024-05-22T21:31:35.979Z","2.4.3":"2024-06-20T05:19:42.214Z","2.5.0":"2025-12-02T15:49:26.548Z","3.0.0-pre1":"2025-12-02T16:21:14.510Z","3.1.0-pre2":"2025-12-03T22:12:39.770Z"},"readme":"# rollup-plugin-off-main-thread\r\n\r\nUse Rollup with workers and ES6 modules _today_.\r\n\r\n```\r\n$ npm install --save @trickfilm400/rollup-plugin-off-main-thread\r\n```\r\n\r\nWorkers are JavaScript’s version of threads. [Workers are important to use][when workers] as the main thread is already overloaded, especially on slower or older devices.\r\n\r\nThis plugin takes care of shimming module support in workers and allows you to use `new Worker()`.\r\n\r\nOMT is the result of merging loadz0r and workz0r.\r\n\r\n## Usage\r\n\r\nI set up [a gist] to show a full setup with OMT.\r\n\r\n### Config\r\n\r\n```js\r\n// rollup.config.js\r\nimport OMT from \"@trickfilm400/rollup-plugin-off-main-thread\";\r\n\r\nexport default {\r\n  input: [\"src/main.js\"],\r\n  output: {\r\n    dir: \"dist\",\r\n    // You _must_ use either “amd” or “esm” as your format.\r\n    // But note that only very few browsers have native support for\r\n    // modules in workers.\r\n    format: \"amd\"\r\n  },\r\n  plugins: [OMT()]\r\n};\r\n```\r\n\r\n### Auto bundling\r\n\r\nIn your project's code use a module-relative path via `new URL` to include a Worker:\r\n\r\n```js\r\nconst worker = new Worker(new URL(\"worker.js\", import.meta.url), {\r\n  type: \"module\"\r\n});\r\n```\r\n\r\nThis will just work.\r\n\r\nIf required, the plugin also supports plain literal paths:\r\n\r\n```js\r\nconst worker = new Worker(\"./worker.js\", { type: \"module\" });\r\n```\r\n\r\nHowever, those are less portable: in Rollup they would result in module-relative\r\npath, but if used directly in the browser, they'll be relative to the document\r\nURL instead.\r\n\r\nHence, they're deprecated and `new URL` pattern is encouraged instead for portability.\r\n\r\n### Importing workers as URLs\r\n\r\nIf your worker constructor doesn't match `workerRegexp` (see options below), you might find it easier to import the worker as a URL. In your project's code:\r\n\r\n```js\r\nimport workerURL from \"omt:./worker.js\";\r\nimport paintWorkletURL from \"omt:./paint-worklet.js\";\r\n\r\nconst worker = new Worker(workerURL, { name: \"main-worker\" });\r\nCSS.paintWorklet.addModule(paintWorkletURL);\r\n```\r\n\r\n`./worker.js` and `./paint-worklet.js` will be added to the output as chunks.\r\n\r\n## Options\r\n\r\n```js\r\n{\r\n  // ...\r\n  plugins: [OMT(options)];\r\n}\r\n```\r\n\r\n- `loader`: A string containing the EJS template for the amd loader. If `undefined`, OMT will use `loader.ejs`.\r\n- `useEval`: Use `fetch()` + `eval()` to load dependencies instead of `<script>` tags and `importScripts()`. _This is not CSP compliant, but is required if you want to use dynamic imports in ServiceWorker_.\r\n- `workerRegexp`: A RegExp to find `new Workers()` calls. The second capture group _must_ capture the provided file name without the quotes.\r\n- `amdFunctionName`: Function name to use instead of AMD’s `define`.\r\n- `prependLoader`: A function that determines whether the loader code should be prepended to a certain chunk. Should return true if the load is suppsoed to be prepended.\r\n- `urlLoaderScheme`: Scheme to use when importing workers as URLs. If `undefined`, OMT will use `\"omt\"`.\r\n\r\n[when workers]: https://dassur.ma/things/when-workers\r\n[a gist]: https://gist.github.com/surma/a02db7b53eb3e7870bf539b906ff6ff6\r\n\r\n---\r\n\r\nLicense Apache-2.0","users":{}}