Skip to main content

service_worker_chunk_filename

Function service_worker_chunk_filename 

Source
pub fn service_worker_chunk_filename(scope: &str) -> RcStr
Expand description

The root-served file name for a service worker registered at scope. One worker is supported per scope; the scope is encoded into the (flat, root-served) file name so distinct scopes get distinct files.

The human-readable slug is lossy (e.g. /foo/bar and /foo-bar both slugify to foo-bar), so a hash of the original scope is appended to guarantee distinct scopes get distinct file names.