workbox
Namespaces
backgroundSync
broadcastUpdate
cacheableResponse
core
expiration
googleAnalytics
navigationPreload
precaching
rangeRequests
routing
strategies
streams
Methods
loadModule
loadModule(moduleName)
Load a Workbox module by passing in the appropriate module name.
This is not generally needed unless you know there are modules that are dynamically used and you want to safe guard use of the module while the user may be offline.
Parameter |
|
---|---|
moduleName |
string |
setConfig
setConfig(options)
Updates the configuration options. You can specify whether to treat as a debug build and whether to use a CDN or a specific path when importing other workbox-modules
Parameter |
|||||||||
---|---|---|---|---|---|---|---|---|---|
options |
Optional Object Values in
|
Abstract type
ModulePathCallback
ModulePathCallback(moduleName, debug) returns string
A ModulePathCallback
function can be used to modify the modify the where Workbox modules are loaded.
Parameter |
|
---|---|
moduleName |
string The name of the module to load (i.e. 'workbox-core', 'workbox-precaching' etc.). |
debug |
boolean When true, |
- Returns
-
string
This callback should return a path of module. This will be passed toimportScripts()
.