{"_id":"@birchill/inject-manifest-plugin","_rev":"6-583a5b77b379a4afd545c5a6e212e914","name":"@birchill/inject-manifest-plugin","dist-tags":{"latest":"1.0.2"},"versions":{"0.1.0":{"name":"@birchill/inject-manifest-plugin","version":"0.1.0","keywords":["service worker","manifest"],"author":{"name":"Birchill, Inc."},"license":"MIT","_id":"@birchill/inject-manifest-plugin@0.1.0","maintainers":[{"name":"birtles","email":"birtles@gmail.com"}],"homepage":"https://github.com/birchill/inject-manifest-plugin#readme","bugs":{"url":"https://github.com/birchill/inject-manifest-plugin/issues"},"dist":{"shasum":"ab0ba23d58d88d2306313195b599d3233c453240","tarball":"https://registry.npmjs.org/@birchill/inject-manifest-plugin/-/inject-manifest-plugin-0.1.0.tgz","fileCount":9,"integrity":"sha512-fVUkkPt0zYhweqfIGmxKawY+kEUbDlolujyURr1wRLPn6X/BfNV3vH5CsVkA6Vi/PBxtX/zv447lWitQEpUBRA==","signatures":[{"sig":"MEUCICwOgVYgrCSmNXw+wy6X4wdjMBdWxiYfx7Fzr1LzupFbAiEA23lTK9RKqfht0Hz4RlnLiBwP/ZkjUl9I9Zm6NchyCAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135040},"main":"dist/index.js","type":"module","_from":"file:birchill-inject-manifest-plugin-0.1.0.tgz","types":"./dist/index.d.ts","scripts":{"build":"tsup","release":"release-it","preinstall":"npx only-allow pnpm"},"_npmUser":{"name":"birtles","email":"birtles@gmail.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"_resolved":"/tmp/459d035b63f0d67a55ea3b7a6981a44a/birchill-inject-manifest-plugin-0.1.0.tgz","_integrity":"sha512-fVUkkPt0zYhweqfIGmxKawY+kEUbDlolujyURr1wRLPn6X/BfNV3vH5CsVkA6Vi/PBxtX/zv447lWitQEpUBRA==","repository":{"url":"git+https://github.com/birchill/inject-manifest-plugin.git","type":"git"},"_npmVersion":"10.2.4","description":"rspack plugin to inject a manifest file into a service worker file","directories":{},"lint-staged":{"*.{ts,json}":["prettier --write"]},"_nodeVersion":"20.11.0","dependencies":{"source-map":"^0.7.4","pretty-bytes":"^6.1.1","schema-utils":"^4.2.0","webpack-sources":"^3.2.3","fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"5.25.2","tsup":"8.1.0","husky":"9.0.11","prettier":"3.3.2","release-it":"17.5.0","typescript":"5.5.3","@types/node":"20.14.10","lint-staged":"15.2.7","@rspack/core":"1.0.0-alpha.3","@types/webpack-sources":"3.2.3","@release-it/conventional-changelog":"8.0.1"},"peerDependencies":{"@rspack/core":"^1.0.0-alpha.3"},"_npmOperationalInternal":{"tmp":"tmp/inject-manifest-plugin_0.1.0_1720843300246_0.7773535060971493","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@birchill/inject-manifest-plugin","version":"0.0.2","keywords":["service worker","manifest"],"author":{"name":"Birchill, Inc."},"license":"MIT","_id":"@birchill/inject-manifest-plugin@0.0.2","maintainers":[{"name":"birtles","email":"birtles@gmail.com"}],"homepage":"https://github.com/birchill/inject-manifest-plugin#readme","bugs":{"url":"https://github.com/birchill/inject-manifest-plugin/issues"},"dist":{"shasum":"5674c2ee583bfb49d8f10a8225a3ce925b608762","tarball":"https://registry.npmjs.org/@birchill/inject-manifest-plugin/-/inject-manifest-plugin-0.0.2.tgz","fileCount":9,"integrity":"sha512-+CQYCd289x+smbvpfbrhW0P+r9ofAQG6RK+m4NFJ4HeCZNd0yJlpiWj1eITqorlskwBG04g6Smu1rStrgubVHg==","signatures":[{"sig":"MEYCIQDlmTLYhspPZ2R89PFMAS8x6N9j4ILcMETsAMqWJwlpmAIhAMIYRYzYWV1Y6ZRMbOv9XVUDNGaH5KSg63vkkFfdC0s/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@birchill%2finject-manifest-plugin@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":136285},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"81894ff077506c451460a16c6794db3f7527e7a6","scripts":{"build":"tsup","prepare":"husky","release":"release-it","preinstall":"npx only-allow pnpm","prepublishOnly":"pnpm build"},"_npmUser":{"name":"birtles","email":"birtles@gmail.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/birchill/inject-manifest-plugin.git","type":"git"},"_npmVersion":"10.7.0","description":"rspack plugin to inject a manifest file into a service worker file","directories":{},"lint-staged":{"*.{ts,json}":["prettier --write"]},"_nodeVersion":"20.15.1","dependencies":{"source-map":"^0.7.4","pretty-bytes":"^6.1.1","schema-utils":"^4.2.0","webpack-sources":"^3.2.3","fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"5.25.2","tsup":"8.1.0","husky":"9.0.11","prettier":"3.3.2","release-it":"17.5.0","typescript":"5.5.3","@types/node":"20.14.10","lint-staged":"15.2.7","@rspack/core":"1.0.0-alpha.3","@types/webpack-sources":"3.2.3","@release-it/conventional-changelog":"8.0.1"},"peerDependencies":{"@rspack/core":"^1.0.0-alpha.3"},"_npmOperationalInternal":{"tmp":"tmp/inject-manifest-plugin_0.0.2_1721442986429_0.22226755759557437","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@birchill/inject-manifest-plugin","version":"0.1.1","keywords":["service worker","manifest"],"author":{"name":"Birchill, Inc."},"license":"MIT","_id":"@birchill/inject-manifest-plugin@0.1.1","maintainers":[{"name":"birtles","email":"birtles@gmail.com"}],"homepage":"https://github.com/birchill/inject-manifest-plugin#readme","bugs":{"url":"https://github.com/birchill/inject-manifest-plugin/issues"},"dist":{"shasum":"9d753a7cf0884dfeafc997e5e60f544ecf211c82","tarball":"https://registry.npmjs.org/@birchill/inject-manifest-plugin/-/inject-manifest-plugin-0.1.1.tgz","fileCount":9,"integrity":"sha512-dOP7bxHjq4GP6fcgpzQ5OrjgS6GiNrDz+BI8zA2YHrSRKk/BsxeZF0RzXNr6ToB24wppwJvx8GRkcGO/YoSMMQ==","signatures":[{"sig":"MEUCIDjTk5yRitwpkMJW/mqzjL8O62mF6p/tzEbJdDeC4CVxAiEAueBoaHTjldjm/HxDIx9bMLQ3v63+8IGwRH6KrVwLT20=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@birchill%2finject-manifest-plugin@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":136285},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"110fc817086f39a1dc82215647af41e9e1cb7e90","scripts":{"build":"tsup","prepare":"husky","release":"release-it","preinstall":"npx only-allow pnpm","prepublishOnly":"pnpm build"},"_npmUser":{"name":"birtles","email":"birtles@gmail.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/birchill/inject-manifest-plugin.git","type":"git"},"_npmVersion":"10.7.0","description":"rspack plugin to inject a manifest file into a service worker file","directories":{},"lint-staged":{"*.{ts,json}":["prettier --write"]},"_nodeVersion":"20.15.1","dependencies":{"source-map":"^0.7.4","pretty-bytes":"^6.1.1","schema-utils":"^4.2.0","webpack-sources":"^3.2.3","fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"5.25.2","tsup":"8.1.0","husky":"9.0.11","prettier":"3.3.2","release-it":"17.5.0","typescript":"5.5.3","@types/node":"20.14.10","lint-staged":"15.2.7","@rspack/core":"1.0.0-alpha.3","@types/webpack-sources":"3.2.3","@release-it/conventional-changelog":"8.0.1"},"peerDependencies":{"@rspack/core":"^1.0.0-alpha.3"},"_npmOperationalInternal":{"tmp":"tmp/inject-manifest-plugin_0.1.1_1721443054990_0.24668700147798428","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@birchill/inject-manifest-plugin","version":"1.0.0","keywords":["service worker","manifest"],"author":{"name":"Birchill, Inc."},"license":"MIT","_id":"@birchill/inject-manifest-plugin@1.0.0","maintainers":[{"name":"birtles","email":"birtles@gmail.com"}],"homepage":"https://github.com/birchill/inject-manifest-plugin#readme","bugs":{"url":"https://github.com/birchill/inject-manifest-plugin/issues"},"dist":{"shasum":"f363e7f0310a1917eca3dafd6537abca11e650df","tarball":"https://registry.npmjs.org/@birchill/inject-manifest-plugin/-/inject-manifest-plugin-1.0.0.tgz","fileCount":9,"integrity":"sha512-or5//9KMB7A32BWyn8tX9Y61RNqbovn634jrhZ7614Z8IAUtP59ZC+yByU1AD+jEmFQGEjevg11i9gCLXZHUUQ==","signatures":[{"sig":"MEUCIQDqAmXv5kp5YOzSefiLJ8tSMIMQMKamsiJv/HEF3YbtsQIgFYY/A0V5E2o6aAsyB5lRps4zH8R4UVhrLqjvmuDGw+Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@birchill%2finject-manifest-plugin@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":136274},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"8579fa414f8fc92a2d0ef662428fcb69de138fda","scripts":{"build":"tsup","prepare":"husky","release":"release-it","preinstall":"npx only-allow pnpm","prepublishOnly":"pnpm build"},"_npmUser":{"name":"birtles","email":"birtles@gmail.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/birchill/inject-manifest-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"rspack plugin to inject a manifest file into a service worker file","directories":{},"lint-staged":{"*.{ts,json}":["prettier --write"]},"_nodeVersion":"20.17.0","dependencies":{"source-map":"^0.7.4","pretty-bytes":"^6.1.1","schema-utils":"^4.2.0","webpack-sources":"^3.2.3","fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"5.29.2","tsup":"8.2.4","husky":"9.1.5","prettier":"3.3.3","release-it":"17.6.0","typescript":"5.5.4","@types/node":"20.14.10","lint-staged":"15.2.10","@rspack/core":"1.0.3","@types/webpack-sources":"3.2.3","@release-it/conventional-changelog":"8.0.1"},"peerDependencies":{"@rspack/core":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inject-manifest-plugin_1.0.0_1725580752305_0.9931869315877428","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@birchill/inject-manifest-plugin","version":"1.0.1","keywords":["service worker","manifest"],"author":{"name":"Birchill, Inc."},"license":"MIT","_id":"@birchill/inject-manifest-plugin@1.0.1","maintainers":[{"name":"birtles","email":"birtles@gmail.com"}],"homepage":"https://github.com/birchill/inject-manifest-plugin#readme","bugs":{"url":"https://github.com/birchill/inject-manifest-plugin/issues"},"dist":{"shasum":"47ff654d3a0109025642ed994950f9bb209382cf","tarball":"https://registry.npmjs.org/@birchill/inject-manifest-plugin/-/inject-manifest-plugin-1.0.1.tgz","fileCount":9,"integrity":"sha512-ks4+tMYaMDvUBv1gwt7GNt2ymtdsQGzFqrYTJz50GS9GCLR3f/KM5u5MNSJoqq+gU3oJL0/kEws5k8oeSez09w==","signatures":[{"sig":"MEUCIBPKDR3QUSX/4FFu3rAq5kUAGPIpNSuBWCtbXJKdoq/fAiEAk6Supp2EJV89lWgWUMQ4H0c+0HnaykmSZAZnv6771C4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@birchill%2finject-manifest-plugin@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":136357},"main":"dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","gitHead":"51d148f3faf3f0cc897a7ac8e7067e3bfe07adf5","scripts":{"build":"tsup","prepare":"husky","release":"release-it","prepublishOnly":"pnpm build","pnpm:devPreinstall":"npx only-allow pnpm"},"_npmUser":{"name":"birtles","email":"birtles@gmail.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/birchill/inject-manifest-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"rspack plugin to inject a manifest file into a service worker file","directories":{},"lint-staged":{"*.{ts,json}":["prettier --write"]},"_nodeVersion":"20.18.2","dependencies":{"source-map":"^0.7.4","pretty-bytes":"^6.1.1","schema-utils":"^4.3.0","webpack-sources":"^3.2.3","fast-json-stable-stringify":"^2.1.0"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"5.43.6","tsup":"8.3.6","husky":"9.1.7","prettier":"3.5.0","release-it":"18.1.2","typescript":"5.7.3","@types/node":"22.13.1","lint-staged":"15.4.3","@rspack/core":"1.2.2","@types/webpack-sources":"3.2.3","@release-it/conventional-changelog":"10.0.0"},"peerDependencies":{"@rspack/core":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/inject-manifest-plugin_1.0.1_1739153115352_0.3153437259698366","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@birchill/inject-manifest-plugin","version":"1.0.2","description":"rspack plugin to inject a manifest file into a service worker file","repository":{"type":"git","url":"git+https://github.com/birchill/inject-manifest-plugin.git"},"keywords":["service worker","manifest"],"author":{"name":"Birchill, Inc."},"license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"publishConfig":{"registry":"https://registry.npmjs.org"},"dependencies":{"fast-json-stable-stringify":"^2.1.0","pretty-bytes":"^7.1.0","schema-utils":"^4.3.3","source-map":"^0.7.6","webpack-sources":"^3.4.1"},"devDependencies":{"@release-it/conventional-changelog":"11.0.0","@rspack/core":"2.0.2","@types/node":"24.12.2","husky":"9.1.7","knip":"6.12.0","lint-staged":"17.0.2","prettier":"3.8.3","release-it":"20.0.1","tsdown":"0.21.10","typescript":"6.0.3"},"peerDependencies":{"@rspack/core":">=1.0.0"},"scripts":{"prepublishOnly":"pnpm build","build":"tsdown","release":"release-it","prepare":"husky"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"lint-staged":{"*.{ts,json}":["prettier --write"]},"gitHead":"8be56c05fb20c91e27b35956c3b983718c941c1f","types":"./dist/index.d.ts","_id":"@birchill/inject-manifest-plugin@1.0.2","bugs":{"url":"https://github.com/birchill/inject-manifest-plugin/issues"},"homepage":"https://github.com/birchill/inject-manifest-plugin#readme","_nodeVersion":"24.14.1","_npmVersion":"11.14.0","dist":{"integrity":"sha512-N78y/cRnHkYVPDa8hR+gCGHRHp7LjlmtFv0UiL/P2QyXDyuIy3oy6r9R9V0FvhOlGI5Q6WKKjnz+dd4Mf98hww==","shasum":"66bcc51d2737e6bca6c46c3e3902b56ccdda5ce9","tarball":"https://registry.npmjs.org/@birchill/inject-manifest-plugin/-/inject-manifest-plugin-1.0.2.tgz","fileCount":9,"unpackedSize":126832,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@birchill%2finject-manifest-plugin@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCVDIUd8HlhZXN9POZkXtaSY/ZqF2JMTpaATVgwAyyT9gIgN5pIuzXSJY5XOobgsHiWCxv36T6h+7O7yKd8FHeBy1Y="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c0d44945-fea7-48b2-8760-4ed04a3e2fa0"}},"directories":{},"maintainers":[{"name":"birtles","email":"birtles@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/inject-manifest-plugin_1.0.2_1778127862717_0.12394100493962745"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-13T04:01:40.156Z","modified":"2026-05-07T04:24:23.180Z","0.1.0":"2024-07-13T04:01:40.434Z","0.0.2":"2024-07-20T02:36:26.649Z","0.1.1":"2024-07-20T02:37:35.163Z","1.0.0":"2024-09-05T23:59:12.557Z","1.0.1":"2025-02-10T02:05:15.514Z","1.0.2":"2026-05-07T04:24:22.876Z"},"bugs":{"url":"https://github.com/birchill/inject-manifest-plugin/issues"},"author":{"name":"Birchill, Inc."},"license":"MIT","homepage":"https://github.com/birchill/inject-manifest-plugin#readme","keywords":["service worker","manifest"],"repository":{"type":"git","url":"git+https://github.com/birchill/inject-manifest-plugin.git"},"description":"rspack plugin to inject a manifest file into a service worker file","maintainers":[{"name":"birtles","email":"birtles@gmail.com"}],"readme":"# `@birchill/inject-manifest-plugin`\n\nAn rspack plugin that generates a manifest of assets and injects it into a\nservice worker asset.\n\nThis is a fork of the `InjectManifest` part of the\n[`workbox-webpack-plugin`](https://github.com/GoogleChrome/workbox/) package\nbut adapted to rspack's native Service Worker support.\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Options](#options)\n- [Differences to Workbox](#differences-to-workbox)\n- [Related projects](#related-projects)\n\n## Installation\n\n```\nnpm install -D @birchill/inject-manifest-plugin\n```\n\n## Usage\n\n1. The first step is to define your service worker in a way that rspack will\n   detect it.\n   That means passing a `URL` object to `navigator.serviceWorker.register()`.\n   For example:\n\n   ```js\n   const registrationPromise = navigator.serviceWorker.register(\n     new URL(\n       /* webpackChunkName: \"serviceworker\" */\n       './sw.ts',\n       import.meta.url\n     )\n   );\n   ```\n\n   Note that there are various limitations to rspack's handling of URL arguments\n   such as not being able to pass a URL variable.\n   See rspack's [usage notes for Web\n   Workers](https://www.rspack.dev/guide/features/web-workers#usage).\n\n2. The next step is ensuring that your generated service worker asset has a\n   fixed name (e.g. `serviceworker.js`) rather than a name with a cache-busting\n   hash in it.\n\n   ```js\n   // rspack.config.js\n   const config = {\n     // ...\n     output: {\n       chunkFilename: (assetInfo) => {\n         // The service worker entrypoint needs to be fixed (i.e. not have a hash\n         // appended).\n         if (assetInfo.chunk?.name === 'serviceworker') {\n           return '[name].js';\n         }\n         return '[name].[contenthash].js';\n       },\n     },\n   };\n   ```\n\n3. Finally, add the plugin to your rspack configuration.\n\n   The only required parameter is `swDest`, which is the path to the _generated_\n   service worker asset.\n   This is _not_ necessarily the same as the path of the source file.\n\n   For example, if your service worker source file is `src/sw.ts` but you\n   registered it as follows:\n\n   ```js\n   navigator.serviceWorker.register(\n     new URL(\n       /* webpackChunkName: \"serviceworker\" */\n       './sw.ts',\n       import.meta.url\n     )\n   );\n   ```\n\n   `swDest` should be `'serviceworker.js'`, _NOT_ `src/sw.ts`.\n\n   For example:\n\n   ```js\n   // rspack.config.js\n   import { InjectManifest } from '@birchill/inject-manifest-plugin';\n\n   const config = {\n     // ...\n     plugins: [\n       new InjectManifest({\n         swDest: 'serviceworker.js',\n       }),\n     ],\n   };\n   ```\n\n### Options\n\nThe options are the same as the `InjectManifest` options in the Workbox plugin\nwhich are [documented\nhere](https://developer.chrome.com/docs/workbox/modules/workbox-build#type-WebpackInjectManifestOptions).\n\n- `additionalManifestProperties` (optional) - A list of entries to be precached,\n  in addition to any entries that are generated as part of the build\n  configuration.\n\n  Type: Array of strings or `ManifestEntry` objects whose shape is as follows:\n\n  ```ts\n  interface ManifestEntry {\n    integrity?: string;\n    revision: string | null;\n    url: string;\n  }\n  ```\n\n- `chunks` (optional) - One or more chunk names whose corresponding output files\n  should be included in the precache manifest.\n\n  Type: Array of strings.\n\n- `dontCacheBustURLsMatching` (optional) - Assets that match this will be\n  uniquely versioned via their URL, and exempted from the normal HTTP\n  cache-busting that's done when populating the precache.\n\n  While not required, it's recommended that if your existing build process\n  already inserts a `[hash]` value into each filename, you provide a RegExp\n  that will detect that, as it will reduce the bandwidth consumed when\n  precaching.\n\n- `exclude` (optional) - One or more specifiers used to exclude assets from the\n  precache manifest.\n\n  This is interpreted following\n  [the same rules](https://www.rspack.dev/config/module.html#condition) as\n  `rspack`'s standard `exclude` option.\n\n  If not provided, the default value is `[/\\\\.map$/, /^manifest.*\\\\.js$/]`.\",\n\n  Type: Array of `Condition`s whose type is\n\n  ```ts\n  type Condition = RegExp | string | ((any: unknown) => boolean);\n  ```\n\n- `excludeChunks` (optional) - One or more chunk names whose corresponding\n  output files should be excluded from the precache manifest.\n\n  Type: Array of strings.\n\n- `include` (optional) - One or more specifiers used to include assets in the\n  precache manifest.\n\n  This is interpreted following\n  [the same rules](https://www.rspack.dev/config/module.html#condition) as\n  `rspack`'s standard `include` option.\n\n  Type: Array of `Condition`s.\n\n- `injectionPoint` (optional) - The string to find inside of the `swDest` asset.\n  Once found, it will be replaced by the generated precache manifest.\n\n  Defaults to `'self.__WB_MANIFEST'`.\n\n  Type: string.\n\n- `manifestTransforms` (optional) - One or more functions which will be applied\n  sequentially against the generated manifest.\n\n  If `modifyURLPrefix` or `dontCacheBustURLsMatching` are also specified, their\n  corresponding transformations will be applied first.\n\n  Type: Array of functions whose type is `ManifestTransform`:\n\n  ```ts\n  type ManifestTransform = (\n    manifestEntries: Array<ManifestEntry & { size: number }>,\n    compilation?: Compilation\n  ) => Promise<ManifestTransformResult> | ManifestTransformResult;\n\n  type ManifestTransformResult = {\n    manifest: Array<ManifestEntry & { size: number }>;\n    warnings?: Array<string>;\n  };\n\n  type ManifestEntry = {\n    integrity?: string;\n    revision: string | null;\n    url: string;\n  };\n  ```\n\n- `maximumFileSizeToCacheInBytes` (optional) - This value can be used to\n  determine the maximum size of files that will be precached.\n\n  This prevents you from inadvertently precaching very large files that might\n  have accidentally matched one of your patterns.\n\n  Defaults to `2097152` (2MB).\n\n  Type: number.\n\n- `modifyURLPrefix` (optional) - An object mapping string prefixes to\n  replacement string values.\n\n  This can be used to, e.g., remove or add a path prefix from a manifest entry\n  if your web hosting setup doesn't match your local filesystem setup.\n\n  As an alternative with more flexibility, you can use the `manifestTransforms`\n  option and provide a function that modifies the entries in the manifest using\n  whatever logic you provide.\n\n  Type: object whose keys are strings and values are strings.\n\n- `swDest` **(required)** - The name of the service worker file that will be\n  The name of the service worker file that will be generated,\n  e.g. `\"serviceworker.js\"`.\n\n  This file is generated by rspack but needs to be specified in order to inject\n  the manifest into it.\n\n  Note that this is name of the file generated by rspack, not the original\n  service worker file.\n\n## Differences to Workbox\n\nSince this plugin relies on rspack's native handling of service workers,\nit does not support any of the features related to compiling service workers in\nWorkbox.\n\nSpecifically the following options are not supported:\n\n- `compileSrc`\n- `importScriptsViaChunks`\n- `mode`\n- `swSrc`\n- `webpackCompilationPlugins`\n\nFurthermore, `swDest` is a required option in this plugin as we need to know\nwhich asset to inject the manifest into (and which assets to automatically\nexclude from the manifest).\n\n## Related projects\n\nThe following projects all recreate Workbox's `InjectManifest` functionality in\nsome form.\nAt the time of writing, however, I couldn't get any of them to behave correctly\nwith rspack's native service worker generation.\n\n- [workbox-rspack-plugin](https://www.npmjs.com/package/workbox-rspack-plugin).\n  Port of Workbox to rspack.\n- [@aaron/workbox-rspack-plugin](https://www.npmjs.com/package/@aaroon/workbox-rspack-plugin).\n  More up-to-date port.\n- [`inject-manifest-plugin`](https://www.npmjs.com/package/inject-manifest-plugin).\n  A much leaner version of what Workbox's `InjectManifest` does (with different\n  but similar options), adapted to work with both webpack and rspack.\n","readmeFilename":"README.md"}