{"id":15631229,"url":"https://github.com/danielroe/nuxt-workers","last_synced_at":"2025-05-15T11:00:22.367Z","repository":{"id":245190949,"uuid":"817524865","full_name":"danielroe/nuxt-workers","owner":"danielroe","description":"SSR-safe, zero-config Web Workers integration for Nuxt.","archived":false,"fork":false,"pushed_at":"2025-05-13T14:49:03.000Z","size":1265,"stargazers_count":404,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-13T15:54:29.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielroe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["danielroe"]}},"created_at":"2024-06-19T22:58:51.000Z","updated_at":"2025-05-12T15:16:45.000Z","dependencies_parsed_at":"2024-11-07T05:18:56.430Z","dependency_job_id":"44119fa5-8089-4304-944f-f826ae396243","html_url":"https://github.com/danielroe/nuxt-workers","commit_stats":{"total_commits":63,"total_committers":4,"mean_commits":15.75,"dds":0.4126984126984127,"last_synced_commit":"109521aaa29590d8656ee100cfabaa34bdbf7bb5"},"previous_names":["danielroe/nuxt-workers"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-workers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-workers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-workers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-workers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielroe","download_url":"https://codeload.github.com/danielroe/nuxt-workers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328384,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T10:39:37.689Z","updated_at":"2025-05-15T11:00:22.345Z","avatar_url":"https://github.com/danielroe.png","language":"TypeScript","funding_links":["https://github.com/sponsors/danielroe"],"categories":["TypeScript","Starter Kits"],"sub_categories":[],"readme":"# Nuxt Workers\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions][github-actions-src]][github-actions-href]\n[![Codecov][codecov-src]][codecov-href]\n\nSSR-safe, zero-config Web Workers integration for [Nuxt](https://nuxt.com).\n\n\u003e Web Workers enable running JavaScript code in the background to perform complex tasks without blocking the main thread, ensuring smoother and more responsive web applications.\n\u003e\n\u003e [Read more about Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers).\n\n- [✨ \u0026nbsp;Changelog](https://github.com/danielroe/nuxt-workers/blob/main/CHANGELOG.md)\n- [▶️ \u0026nbsp;Online playground](https://stackblitz.com/github/danielroe/nuxt-workers/tree/main/playground)\n\n## Features\n\n- 🔥 SSR-safe usage of Web Workers\n- ✨ auto-imported, zero-configuration\n- 💪 fully typed\n\n## Quick Setup\n\nInstall and add `nuxt-workers` to your `nuxt.config`.\n\n```bash\nnpx nuxi@latest module add nuxt-workers\n```\n\nThat's it! You can add web workers in your Nuxt app ✨\n\n## Usage\n\nCreate your web worker in the `~/workers/` directory. It should export any utilities you want to be usable elsewhere:\n\n```ts\n// workers/hi.ts\nexport function hi() {\n  return 'Hello from web worker!'\n}\n```\n\nThen, call it in the rest of your Vue app.\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nconst message = await hi()\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    {{ message }}\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n\u003e [!TIP]\n\u003e Even if your function is synchronous, it will always become async when it is called within a worker because communication with a worker will always be asynchronous.\n\n## Roadmap\n\n- [x] 📖 basic documentation\n- [x] 🧪 client-side test\n- [ ] 🧱 `useNuxtWorker` composable for more fine-grained control\n- [ ] ⚗️ automatic deduplicating on client-side\n- [ ] 📦 webpack support\n- [ ] ⚠️ type-level + dev warning if non serialisable args are passed\n- [ ] 🤝 automatic shared workers with `.shared.ts` suffix\n- [ ] 💤 worker auto-shutdown\n\n## 💻 Development\n\n- Clone this repository\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Stub module with `pnpm dev:prepare`\n- Run `pnpm dev` to start [playground](./playground) in development mode\n\n## License\n\nMade with ❤️\n\nPublished under the [MIT License](./LICENCE).\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/nuxt-workers?style=flat-square\n[npm-version-href]: https://npmjs.com/package/nuxt-workers\n[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-workers?style=flat-square\n[npm-downloads-href]: https://npm.chart.dev/nuxt-workers\n[github-actions-src]: https://img.shields.io/github/actions/workflow/status/danielroe/nuxt-workers/ci.yml?branch=main\n[github-actions-href]: https://github.com/danielroe/nuxt-workers/actions?query=workflow%3Aci\n[codecov-src]: https://img.shields.io/codecov/c/gh/danielroe/nuxt-workers/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/danielroe/nuxt-workers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielroe%2Fnuxt-workers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielroe%2Fnuxt-workers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielroe%2Fnuxt-workers/lists"}