{"name":"rollup-plugin-off-main-thread","version":"1.1.1-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"},"license":"Apache-2.0","devDependencies":{"chai":"4.2.0","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":"1.16.2"},"repository":{"type":"git","url":"git+https://github.com/surma/rollup-plugin-off-main-thread.git"},"dependencies":{"ejs":"^2.6.1","magic-string":"^0.25.0"},"readme":"# rollup-plugin-off-main-thread\n\nUse Rollup with workers and ES6 modules _today_.\n\n```\n$ npm install --save rollup-plugin-off-main-thread\n```\n\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.\n\nThis plugin takes care of shimming module support in workers and allows you to use `new Worker()`.\n\nOMT is the result of merging loadz0r and workz0r.\n\n## Usage\n\n```js\n// rollup.config.js\nimport OMT from \"rollup-plugin-off-main-thread\";\n\nexport default {\n  input: [\"src/main.js\"],\n  output: {\n    dir: \"dist\",\n    // You _must_ use “amd” as your format\n    format: \"amd\"\n  },\n  plugins: [OMT()]\n};\n```\n\nI set up [a gist] to show a full setup with OMT.\n\n## Options\n\n```js\n{\n  // ...\n  plugins: [OMT(options)];\n}\n```\n\n- `loader`: A string containing the EJS template for the amd loader. If `undefined`, OMT will use `loader.ejs`.\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_.\n- `workerRegexp`: A RegExp to find `new Workers()` calls. The second capture group _must_ capture the provided file name without the quotes.\n- `amdFunctionName`: Function name to use instead of AMD’s `define`.\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.\n\n[when workers]: https://dassur.ma/things/when-workers\n[a gist]: https://gist.github.com/surma/a02db7b53eb3e7870bf539b906ff6ff6\n\n---\n\nLicense Apache-2.0\n","readmeFilename":"README.md","gitHead":"7be5a461dd0b91bb90ad7722eb7225cde7f5666d","bugs":{"url":"https://github.com/surma/rollup-plugin-off-main-thread/issues"},"homepage":"https://github.com/surma/rollup-plugin-off-main-thread#readme","_id":"rollup-plugin-off-main-thread@1.1.1-0","_nodeVersion":"12.2.0","_npmVersion":"6.10.1","dist":{"integrity":"sha512-SSgcQus7y/ZoMXj2I41A/zRish5sKcL03XUAygrRywhJcJo331k5VNiZrrtnS4mk+V38SfwgIFP2u5g8tzdjDQ==","shasum":"7fec475591b72e3351f15a7cc37adef43e570a80","tarball":"http://registry-npm.ywwl.com/rollup-plugin-off-main-thread/download/rollup-plugin-off-main-thread-1.1.1-0.tgz","fileCount":52,"unpackedSize":55728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNIiMCRA9TVsSAnZWagAAe1gQAJd0QgqQnf93PK8UPO5K\n8ofzSrd9lbwX2GGyMvakQaVwB5BNPmQpbifsImRkR290ZLyVqX4A2QxL/pDr\nZU3lWceTK3Y3pMsIAt0L5R/4PvR9QQ4KQ6BqEkZffLNHvCWsj2pEap+dkqIZ\nTjEwS2j0olmoUVeJq2E0+vCWSdhPSaG1OoWyNiVgPVOLg4kRliwdsJgHp1qD\nOSK1MLVmpHISWR7OEa+NwD5YYNctp8NTmzGuQt/oHxBDsff/WuohFGJUGLMH\niegBKS+CS1JCHeJqbL4rG+Jr7Y3tVCoZ8N9of0O2I9TucT8T6xCxZG5Xni9R\nwqfc6rmldRwcPFEivRPQnt32nNVihXqHSq7OxR4INOV1lkMAnNTJbJlcH3aa\nPZtcTRmxj0wcrZwblq6wCQVqHG3uJ2Nab7KIXKE6yaKeGOXSZrcpAruFou7c\n4Ikeg5PraCze9+woTdUoz6p8uUUPKTK2rV+RW3vXjy1mHHEnHYCFJZQeabxF\nXFa5gINm3ZnzSYquRqwUGs81AUKlfflm/ALgTnpueHC88LqzyQgTqJTUHxdx\nUpc+PS+aVqOfOvUEhNVA9KwV9RDZ3M3i+gBXgUoYV6jfLy7izHX7K1J+5qhg\noK0OJkB946DaRbiM0lKNo+iYlBhsn5cCuaUu+W0exD6YMniYOeCWKXkUv6Fa\nuALH\r\n=fADS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiXh/g/JFqFQE89G5LVW9EYj60GPp2NX17E3p3djH6fQIgXXoFiO29QXwYtICvLyiTkAnDx9Fb/X/jdcaCiHiwpZ8="}],"size":11778,"noattachment":false,"key":"/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-1.1.1-0.tgz"},"maintainers":[{"name":"surma","email":"surma@surma.link"}],"_npmUser":{"name":"surma","email":"surma@surma.link"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-off-main-thread_1.1.1-0_1563723915638_0.7726411300135474"},"_hasShrinkwrap":false,"publish_time":1563723915775,"_cnpm_publish_time":1563723915775,"dist-tags":{"latest":"1.1.0","next":"1.1.1-0"}}