{"id":13677513,"url":"https://github.com/Clarkkkk/workbox-rspack-plugin","last_synced_at":"2025-04-29T11:31:07.567Z","repository":{"id":226856340,"uuid":"762301134","full_name":"Clarkkkk/workbox-rspack-plugin","owner":"Clarkkkk","description":"An Rspack plugin to use workbox.","archived":false,"fork":false,"pushed_at":"2024-09-01T09:27:40.000Z","size":725,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-04T00:51:39.731Z","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/Clarkkkk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-02-23T13:50:43.000Z","updated_at":"2024-10-08T20:52:53.000Z","dependencies_parsed_at":"2024-08-02T13:15:48.470Z","dependency_job_id":"e4fdc16b-5b91-435b-8200-4b835d2ea7cf","html_url":"https://github.com/Clarkkkk/workbox-rspack-plugin","commit_stats":null,"previous_names":["clarkkkk/workbox-rspack-plugin"],"tags_count":6,"template":false,"template_full_name":"Clarkkkk/vite-vanilla-ts-lib-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clarkkkk%2Fworkbox-rspack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clarkkkk%2Fworkbox-rspack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clarkkkk%2Fworkbox-rspack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clarkkkk%2Fworkbox-rspack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clarkkkk","download_url":"https://codeload.github.com/Clarkkkk/workbox-rspack-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224163604,"owners_count":17266537,"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-08-02T13:00:43.268Z","updated_at":"2024-11-11T19:31:59.284Z","avatar_url":"https://github.com/Clarkkkk.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Rspack Plugins"],"readme":"# workbox-rspack-plugin\n\n[![NPM version][npm-image]][npm-url] [![NPM Downloads][npm-download]][npm-url] [![License][license]][license-url] [![Minified Size][minified-size]][npm-url] [![Build Status][build-status]][github-actions]\n\nAn rspack plugin to use [workbox](https://developer.chrome.com/docs/workbox) in rspack. Both `GenerateSW` and `InjectManifest` are supported. And all the options are the same as the official [`workbox-webpack-plugin`](https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin). Currently, it passes all the tests from the official `workbox-webpack-plugin`, and should be stable for general uses. If you find anything wrong, feel free to [open an issue](https://github.com/Clarkkkk/workbox-rspack-plugin/issues).\n\n## Requirement\n```sh\n@rspack/core@^0.5.6\n```\n\nOr\n\n```sh\n@rsbuild/core@^0.4.11\n```\n\n## Install\n\n```sh\nnpm i -D @aaroon/workbox-rspack-plugin\n```\n\nOr\n\n```sh\npnpm i -D @aaroon/workbox-rspack-plugin\n```\n\n```sh\nyarn add -D @aaroon/workbox-rspack-plugin\n```\n\n## Usage\n\n```js\nimport { GenerateSW, InjectManifest } from '@aaroon/workbox-rspack-plugin'\n/**\n * @type import('@rspack/cli').Configuration}\n */\nexport default {\n    plugins: [\n        new GenerateSW({\n            // options\n        }),\n        // or\n        new InjectManifest({\n            // options\n        })\n    ]\n}\n```\n\nIf you're using Rsbuild, use it in `tools.rspack.plugins`:\n\n```js\nimport { defineConfig } from '@rsbuild/core'\nimport { GenerateSW, InjectManifest } from '@aaroon/workbox-rspack-plugin'\n\nexport default defineConfig({\n    tools: {\n        rspack: {\n            plugins: [\n                new GenerateSW({\n                    // options\n                }),\n                // or\n                new InjectManifest({\n                    // options\n                })\n            ]\n        }\n    }\n})\n```\n\n## Options\n\nSame as [workbox-webpack-plugin](https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin).\n\n## Changelog\n\nChangelog can be found [here](https://github.com/Clarkkkk/workbox-rspack-plugin/blob/main/CHANGELOG.md).\n\n## Credits\n\nMost of the code comes from Google's workbox [repo](https://github.com/GoogleChrome/workbox), I just make it compatible with Rspack.\n\n## Acknowledgment\n\nIf you found it useful somehow, I would be grateful if you could leave a star in the project's GitHub repository.\n\nThank you.\n\n[npm-url]: https://www.npmjs.com/package/@aaroon/workbox-rspack-plugin\n[npm-image]: https://badge.fury.io/js/@aaroon%2Fworkbox-rspack-plugin.svg\n[npm-download]: https://img.shields.io/npm/dw/@aaroon/workbox-rspack-plugin\n[license]: https://img.shields.io/github/license/Clarkkkk/workbox-rspack-plugin\n[license-url]: https://github.com/Clarkkkk/workbox-rspack-plugin/blob/main/LICENSE.md\n[minified-size]: https://img.shields.io/npm/unpacked-size/%40aaroon%2Fworkbox-rspack-plugin\n[build-status]: https://img.shields.io/github/actions/workflow/status/Clarkkkk/workbox-rspack-plugin/.github%2Fworkflows%2Fpublish.yml\n[github-actions]: https://github.com/Clarkkkk/workbox-rspack-plugin/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClarkkkk%2Fworkbox-rspack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FClarkkkk%2Fworkbox-rspack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClarkkkk%2Fworkbox-rspack-plugin/lists"}