{"_id":"threads-plugin","_rev":"10-af6876eb0565b39a9e0a36a8abeccde5","name":"threads-plugin","dist-tags":{"latest":"1.4.0","next":"1.3.0-beta.2"},"versions":{"1.0.0":{"name":"threads-plugin","version":"1.0.0","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/.*?/dist/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"63b8ec1121f5bcc9e6fc5285d276180310c314c5","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.0.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-AKKk9e3cyZPyrfk73ludhTredmBvkd1MYvolHswzqFhTbaaFQB/6NKC9k/b9BOToAaDV8kY4hJD+gtgsAPX/OQ==","shasum":"1a1662fea3e2b5f984a2f60ebfc38a1ef65e2462","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.0.0.tgz","fileCount":12,"unpackedSize":339918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/ne9CRA9TVsSAnZWagAA3AMP/iLkGAfb1JWov19cIDRs\nch/xOOEHM4kbxjxg9EA42kIH8S1BB8DGMeJjzB6yYyL7hs8EjiH7yDoDfX4p\n107cwgn4iMNB25h0FQoOuKPRtHkfJ6hwlP/d1qjMNNDOOrPWhVyXMfWX2/ko\nMkIIz7ynwX+0HW37jMHEOVR4bjo+CA7vzUGiCsqpIMmZPI6uc77MrVqTjQsX\n/Ed5P5OVL8QQRl50cYsytqdWRq/nRU3qnhKfC1KNK9RNOQIjmW1hF5ZNWdbA\nXHDrzzXpidP5fuLVFu7LMXJGtxJYbmpnf2fWNyvNyTnj7LUBzGLFaX1fVyHp\nPccc5Nkfb5lgBafN+YSNcp8VYEtQA08UUW+3Qw4eaZU4pTXvzumZ0tXseDbW\nY9L84QfTpNrqDWqwxLo/Y4q08V7q0PrIKMopTqOeoub0noWAWiACWM823MN7\nROxecitMG7am8nl/8ZqV3AlpjTEwJssCO52pQqw7yRZq7TeglcaPSwEWDoWD\nnj+Twd/Cc8Jz7s4UwcFMZY4JunUrqCuXfR8qFBFbSbHx8H3NWJWYXCBBGgrl\nkMuFXPNUILHzKxAfNcSVNGl1oNFRYhQoLMp2bnF4pxk1XuV8wxsiVyTtyarr\nHxszcyPV2z57udinmx4uAHJbXVDo0m0PKkTBQTqLDZHEKOZWYDmqwsD0Mk4s\nlHsI\r\n=UcX8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBAzv3yR/y/f2pjcGT0U/1fgV5Bv6PRRet3hkkI+M8QeAiB1pzbUwNpeyfkAam5XunNzF+f4o4Sd/DnnqQ8g1rtrJw=="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.0.0_1560180668447_0.02550766323599274"},"_hasShrinkwrap":false},"1.1.0":{"name":"threads-plugin","version":"1.1.0","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"119cd4e34ecbe47c78a1209797e29909bfabdf64","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.1.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-AvbPmJWYDtEzx00fb34cT2n0prfJ+tJyE0riuR3NEZbgwtZC12umVTQNG+VipdWXnSi6ZPIK2Jd48dI8uLpoEw==","shasum":"719180610184107f3714395974d13cf852bcc8f2","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.1.0.tgz","fileCount":12,"unpackedSize":341375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcUMqCRA9TVsSAnZWagAAM4AP/1w2cAdXAktLrJ1qFE1b\nt95faijWJDNNrcY06PF8EDfpXvaGf+zA2yuwdCecI3S6r8vG1Dz+DDYVbPJT\nQKjupxLuNxpLwAzPBW2HUmq2qfH+DNnDTceaxMVVSBKFLvSGQX+83fsa+bkS\n5W1qvS8she2go6LKm6vc+T5YnvRrDTetWkRZnzaZLlwjeqBYM30SGyQShN4e\nouDd3a5aZ19CYEFYxOn9MTk/sY8D2dUPB2Wm4zViaNuchqMXShb/aYwTzlSm\nnKRgsSaOi1ZH8xtSJZEiR7CCOj9zkODmEbnckiNKzoFevr/Zpro+5e2Bhux5\n1HkjZP0PODCeF/vxps+jFvEd3h5fKkbgiFqvLQBa8aj7dwkpV9znl0xEQUan\nnutUu/gyg3msNp/6G3TuwKITcXSDNJuE72QjDALahr8rYULO6qUgE8kP710C\nw/IvYagzBoaJgrxm3t6KgcyIwjnhWAzGG2hS9DvWyHkxub/uikrZs3nU2Sb0\nnwb0OoL4WOmTm0RdTcBoF9ZGb54tvKjw0QpVHPY0VEUkDC/Yef7WnVmdIo4K\n2Csdequ33qZULSaex3J9Hj5RKLYASRVbyb2nuFRQlVolHM9dK3oWCfRlI/5B\ny8JNPFoZxccVkn5+8e0BOUgjqiVbAycDvwi6vg2iKkTLhbEZ2ZOQ5TZRzMtZ\nTLSV\r\n=WG63\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3HzRYg3fRQ/djI5PRRPQfGjinSWhrh4H3807Q7g9wUAiAv4cKZfC8wOdwn07GpzIGDx3Rh7GzELS69tyEI06NrIw=="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.1.0_1567703849888_0.848976606418758"},"_hasShrinkwrap":false},"1.2.0":{"name":"threads-plugin","version":"1.2.0","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"c433b8c7f51a5fc56f3c59ae603ad30a9a6a326d","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.2.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-sWJbMh7T+59hVr0MgwseNgVLuK53dNVvu4n+1C3/X3zEIkI/rwkwpaNML20fyKvwjTjLwWblwQpx6Gu+VJjBog==","shasum":"eab508733ef31806c3ba28b8c058fbfb1261c565","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.2.0.tgz","fileCount":12,"unpackedSize":341876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddLnbCRA9TVsSAnZWagAAP2AQAJ4q0VH3azu/gSwCVpZm\nN4YlasjSugb3fjJpY+rhWxYx/7SOnLdih/eBttNlvcvDhMYxfxAVC51lX8Nz\n19LIQpHfZdjbVEq5LEqT0Lb8wNza1nHXI7OMhsrT1I4sJDQH62b4OsHU0UcG\nqbsHxD3Cy6MxU2JQCJ2eEez5HPwsbaC/N6DNP1ZOf+4vAcXBRY1uWOfL3bA7\n6tZRwLJFAR1YOE2roVbINJaFxtvDNLTbMu0lCUwX+xXrH4F912lCzsv4uODP\n7KN9rUsZoX2QbkwsE7ulYg4PW89P7BfS0oZC/QWlmr1EcRNFIsFtjGQ6lc5h\neMb3BMYDdgTf29z+nGZf7OAp5gh4nRMYzbfC80ZdWN4nf4xm8sMwzaeP0avV\nM3pzxQs2u9ZgTP/iP+2dN4WPiVUCx9gsVYhE2m73RK64cbrP8t17u2orCBrh\ndiPH10ElIfbpw3cL/2vWWmeXDiY5fvQUHFqc2fXuruHdPo6Ohp1TenbD6T8W\n+NDCL9ThroQ/Z45Ze2gbqsQkdmmT7G5nGHCgmADcxABXbLbdt3sfApT/f1mx\nRyhlU84Pt6dRiGV59XOGnqTPRP1PhaPMcL4M2Wi8CY33bxQx3yrdNXCpEbyf\nD++aON433rG5a7L93Ev6dt7u9klGXCYVVTkKQQSSsh0ODsHpdiq61WxJVpoW\nVT+w\r\n=W3Pf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAp8sHN+K5WDC6xI4WgaFvsimDuod3PbfluaVdU7TuMfAiEAguWmxiQ2krKE4TkCNb2aw5ZUsDW0bxZDTewaNVOSqd8="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.2.0_1567930843194_0.5753404840234533"},"_hasShrinkwrap":false},"1.3.0-beta":{"name":"threads-plugin","version":"1.3.0-beta","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","memory-fs":"^0.4.1","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"readme":"<p align=\"center\">\n  <img src=\"https://i.imgur.com/MlrAQjl.jpg\" width=\"1000\" alt=\"worker-plugin\">\n</p>\n<p></p>\n<h1 align=\"center\">👩‍🏭 threads-plugin</h1>\n<p align=\"center\">Automatically bundle & compile <a href=\"https://github.com/andywer/threads.js\">threads.js</a> workers within webpack.</p>\n\nThis plugin is a fork of [worker-plugin](https://github.com/GoogleChromeLabs/worker-plugin): This is an adapted version of the original `worker-plugin` that supports `Worker` constructors imported from [`threads`](https://github.com/andywer/threads.js).\n\n### Features\n\nAutomatically compiles modules loaded in Web Workers:\n\n```js\nconst worker = new Worker('./foo.js', { type: 'module' });\n                          ^^^^^^^^^^\n                          gets bundled using webpack\n```\n\nThe best part? That worker constructor works just fine without bundling turned on too.\n\nWorkers created from Blob & data URLs or without the `{ type:'module' }` option are left unchanged.\n\n## Installation\n\n```sh\nnpm install -D threads-plugin\n```\n\nThen drop it into your **webpack.config.js:**\n\n```diff\n+ const ThreadsPlugin = require('threads-plugin');\n\nmodule.exports = {\n  <...>\n  plugins: [\n+    new ThreadsPlugin()\n  ]\n  <...>\n}\n```\n\n## Usage\n\n**worker.js**: _(our worker module)_\n\n```js\n// This is a module worker, so we can use imports (in the browser too!)\nimport { expose } from 'threads';\nimport { calculatePi } from './some-other-module';\n\nexpose(function piTimesTwo(precision) {\n  return calculatePi(precision) * 2\n})\n```\n\n**main.js**: _(our demo, on the main thread)_\n\n```js\nimport { spawn, Worker } from 'threads';\n\nmain().catch(console.error)\n\nasync function main() {\n  const piTimesTwo = await spawn(new Worker('./worker.js'))\n  console.log(`pi x 2 = ${await piTimesTwo(42)}`)\n}\n```\n\n**Please make sure to use the `Worker` imported from `threads`, not the global `Worker`! The plugin will only consider those imported `Worker` instantiations.**\n\n## Babel / TypeScript\n\nWhen transpiling your source code using Babel or TypeScript, make sure to that ES modules are transpiled by webpack, not by Babel or TypeScript. Otherwise the threads plugin won't be able to identify the imports.\n\n### Babel\n\nIn your Babel configuration when using `@babel/preset-env`:\n\n```\n\"presets\": [\n  [\"env\", {\n    \"modules\": false\n  }]\n]\n```\n\nIf you are using `create-react-app` or `babel-preset-react-app` (`\"presets\": [\"react-app\"]`), you are already good to go - no need to adapt the configuration.\n\nSo the idea is to make sure that ES modules are still intact and not transpiled down to anything else by Babel. Otherwise the plugin won't work. This kind of configuration is best practice anyhow.\n\n### TypeScript\n\nWhen using TypeScript, make sure this setting is part of your TypeScript configuration, either in the `ts-loader` options or in your `tsconfig.json` file:\n\n```\n\"compilerOptions\": {\n  \"module\": \"esnext\"\n}\n```\n\n## Options\n\nIn most cases, no options are necessary to use WorkerPlugin.\n\n### `globalObject`\n\nThreadsPlugin will warn you if your Webpack configuration has `output.globalObject` set to `window`, since doing so breaks Hot Module Replacement in web workers.\n\nIf you're not using HMR and want to disable this warning, pass `globalObject:false`:\n\n```js\nnew ThreadsPlugin({\n  // disable warnings about \"window\" breaking HMR:\n  globalObject: false\n})\n```\n\nTo configure the value of `output.globalObject` for ThreadsPlugin's internal Webpack Compiler, set `globalObject` to any String:\n\n```js\nnew ThreadsPlugin({\n  // use \"self\" as the global object when receiving hot updates.\n  globalObject: 'self' // <-- this is the default value\n})\n```\n\n### `plugins`\n\nBy default, `ThreadsPlugin` doesn't run any of your configured Webpack plugins when bundling worker code - this avoids running things like `html-webpack-plugin` twice. For cases where it's necessary to apply a plugin to Worker code, use the `plugins` option.\n\nHere you can specify the names of plugins to \"copy\" from your existing Webpack configuration, or provide specific plugins to apply only to worker code:\n\n```js\nmodule.exports = {\n  <...>\n  plugins: [\n    // an example of a plugin already being used:\n    new SomeExistingPlugin({ <...> }),\n\n    new ThreadsPlugin({\n      plugins: [\n        // A string here will copy the named plugin from your configuration:\n        'SomeExistingPlugin',\n\n        // Or you can specify a plugin directly, only applied to Worker code:\n        new SomePluginToApplyOnlyToWorkers({ <...> })\n      ]\n    })\n  ]\n  <...>\n}\n```\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md","gitHead":"b1fa7eaf49b50c0c56e97bba7a0388c584225fb6","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.3.0-beta","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-TAwRLxv8gALBO/q1o6p5YoqruLxcY3G/Bozvv+LCv25Fq1TZYinrcX39D7pl92jYBvhQeXgJgXKK6YKP+wkYDg==","shasum":"f291c2a96520017e285ca9b17ebe714e8566ec92","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.3.0-beta.tgz","fileCount":12,"unpackedSize":342032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFOUNCRA9TVsSAnZWagAAxYAP/2hgeVlP1EziRr2ufdJd\nSFCf7dTTy02m/FAA+7KHC1Duof8udgE8/7/TFlFmKTxkimjJyXE/DQQR81VU\n5PDWHu0oqXa0hG/SR0Om7y2CWJPtZtWR+gi+TeI7/cYyK4xb3RaCFeTkqgC+\nnd9DH+CD/qqyKwpAepeBxxMxsqUHK9le80cMZnMr6Vr89GcRfxz0DudcZ0C7\nDxIobhFfVFsS6hzrKo4d1mG7f10qlZm/5BEVygmYGojPyszptA4Ge9rHMZKI\n9Ql3K+A9TlkCL8wrk4J+lbAy7ZwBrD6wE0NgS/fXQ+gkk6HZSG3FsokfqeMi\nWeeMX7RNYzRxh9hWFjX+V++/2qbPv59jG8Dp9IG7LWfoA4hE9kgYTvG8pILp\nSiuYapFP4jU+m452H2MTnxUEZKbeqVg1sbFxoa8IWjyDMkHCgqTZpyf70vx5\nxIP+E8LqkYXa2ZcNR7effwW2XT5M47UY5x0NJCWV14NtdgwPCOqMx5o8L3To\n1pDPWqqS58QpfKUAADZsVHQdbl9vneNQAGRswX8/v1tZ14za8vl0vN5VU7lF\nYeQ9CaydZnlOZyJm36/r8o+pdVq37ucFwWFX/0XB5AaQv69Bwgtaf4f6adnA\nPRhbYMemSoJtBwaF+CdL2YZPSi2n6ctMDz/7cL57skqd5FVCrxLdXMYHVthW\nhreI\r\n=p8Ml\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBktpV7+mBOL9laSU81knz0hrmB74vk1+mxwt1XC/3qxAiBOa8uWgd3Y/JyHnHAkuLY5S0phmL/KS9ljd5jPZeipiw=="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.3.0-beta_1578427660609_0.482710711705717"},"_hasShrinkwrap":false},"1.3.0-beta.2":{"name":"threads-plugin","version":"1.3.0-beta.2","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","memory-fs":"^0.4.1","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"readme":"<p align=\"center\">\n  <img src=\"https://i.imgur.com/MlrAQjl.jpg\" width=\"1000\" alt=\"worker-plugin\">\n</p>\n<p></p>\n<h1 align=\"center\">👩‍🏭 threads-plugin</h1>\n<p align=\"center\">Automatically bundle & compile <a href=\"https://github.com/andywer/threads.js\">threads.js</a> workers within webpack.</p>\n\nThis plugin is a fork of [worker-plugin](https://github.com/GoogleChromeLabs/worker-plugin): This is an adapted version of the original `worker-plugin` that supports `Worker` constructors imported from [`threads`](https://github.com/andywer/threads.js).\n\n### Features\n\nAutomatically compiles modules loaded in Web Workers:\n\n```js\nconst worker = new Worker('./foo.js', { type: 'module' });\n                          ^^^^^^^^^^\n                          gets bundled using webpack\n```\n\nThe best part? That worker constructor works just fine without bundling turned on too.\n\nWorkers created from Blob & data URLs or without the `{ type:'module' }` option are left unchanged.\n\n## Installation\n\n```sh\nnpm install -D threads-plugin\n```\n\nThen drop it into your **webpack.config.js:**\n\n```diff\n+ const ThreadsPlugin = require('threads-plugin');\n\nmodule.exports = {\n  <...>\n  plugins: [\n+    new ThreadsPlugin()\n  ]\n  <...>\n}\n```\n\n## Usage\n\n**worker.js**: _(our worker module)_\n\n```js\n// This is a module worker, so we can use imports (in the browser too!)\nimport { expose } from 'threads';\nimport { calculatePi } from './some-other-module';\n\nexpose(function piTimesTwo(precision) {\n  return calculatePi(precision) * 2\n})\n```\n\n**main.js**: _(our demo, on the main thread)_\n\n```js\nimport { spawn, Worker } from 'threads';\n\nmain().catch(console.error)\n\nasync function main() {\n  const piTimesTwo = await spawn(new Worker('./worker.js'))\n  console.log(`pi x 2 = ${await piTimesTwo(42)}`)\n}\n```\n\n**Please make sure to use the `Worker` imported from `threads`, not the global `Worker`! The plugin will only consider those imported `Worker` instantiations.**\n\n## Babel / TypeScript\n\nWhen transpiling your source code using Babel or TypeScript, make sure to that ES modules are transpiled by webpack, not by Babel or TypeScript. Otherwise the threads plugin won't be able to identify the imports.\n\n### Babel\n\nIn your Babel configuration when using `@babel/preset-env`:\n\n```\n\"presets\": [\n  [\"env\", {\n    \"modules\": false\n  }]\n]\n```\n\nIf you are using `create-react-app` or `babel-preset-react-app` (`\"presets\": [\"react-app\"]`), you are already good to go - no need to adapt the configuration.\n\nSo the idea is to make sure that ES modules are still intact and not transpiled down to anything else by Babel. Otherwise the plugin won't work. This kind of configuration is best practice anyhow.\n\n### TypeScript\n\nWhen using TypeScript, make sure this setting is part of your TypeScript configuration, either in the `ts-loader` options or in your `tsconfig.json` file:\n\n```\n\"compilerOptions\": {\n  \"module\": \"esnext\"\n}\n```\n\n## Options\n\nIn most cases, no options are necessary to use WorkerPlugin.\n\n### `globalObject`\n\nThreadsPlugin will warn you if your Webpack configuration has `output.globalObject` set to `window`, since doing so breaks Hot Module Replacement in web workers.\n\nIf you're not using HMR and want to disable this warning, pass `globalObject:false`:\n\n```js\nnew ThreadsPlugin({\n  // disable warnings about \"window\" breaking HMR:\n  globalObject: false\n})\n```\n\nTo configure the value of `output.globalObject` for ThreadsPlugin's internal Webpack Compiler, set `globalObject` to any String:\n\n```js\nnew ThreadsPlugin({\n  // use \"self\" as the global object when receiving hot updates.\n  globalObject: 'self' // <-- this is the default value\n})\n```\n\n### `plugins`\n\nBy default, `ThreadsPlugin` doesn't run any of your configured Webpack plugins when bundling worker code - this avoids running things like `html-webpack-plugin` twice. For cases where it's necessary to apply a plugin to Worker code, use the `plugins` option.\n\nHere you can specify the names of plugins to \"copy\" from your existing Webpack configuration, or provide specific plugins to apply only to worker code:\n\n```js\nmodule.exports = {\n  <...>\n  plugins: [\n    // an example of a plugin already being used:\n    new SomeExistingPlugin({ <...> }),\n\n    new ThreadsPlugin({\n      plugins: [\n        // A string here will copy the named plugin from your configuration:\n        'SomeExistingPlugin',\n\n        // Or you can specify a plugin directly, only applied to Worker code:\n        new SomePluginToApplyOnlyToWorkers({ <...> })\n      ]\n    })\n  ]\n  <...>\n}\n```\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md","gitHead":"f0948963d09518599a0569dd4595c81ccc4455e0","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.3.0-beta.2","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Cu2tusFHrqI5gC2nosXoJKxnpdigF9cq7LZ3zOnn2NXSnZ144/QT9SEvXOOZFgdwnw86WdBi+cQaiKTY/b/Hcg==","shasum":"76026c021e2cd41f464a55dfcd2f82d7df065ded","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.3.0-beta.2.tgz","fileCount":12,"unpackedSize":344788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFZInCRA9TVsSAnZWagAA0NgP/1Kx2zK3cEXq3xHklqs6\nIxV4hPKFR+U8VwOL4euOkboatCGM74YycB3KhsqkzOO/Z7n9EGrJmlxQlT+I\nKHCZL1g2+XpdBmgfLZbPtVmOHOTnJY5I+lhzk5uVi9fKcoKk+LaQ10INOU7M\nYzoIffZNvyrOGgOuuIdg5ZYrEobyUiD9u8iSFVGpD35I0Fb3JkTGlIrLIaRn\nqEWtoimAB8DEu/2htHbu9EaTegZ+PCGn2RA+ADPAxwHQGcD0HImw7CCmfcBz\nTAwe58SAqVvd0rEm2KJnKtEofWvQGWNR3RHT8td9HD8yD/ru/e9uDgNl04ot\nuuWI9FSMEaUQnFuMcbe0i9acHyhP9CJHiWXzdVj0AUYBhYBsZtBt06euFZQY\nx6Vg0cNykXQ5PUTM1//e4TgdbZmDDOvj3bXLZMBDVyqqKWFrFSEU5o6LSGa1\n4Tbj7l4FVdYpwQ9z0n3fDqQVg1V5HT7S9yCiIZmdIERSGrtnBGrqIL9A3eCa\n5ba1JrSbanVgAri/Col9hITyp9GRkwVaN6BbpbbxHXpbsKnkwhC0unKff0/B\nTMfooxGv15dvym5KQtlCvPdtGFlYqzGVHklT1FYRqYC8C3eJ/awYK/f68FtH\nTAST7Uh53YnR1zyW/+pzr7XTPFOdu+F2EYSTXlrI/tnuLB2KFBtq6A9GrwzQ\ndneu\r\n=OwDD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHy2Jsr2uqGa0phr9fz1y6GQOZNY7X+M4rw/Y8sGqyhMCIEnamEavfmXteeFjsfwE4OOjpdz/9Oztqvnj7c0MMwiB"}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.3.0-beta.2_1578471974848_0.3286252602161077"},"_hasShrinkwrap":false},"1.3.0":{"name":"threads-plugin","version":"1.3.0","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","memory-fs":"^0.4.1","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"5e0c01251680e24e63c8eb511cb4c3e220a41924","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.3.0","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-94pZAdctmYtPMvozYj9Vc4wDf4NtJnFgREuRUAhWp18mw+fhJABZwcVphPuvCVTZ5mPind1ndMabMktmc4pVjQ==","shasum":"4fd2665854fe062b48ff0f42ef4210e485da0d16","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.3.0.tgz","fileCount":12,"unpackedSize":342008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeLu0vCRA9TVsSAnZWagAAT50P/1/iora3oj3FcxKTUnnb\nS4DCAKzcHMyA1053nGMQ+XIwgyRt5L3sbs/aWss/xn1x5nhMexkvFMhYgOTM\n1F08SwsCaAqqoiGu9NOlfddcZAdvG/JOj+CLb/M7EO87tsY9OfiMlxyIWOrr\nGwYi2rU0FQtDospwu8hYtdOzt8xWHeyLz06fP4QT47CnCCwNwCcsKy1QpMRu\nDAsARZeJ/ToP8zg9ivDm5hej2wleyVloOuPE98iWVo+HmTPZjaDH50Y+zpl/\nYZenam0zuv78sFgJB/KMrBrcjQQbIuDAH7JDTNuOUd275TTQizwApSqbfWwl\nZDVTGd1/zB2x+hWtAljhTYhYqSwnMnTEEawFusd+2CYvG2BmgCPxridPdvIr\nnTB1n0nNf1ZNYRPSy7P++P5q83DgYatM7P/pnqZap5n8q+50EMei/07dsdEy\n0E/o0Kr4LZaT0bTvotS+ElJvMWpl5VNk7wHoJflbZ+TqyfNL32iHl47QF1s7\npTMgry1NSYJy3eJMEBvsiKjzkpGI6EEA5wQxgbUpBblQkNL9QuMbddOQKp47\nqT7+YOETJVknndx1ikVjZ+s2QbfugJxZgviARosIR9XMx2ZtI8x/AgkAbob+\n/dzFiuE/zHIDI1pCRB2MLvaHxpUCoTFvLz5dKLdFTfDq+gaWnZXKWRQQnlVl\nwHJd\r\n=tI4k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZbhgk3oHXdy9iuhiCGqh2qlyPmkasNG+xyS5OGFH05AiAexSPZucKrsDfKaacIq0rhc3c+tT719sJ8hhwddbAvlg=="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.3.0_1580133678681_0.993587335255874"},"_hasShrinkwrap":false},"1.3.1":{"name":"threads-plugin","version":"1.3.1","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","memory-fs":"^0.4.1","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"30789fd3cbfedcd3cb2aa7dc34413dc848379f02","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.3.1","_nodeVersion":"10.16.3","_npmVersion":"6.14.2","dist":{"integrity":"sha512-HjMzKv6LggcIzwcDDrsVYCEtfL4Rv+hzsX2CjqIx1Agq6nAuYNX2xUfOJIzvnyXjM2R9tyyuoHgY2K6j4ZCrOA==","shasum":"1af657eed0d76c4aaa7c682df786f4ba0c8c7b4e","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.3.1.tgz","fileCount":12,"unpackedSize":343409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebLB0CRA9TVsSAnZWagAAnaMP/j/M5sD2Z8f7UdvYqNKo\nb15oZ3PQT7wAuATl1dwDJ+rc5IA3TLk5ZbpPgX0ZZZJKAdw979ytlY44MBGG\nQwxkESudMy+rOMyqmbOvssmHK41M6wYLAsvNmBVKEnOdh4f+v2c/3CfHPAsD\nqN6x7WKOZpmUzE6+d/QLS53UG/8fFBCHCsLEtCYxsbRI7QTrz13BXzlqsOyp\nsbkJBBNA39fH1B+P7bEVeFwcG0pvnkAKZKERcWxlpOTk/XQuIRxbxtScGrMS\nyzhgkw05Met4UMiUNMfjJ0ASOgsk8UYfx5l9zy8YX+KeIJnCynwQeR3qUF/l\n3Sq95D2TmbOLwJdv5K79S70rHrNE2g3orqz8pbjnot3rllbpGnaoxMAPtMlB\n+BbZhB+WoH+zYD1dI6JS8Grn1HNiZQYvayX0sYNVE8SYqC7jTbDLkh99Vxn9\n8ox2yxndAQxyKeWlzqp26becy3wpJrPax+pyfsx+PDXEoqTLr1toJHpXLk3A\nLHYLx21l+zWD8ODozelIUzYA8It2X89XIjRp5udUVtDa/N+BFzvkoaZpGGQb\nBdQX9bYXYh25ud3E5yb0PiWHZP3ZEK9ZCNR0Ih74+maTyLl/DQrKkg+U14CV\ndwcirauUjlFNrcGwJ6nDEfdw+eiqnkJM0zZnwla+cdCcdzMSKavVcZkMGejO\nLPkM\r\n=o60U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDrEhOt4B8/fGFC1J8TXN0OQ8+FdWLMf9sLvbDWu8dObAiEAqsvgWDNwE7m6RPXvWt0fMwTR7kIuo+6shO8n4IvrmUs="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.3.1_1584181363641_0.05648674786210739"},"_hasShrinkwrap":false},"1.3.2":{"name":"threads-plugin","version":"1.3.2","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","memory-fs":"^0.4.1","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"de0dc95013623ce1b77ea9db135b7055dc4ce07c","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.3.2","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-62UGIGmDA9Vqx0vHhedmtcBIw7N/ByNvLUnU512i9l/Jzfx6XWR7XmbygWX82t7cbXDVr8PY4AHw6x0M3l3YSg==","shasum":"744778621180842265a50c19b1f1843e68392701","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.3.2.tgz","fileCount":12,"unpackedSize":343507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7dbTCRA9TVsSAnZWagAAEGIP+wbjuSUKi1YBrrhzLyOH\nzxLYpZgxJ8QcsVMHDJjSFJxgRf966Q/6hIAo5zZnG9tqKNncVKVIGIjQ1MRC\nFO8a75ALXzIjY+Y7CADyJCvh+Fd1CFHn7Av/FtMqvNI7H5bV3l/3wwE8QrCm\nG1IccrE/fizL67rlB/XbyDXP5K4TJdQgoXF103o7EPo8agUHPl35tDzx56pe\n1YZbOrBUQtQ8LrLNcMb6LhJEaswBpjY6GVur5YvPXBhUT4kR0UuDaOnume59\nDApaVGlZlTXC9PUN4gViwFzSAkYR3Oaum03/XflSXzI8djuWzrhoDqKCilcf\ne+3A47LxfOQV4u4Ol8dN9qncFFXEO3Z9mopZ2Mq2lzWFezMnoTBbsGdlHSlV\nRt5DCBaGG3ImXVkhDYzlSTk65PsTCdr5XpNr9QaX8B2WYSQHv3bKTt2/Pedd\n/HSntZATeqidfvLhGfTIdQKA+8n1Q1YOWaWEWJR7zPFPGY0EypdfANMdS1kQ\nBNXdmbue+cHSyIdmi6o0ev00X3juk6RtONEpVHjeSOAzvaOk2CLb5C6uWSuU\n0n/3IXeV1m6CX7fvuIlafHqUbXVyyGKw6fDObK616M28eChTF54WYGdm/TBF\nlQVDOcqC0NMcHf3DiCKTZFG5ZHaiz6ei1EuagBtd1JnqvXx9VMLVbdPzEc8S\nACA9\r\n=rLYm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHDS4ATbLwkpyaNiuwkcir6AXKeCgz/oov5+yctH8SeAiEAm98CFyo5Om/kB7hV8tG4rtcFn1YB0mTLrlJuEnciv3Q="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"github@andywer.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.3.2_1592645331248_0.10313582579352087"},"_hasShrinkwrap":false},"1.3.3":{"name":"threads-plugin","version":"1.3.3","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","memory-fs":"^0.4.1","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"8a00f7e9503e643803508c53207658db0c4c7c91","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.3.3","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-HXuqQ/Eg5ZpeJg315RlCoGYji+pX34dYSU/gwAEuwS6KUwTEqy/88fFx10XXedlUUvCnERJ0zORuM/690BewhQ==","shasum":"2dbd133aea25477e8fc61f57a919c2717a59c82a","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.3.3.tgz","fileCount":12,"unpackedSize":343651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPjCUCRA9TVsSAnZWagAAOeUP/1rhSW9tyGD3rUrW3Nag\nCRJL2mFnNU26GxvQCmM0dkF9DotaWK2fzIG39RHttW7fTzACu1hWKEmvrMb8\nwIPsCAqN2/YkUFTmsQaDyI/0fsMLTHi0/V24WUgs4k7Zx8yrc/oUPaujbEaW\nk2zt7F+LfFpRA99twR7RqXx1zcpuwLYUcjn72bMTzE+ayITShT/B4MNNGMqD\nAiIjfQzxCff7LF4yOLCoAps44hlBpg9BLabQXRzkzq9SB79fQrbmPI7bSA9R\nF//8hy4DfmLSZ/uCcd2PMxIxM+0WHNbhkGUKWJv9YU4u62rKoMvXwEQp3xKR\nPFOGMBZob+BGJl9kEHDXcCfsk7EMArDGgL7kyOJo3mP97pNkr9JZt8DQ6/ht\nW3g3L4Bnge+Or/zk9GS+eK+L2OEbcmQebOrjBtubo9anw9GcOHgn+GKTY7RN\nOPJsPIa9oyY71Gx3L7Pygr8ACQVo3H4nVRRu5DtcGhAlg+omgUmOSw+MQr3C\nY5WrrTpL/di93qwVHDGI5GmoEcri0XwJ7UgZ57LHBu4dNnyp1TrUrGRKWBQ6\nijx/koTfWURN7gHaID9ftp1SHw+WRIvVK061NjvDD1p2CTRVFJtQGW1JlajX\n2JZXUZnj9tF//pG0BNVWcQQPZMUDEtJ+9147sSWIF2LzG6MbdZTQQ6cCPAXp\nk+iY\r\n=jqp3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICv1Y2Zf/it/kGRTC/RWLigdY2GFVoKEKEFpWcXMsDwnAiABP1guM4MopEQwU9XQswTNWcKXNvDolQby2hvEnfp/Nw=="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"github@andywer.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.3.3_1597911187856_0.10128881427166814"},"_hasShrinkwrap":false},"1.4.0":{"name":"threads-plugin","version":"1.4.0","description":"Webpack plugin to bundle threads.js workers automagically.","main":"dist/threads-plugin.js","repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"scripts":{"build":"microbundle --inline none --external @babel/types --format cjs --no-compress src/*.js","prepack":"npm run build","dev":"jest --verbose --watchAll","test":"npm run build && jest --verbose","release":"npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"eslintConfig":{"extends":"eslint-config-standard","env":{"browser":true,"jest":true},"rules":{"indent":["error",2],"semi":["error","always"]}},"jest":{"watchPathIgnorePatterns":["<rootDir>/node_modules/","<rootDir>/test/fixtures/"]},"babel":{"plugins":["transform-es2015-modules-commonjs"]},"keywords":["webpack","plugin","worker","web worker","thread"],"author":{"name":"The Chromium Authors"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"license":"Apache-2.0","devDependencies":{"@file-services/memory":"^1.0.3","@file-services/node":"^1.0.3","@file-services/overlay":"^1.0.3","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","clean-webpack-plugin":"^1.0.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","memory-fs":"^0.4.1","microbundle":"^0.11.0","puppeteer":"^1.11.0","serve-handler":"^5.0.7","terser-webpack-plugin":"^1.1.0","webpack":"^4.26.1"},"dependencies":{"loader-utils":"^1.1.0"},"peerDependencies":{"@babel/types":">= 7","webpack":">= 4"},"gitHead":"1a6cbc8c463bac5379f701a9d89c7f8c5a2bf6fe","bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"homepage":"https://github.com/andywer/threads-plugin#readme","_id":"threads-plugin@1.4.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-lQENPueZLsD+6Cvxvj/QaQyUskwnFZO+2ZGDMnPIvtytSeywWvYzete8paZ9L+5IR4v8jnSYNZPlIQrEhSK1EA==","shasum":"017b998a69e25c046b2566db699f704f41885a79","tarball":"https://registry.npmjs.org/threads-plugin/-/threads-plugin-1.4.0.tgz","fileCount":12,"unpackedSize":345355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7MU5CRA9TVsSAnZWagAAzVEP/2DmC0D0zTgR8tnm13Lz\n8Wg/JgOrXK2v0BzvSrUOeOl2PyZOvh/BLAZbcrbjCY5SgbcF7NDU70BTEWu/\nhstYt43BxNDHb2pmnatzvcFBoms0i5+TypDFAU4sz+DFAvofFVwQqsjVRyhK\nZu3Hn9QgBQRcMfbFp9NhKwi+0eyjpnMy5aubpuV+H65cbxeTBygry7nDvyvh\nX4qpKWELWKcaoeiQLEdtab7XKvCbT9eoUUZw+XixTU5OxOOD3ngMW8MUNppo\nJEVmX02wYvQXKrJ020AGTte0xNt2AeAyXFdR5Czf4OBMO/ISB7iEVBjB+tK2\ngTQnY20mNGBQ2yt3NXemMeGho5DrgAYT3PAqItk9bD/a9RSQHym7LjuFhUwY\niYTITGgxq+O/p62OaxQB/6xMqSDka3U0Wh+c22tsI3NOgA2KPrbJ9Be5Oblr\na2rHcB9L++0OemUfJhAo9tHjxIJLz6BEL23sQ0wdrne8uvl8sKoJ/BzxcXa0\nBHjNdVZwH4rjn0IlF/uqhgBYkyHg99zVOPfBinDpmYFZIdT5ZUAs27/nvnJY\ndXkb9HuFuPEx2yvWat9XZKLhou4rcBjkf/P2hvdDivempOc8LpJGTT8fpYMh\njyOc0rdq0l7+NE/EpOHSrAKa6ee5vMvW7kPoapi0JKfhkSR4NPjPcx8BMBI5\nyKvC\r\n=lBRk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoCmgbVpZGlzIUJsczBssmhFO8JCdfgdTTb4EiqysxmAIhAIci9+j3/kXpsLB8oFCT+oazqnh3igaCd+xVnDTY+xkH"}]},"_npmUser":{"name":"andywer","email":"github@andywer.com"},"directories":{},"maintainers":[{"name":"andywer","email":"github@andywer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/threads-plugin_1.4.0_1609352504654_0.8934003734453524"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-10T15:31:08.446Z","1.0.0":"2019-06-10T15:31:08.545Z","modified":"2022-05-21T19:03:22.221Z","1.1.0":"2019-09-05T17:17:30.129Z","1.2.0":"2019-09-08T08:20:43.333Z","1.3.0-beta":"2020-01-07T20:07:40.845Z","1.3.0-beta.2":"2020-01-08T08:26:15.058Z","1.3.0":"2020-01-27T14:01:18.854Z","1.3.1":"2020-03-14T10:22:43.784Z","1.3.2":"2020-06-20T09:28:51.409Z","1.3.3":"2020-08-20T08:13:08.015Z","1.4.0":"2020-12-30T18:21:44.780Z"},"maintainers":[{"name":"andywer","email":"github@andywer.com"}],"description":"Webpack plugin to bundle threads.js workers automagically.","homepage":"https://github.com/andywer/threads-plugin#readme","keywords":["webpack","plugin","worker","web worker","thread"],"repository":{"type":"git","url":"git+https://github.com/andywer/threads-plugin.git"},"contributors":[{"name":"Jason Miller","email":"developit@google.com"},{"name":"Andy Wermke","url":"https://github.com/andywer"}],"author":{"name":"The Chromium Authors"},"bugs":{"url":"https://github.com/andywer/threads-plugin/issues"},"license":"Apache-2.0","readme":"<p align=\"center\">\n  <img src=\"https://i.imgur.com/MlrAQjl.jpg\" width=\"1000\" alt=\"worker-plugin\">\n</p>\n<p></p>\n<h1 align=\"center\">👩‍🏭 threads-plugin</h1>\n<p align=\"center\">Automatically bundle & compile <a href=\"https://github.com/andywer/threads.js\">threads.js</a> workers within webpack.</p>\n\nThis plugin is a fork of [worker-plugin](https://github.com/GoogleChromeLabs/worker-plugin): This is an adapted version of the original `worker-plugin` that supports `Worker` constructors imported from [`threads`](https://github.com/andywer/threads.js).\n\n### Features\n\nAutomatically compiles modules loaded in Web Workers:\n\n```js\nconst worker = new Worker('./foo.js', { type: 'module' });\n                          ^^^^^^^^^^\n                          gets bundled using webpack\n```\n\nThe best part? That worker constructor works just fine without bundling turned on too.\n\nWorkers created from Blob & data URLs or without the `{ type:'module' }` option are left unchanged.\n\n## Installation\n\n```sh\nnpm install -D threads-plugin\n```\n\nThen drop it into your **webpack.config.js:**\n\n```diff\n+ const ThreadsPlugin = require('threads-plugin');\n\nmodule.exports = {\n  <...>\n  plugins: [\n+    new ThreadsPlugin()\n  ]\n  <...>\n}\n```\n\n## Usage\n\n**worker.js**: _(our worker module)_\n\n```js\n// This is a module worker, so we can use imports (in the browser too!)\nimport { expose } from 'threads';\nimport { calculatePi } from './some-other-module';\n\nexpose(function piTimesTwo(precision) {\n  return calculatePi(precision) * 2\n})\n```\n\n**main.js**: _(our demo, on the main thread)_\n\n```js\nimport { spawn, Worker } from 'threads';\n\nmain().catch(console.error)\n\nasync function main() {\n  const piTimesTwo = await spawn(new Worker('./worker.js'))\n  console.log(`pi x 2 = ${await piTimesTwo(42)}`)\n}\n```\n\n**Please make sure to use the `Worker` imported from `threads`, not the global `Worker`! The plugin will only consider those imported `Worker` instantiations.**\n\n## Babel / TypeScript\n\nWhen transpiling your source code using Babel or TypeScript, make sure to that ES modules are transpiled by webpack, not by Babel or TypeScript. Otherwise the threads plugin won't be able to identify the imports.\n\n### Babel\n\nIn your Babel configuration when using `@babel/preset-env`:\n\n```\n\"presets\": [\n  [\"env\", {\n    \"modules\": false\n  }]\n]\n```\n\nIf you are using `create-react-app` or `babel-preset-react-app` (`\"presets\": [\"react-app\"]`), you are already good to go - no need to adapt the configuration.\n\nSo the idea is to make sure that ES modules are still intact and not transpiled down to anything else by Babel. Otherwise the plugin won't work. This kind of configuration is best practice anyhow.\n\n### TypeScript\n\nWhen using TypeScript, make sure this setting is part of your TypeScript configuration, either in the `ts-loader` options or in your `tsconfig.json` file:\n\n```\n\"compilerOptions\": {\n  \"module\": \"esnext\"\n}\n```\n\n## Electron\n\nTo use standard Node packages in Electron web workers, make sure Node integration in workers is [turned on](https://www.electronjs.org/docs/tutorial/multithreading)\nand the plugin option [target](#target) is set to `electron-node-worker`.\n\n## Options\n\nIn most cases, no options are necessary to use WorkerPlugin.\n\n### `globalObject`\n\nThreadsPlugin will warn you if your Webpack configuration has `output.globalObject` set to `window`, since doing so breaks Hot Module Replacement in web workers.\n\nIf you're not using HMR and want to disable this warning, pass `globalObject:false`:\n\n```js\nnew ThreadsPlugin({\n  // disable warnings about \"window\" breaking HMR:\n  globalObject: false\n})\n```\n\nTo configure the value of `output.globalObject` for ThreadsPlugin's internal Webpack Compiler, set `globalObject` to any String:\n\n```js\nnew ThreadsPlugin({\n  // use \"self\" as the global object when receiving hot updates.\n  globalObject: 'self' // <-- this is the default value\n})\n```\n\n### `plugins`\n\nBy default, `ThreadsPlugin` doesn't run any of your configured Webpack plugins when bundling worker code - this avoids running things like `html-webpack-plugin` twice. For cases where it's necessary to apply a plugin to Worker code, use the `plugins` option.\n\nHere you can specify the names of plugins to \"copy\" from your existing Webpack configuration, or provide specific plugins to apply only to worker code:\n\n```js\nmodule.exports = {\n  <...>\n  plugins: [\n    // an example of a plugin already being used:\n    new SomeExistingPlugin({ <...> }),\n\n    new ThreadsPlugin({\n      plugins: [\n        // A string here will copy the named plugin from your configuration:\n        'SomeExistingPlugin',\n\n        // Or you can specify a plugin directly, only applied to Worker code:\n        new SomePluginToApplyOnlyToWorkers({ <...> })\n      ]\n    })\n  ]\n  <...>\n}\n```\n\n### `target` \n\nDue to the way webpack works, it may be necessary to change the target environment of the workers. Using this option you can override webpack's [`target` option](https://webpack.js.org/configuration/target/#root) just for the worker bundle. Defaults to the global webpack `target`.\n\nFrequently used values:\n\n- `electron-node-worker`: use this if you are using Electron and compiling web workers that have node integration enabled. See [Electron Multithreading](https://www.electronjs.org/docs/tutorial/multithreading).\n\nExample with electron node workers:\n```js\nnew ThreadsPlugin({\n  target: 'electron-node-worker'\n})\n```\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}