Skip to content

timestamp should be replaced with version in service workers #4196

@Rich-Harris

Description

@Rich-Harris

Describe the problem

#3412 added a version export to $app/env, which defaults to the timestamp at the time of builld. The $service-worker module doesn't expose it — it instead exposes a different timestamp.

Describe the proposed solution

Add version to $service-worker, and replace timestamp with an object that will throw a noisy error if you try to stringify it (which will cover the common case where it's used as a cache key).

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions