{"id":20073525,"url":"https://github.com/ragingwind/sw-precache-webpack-plugin-loader","last_synced_at":"2025-07-11T10:06:08.086Z","repository":{"id":57375781,"uuid":"88249709","full_name":"ragingwind/sw-precache-webpack-plugin-loader","owner":"ragingwind","description":"Selectively load sw-precache-webpack plugin either it is working on webpack or webpack-dev-server","archived":false,"fork":false,"pushed_at":"2017-04-18T06:44:20.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T15:06:37.468Z","etag":null,"topics":["progressive-web-apps","pwa","sw-precache","webpack"],"latest_commit_sha":null,"homepage":"","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/ragingwind.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":"2017-04-14T08:35:54.000Z","updated_at":"2020-06-14T14:40:24.000Z","dependencies_parsed_at":"2022-08-27T10:42:09.301Z","dependency_job_id":null,"html_url":"https://github.com/ragingwind/sw-precache-webpack-plugin-loader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ragingwind/sw-precache-webpack-plugin-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fsw-precache-webpack-plugin-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fsw-precache-webpack-plugin-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fsw-precache-webpack-plugin-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fsw-precache-webpack-plugin-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ragingwind","download_url":"https://codeload.github.com/ragingwind/sw-precache-webpack-plugin-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fsw-precache-webpack-plugin-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264780898,"owners_count":23662743,"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":["progressive-web-apps","pwa","sw-precache","webpack"],"created_at":"2024-11-13T14:46:38.756Z","updated_at":"2025-07-11T10:06:08.069Z","avatar_url":"https://github.com/ragingwind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sw-precache-webpack-plugin-loader\n\u003e It just another handy module to load sw-precache-webpack plugin selectively either it is working on webpack or webpack-dev-server. Please read issues [1](https://github.com/goldhand/sw-precache-webpack-plugin#webpack-dev-server-support) / [2](https://github.com/ragingwind/sw-precache-webpack-dev-server-plugin#how-it-works), if you have a question why there are two of modules for sw-precache.\n\n\n## Install\n\n```\n$ yarn add sw-precache-webpack-plugin-loader --dev\n```\nor\n```\n$ npm install --save sw-precache-webpack-plugin-loader\n```\n\n\n## Usage\n\n```js\nconst SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin-loader');\nconst packageJSON = require('./package.json');\n\n{\n\t...\n\tplugins: [\n\t\t...\n\t\tnew SWPrecacheWebpackPlugin({\n\t\t\t// configs of sw-precache\n\t\t\tcacheId: `${packageJSON.name}-${packageJSON.version}`,\n\t\t\tstaticFileGlobs: [\n\t\t\t\tpath.join(webpackOutput.path, '**/*')\n\t\t\t],\n\t\t\truntimeCaching: [{\n\t\t\t\turlPattern: /https:\\/\\/.+.firebaseio.com/,\n\t\t\t\thandler: 'networkFirst'\n\t\t\t}],\n\t\t\tlogger: function () {},\n\t\t\tfilename: 'sw.js',\n\t\t\t// configs of sw-precache-webpack-plugin\n\t\t\tminify: process.env.NODE_ENV ? 'production' : 'development'\n\t\t})\n\t]\n};\n```\n\n## Relevant Projects\n\n- [ragingwind/sw-precache-webpack-dev-server-plugin: Webpack Plugin for using sw-precache during development with webpack-dev-server](https://goo.gl/FyXM10)\n- [goldhand/sw-precache-webpack-plugin: Webpack plugin that generates a service worker using sw-precache that will cache webpack's bundles' emitted assets. You can optionally pass sw-precache configuration options to webpack through this plugin.](https://goo.gl/9ueQty)\n\n## License\n\nMIT © [Jimmy Moon](http://ragingwind.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragingwind%2Fsw-precache-webpack-plugin-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragingwind%2Fsw-precache-webpack-plugin-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragingwind%2Fsw-precache-webpack-plugin-loader/lists"}