Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@parcel/service-worker's version and manifest do not correspond to precache manifest of workbox / other tools #9939

Closed
meghprkh opened this issue Sep 4, 2024 · 1 comment
Labels
Stale Inactive issues

Comments

@meghprkh
Copy link

meghprkh commented Sep 4, 2024

💬 RFC

@parcel/service-worker's manifest is a list of strings and a version

Workbox's precache manifest is { url: string, revision?: string | null }[];

The version in the current plugin also has very little use as it is the hasReference of the service-worker.js file and not of each document. Thus I could change index.html and version would stay the same.

Should we change the manifest to be the precache manifest?

🔦 Context

💻 Examples

service-worker.js

import { manifest, version } from "@parcel/service-worker";
import { precacheAndRoute } from "workbox-precaching";

// OLD does not update if index.html got updated
precacheAndRoute(manifest.map((url) => ({ url, revision: version })));

// NEW Proposed
precacheAndRoute(manifest)

// OR
import { precache_manifest } from "@parcel/service-worker";
precacheAndRoute(precache_manifest)
@meghprkh meghprkh mentioned this issue Sep 4, 2024
3 tasks
Copy link

github-actions bot commented Mar 3, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

1 participant