{"id":13782487,"url":"https://github.com/cyyyu/parcel-plugin-sw-precache","last_synced_at":"2025-05-11T15:32:33.221Z","repository":{"id":28986464,"uuid":"119859800","full_name":"cyyyu/parcel-plugin-sw-precache","owner":"cyyyu","description":"A Parcel plugin for generating a service worker that precaches resources.","archived":false,"fork":false,"pushed_at":"2022-12-01T20:40:30.000Z","size":102,"stargazers_count":73,"open_issues_count":8,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T09:14:02.510Z","etag":null,"topics":["parcel","parcel-plugin","pwa","service-worker"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/cyyyu.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}},"created_at":"2018-02-01T16:09:49.000Z","updated_at":"2024-01-29T17:21:56.000Z","dependencies_parsed_at":"2023-01-14T13:53:45.774Z","dependency_job_id":null,"html_url":"https://github.com/cyyyu/parcel-plugin-sw-precache","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyyyu%2Fparcel-plugin-sw-precache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyyyu%2Fparcel-plugin-sw-precache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyyyu%2Fparcel-plugin-sw-precache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyyyu%2Fparcel-plugin-sw-precache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyyyu","download_url":"https://codeload.github.com/cyyyu/parcel-plugin-sw-precache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253588747,"owners_count":21932317,"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":["parcel","parcel-plugin","pwa","service-worker"],"created_at":"2024-08-03T18:01:37.939Z","updated_at":"2025-05-11T15:32:32.913Z","avatar_url":"https://github.com/cyyyu.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Other"],"readme":"# parcel-plugin-sw-precache\n\n[![npm version](https://badge.fury.io/js/parcel-plugin-sw-precache.svg)](https://badge.fury.io/js/parcel-plugin-sw-precache)\n\nA Parcel plugin for generating a service worker that precaches resources.\n\n### Usage(Install)\n\n`npm install --save-dev parcel-plugin-sw-precache`\n\n### Configurations\n\nYou DON'T have to configure anything to get it work. It just works as you expected after you installed.\n\nEvery time you build resources with Parcel, it will generate a `service-worker.js` file for you.\n\nInternally it is using [sw-precache](https://github.com/GoogleChromeLabs/sw-precache)\n\nIf you want to configure `sw-precache`, you can supply the configs by adding them in your `package.json` within the key `sw-precache`. See all available options at: https://github.com/GoogleChromeLabs/sw-precache#options-parameter\n\nAdditionally this plugin have the option \"**additionalCodeFile**\" if you want to add anything to your service-worker.js (for example a new event-handler). Add a filename relative to the entrypoint specified to Parcel.\n\nFor example:\n\n```\n{\n  \"name\": \"my-project\",\n  \"version\": \"0.1.0\",\n  ...\n\n  // my sw-precache configs\n  \"sw-precache\": {\n    \"maximumFileSizeToCacheInBytes\": 10485760,\n    \"additionalCodeFile\": \"addSome.js\"\n  }\n}\n```\n**Note:** only files with the following extensions will be added to the precache :\n`js, html, css, png, jpg, gif, svg, eot, ttf, woff, woff2, ogg, wav, mp3, wasm, webp, pdf`\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyyyu%2Fparcel-plugin-sw-precache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyyyu%2Fparcel-plugin-sw-precache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyyyu%2Fparcel-plugin-sw-precache/lists"}