{"id":21434389,"url":"https://github.com/serguun42/webpack-service-worker-plugin","last_synced_at":"2026-05-18T08:32:53.402Z","repository":{"id":60857478,"uuid":"537081875","full_name":"serguun42/webpack-service-worker-plugin","owner":"serguun42","description":"A plugin used to minify, link and build Service Worker for Webpack.","archived":false,"fork":false,"pushed_at":"2022-10-14T12:18:17.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T21:48:03.294Z","etag":null,"topics":["service-worker","serviceworker","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@serguun42/webpack-service-worker-plugin","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serguun42.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":"2022-09-15T15:07:35.000Z","updated_at":"2023-07-25T08:44:03.000Z","dependencies_parsed_at":"2022-10-05T23:17:06.224Z","dependency_job_id":null,"html_url":"https://github.com/serguun42/webpack-service-worker-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/serguun42/webpack-service-worker-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serguun42%2Fwebpack-service-worker-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serguun42%2Fwebpack-service-worker-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serguun42%2Fwebpack-service-worker-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serguun42%2Fwebpack-service-worker-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serguun42","download_url":"https://codeload.github.com/serguun42/webpack-service-worker-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serguun42%2Fwebpack-service-worker-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33170848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["service-worker","serviceworker","webpack"],"created_at":"2024-11-22T23:35:34.191Z","updated_at":"2026-05-18T08:32:53.386Z","avatar_url":"https://github.com/serguun42.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack Service Worker Plugin\n\nPlugin used to minify, link and build Service Worker for Webpack. Unlike `workbox-webpack-plugin`, this plugin's primary task is to compile existing Service Worker with all plugins – not to generate new SW or inject chunks of boilerplate code.\n\n## Usage\n\nSuitable for _webpack v4_ and _webpack v5_. From `package.json`:\n\n```json\n\"peerDependencies\": {\n  \"webpack\": \"^4.4.0 || ^5.9.0\"\n}\n```\n\n1. Install – `npm i @serguun42/webpack-service-worker-plugin`.\n2. Add to webpack config's plugins section (_usually `webpack.config.js`_):\n\n```javascript\nconst WebpackSWPlugin = require(\"@serguun42/webpack-service-worker-plugin\");\n\nmodule.exports = {\n\tentry: \"…\",\n\toutput: {\n\t\tpath: \"…\",,\n\t\tfilename: \"…\",\n\t},\n\t…\n\tplugins: [\n\t\t…,\n\t\tnew WebpackSWPlugin({\n\t\t\t/** Relative to project's root */\n\t\t\tsource: \"src/service-worker.js\",\n\t\t\t/** Relative to build/dist folder */\n\t\t\toutput: \"js/sw.js\"\n\t\t}),\n\t\t…\n\t]\n}\n```\n\n### Config/params\n\n| name     | description/type                                                                       | default                 |\n| -------- | -------------------------------------------------------------------------------------- | ----------------------- |\n| `source` | Path of Service Worker entry file relative to project's root                           | `src/service-worker.js` |\n| `output` | Path of minified, linked and built Service Worker file inside relative to build folder | `service-worker.js`     |\n\nIn general can be used to side-compile any non-SW code, just change these two parameters.\n\n---\n\n### [BSL-1.0 License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserguun42%2Fwebpack-service-worker-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserguun42%2Fwebpack-service-worker-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserguun42%2Fwebpack-service-worker-plugin/lists"}