Config for supplying own service worker file
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
I tried to understand the custom config options for pwa.config.js, but could not find a way to get the workbox options (particularly, which swSrc applied in my build.
the config file looks like this right now:
exports.workbox = {
advanced: false, // alias
injectManifest: false, // alias
swSrc: './service_worker.js', // template; mode: InjectManifest
navigateFallbackWhitelist: [/^(?!\/__).*/], // mode: GenerateSW
navigateFallback: 'index.html', // mode: GenerateSW
swDest: 'sw.js',
exclude: [
/\.git/,
/\.map$/,
/\.DS_Store/,
/^manifest.*\.js(?:on)?$/,
/\.gz(ip)?$/,
/\.br$/
]
}
thanks for any pointers!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the repository's handling of pwa.config.js and the workbox configuration shown in the issue, then trace how swSrc and the service_worker.js path are consumed during a build. Done means the documented configuration can supply a custom service worker file and the resulting build uses it as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100