GoogleChrome / GoogleChrome/workbox

Split code for the Workbox library when using the `InjectManifest` class

Open
#3,305 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13k
Forks
880
Avg merge
2h 44m
Merged PRs (30d)
8

Description

Currently, when one uses the [`GenerateSW`](https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin#type-GenerateSW) class from the [`workbox-webpack-plugin`](https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin) in their [Webpack](https://webpack.js.org) config, a separate runtime file is created for the Workbox library by default (called something like `workbox-[hash].js`). This behavior can be configured via the [`inlineWorkboxRuntime`](https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin#property-GenerateSWConfig-inlineWorkboxRuntime) option, which has the default value of `false`.

There is no such option for the [`InjectManifest`](https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin#type-InjectManifest) class, though. I would like to separate the Workbox runtime from my custom service worker file, too. That would allow me to cache the former (the bigger) file. Would that be possible to implement?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.