{"id":18071768,"url":"https://github.com/makkarpov/nuxt-service-worker","last_synced_at":"2025-10-08T16:38:55.445Z","repository":{"id":57710395,"uuid":"511678438","full_name":"makkarpov/nuxt-service-worker","owner":"makkarpov","description":"Module to bundle your custom service worker code in Nuxt","archived":false,"fork":false,"pushed_at":"2023-04-25T11:18:53.000Z","size":181,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T22:36:34.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/makkarpov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2022-07-07T21:25:21.000Z","updated_at":"2024-02-01T23:06:06.000Z","dependencies_parsed_at":"2024-09-23T14:00:43.541Z","dependency_job_id":null,"html_url":"https://github.com/makkarpov/nuxt-service-worker","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"ec2f7a4f545deed4f9039d78278e4e0daccd7377"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makkarpov%2Fnuxt-service-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makkarpov%2Fnuxt-service-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makkarpov%2Fnuxt-service-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makkarpov%2Fnuxt-service-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makkarpov","download_url":"https://codeload.github.com/makkarpov/nuxt-service-worker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248223825,"owners_count":21068069,"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-31T09:16:31.317Z","updated_at":"2025-10-08T16:38:50.393Z","avatar_url":"https://github.com/makkarpov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nuxt-service-worker\n\nSimple module that configures build system to bundle and expose service worker script at website root path.\n\nTargets at and supports only Vite/Rollup tooling.\n\n## Usage:\n\nInstall this package:\n\n```\nnpm install --save-dev @makkarpov/nuxt-service-worker\n```\n\nConfigure worker script entry point in your Nuxt configuration, e.g.:\n\n```ts\nexport default defineNuxtConfig({\n  modules: [\n      '@makkarpov/nuxt-service-worker'\n  ],\n  serviceWorker: {\n      entryPoint: 'lib/worker.ts'\n  }\n});\n```\n\nUse special synthetic import to get information about worker script location:\n\n```ts\nimport worker from '#service-worker';\nawait navigator.serviceWorker.register(worker.url, { type: 'module' });\n```\n\nWhen running in dev mode, service worker script will be available as `/sw.js` file. During production build worker script will be chunked and packaged just as everything else, resulting in `/sw-XXXXXXXX.mjs` file lying in your `.output/public` dir.\n\n## Development\n\n- Run `npm run dev:prepare` to generate type stubs.\n- Use `npm run dev` to start playground in development mode. \n- Use `npm run dev:build` and `npm run dev:preview` to test production build.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakkarpov%2Fnuxt-service-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakkarpov%2Fnuxt-service-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakkarpov%2Fnuxt-service-worker/lists"}