Skip to content

__workerManifest.assets is missing entry for manifest-{version}.js #240

@aschultz

Description

@aschultz

Remix generates a file like assets/manifest-12345.js that contains the list of routes and their dependencies, and links to this from the HTML doc. But RemixPWA isn't including it in the __workerManifest.assets list, which makes it tricky to ensure that file gets cached for offline use.

I think maybe the PWA vite plugin that generates the assets list is running before Remix generates the manifest file?

//package.json
"dependencies": {
    "@remix-pwa/sw": "^3.0.7",
    "@remix-pwa/worker-runtime": "^2.1.2",
    "@remix-run/node": "^2.9.2",
    "@remix-run/react": "^2.9.2",
    "@remix-run/serve": "^2.9.2",
    "isbot": "^5.1.7",
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
},
"devDependencies": {
    "@remix-pwa/dev": "^3.0.5",
    "@remix-run/dev": "^2.9.2",
    "@types/react": "^18.3.3",
    "cross-env": "^7.0.3",
    "vite": "^5.2.12"
}
//vite.config.js
export default defineConfig({
  build: {
    minify: false
  },
  plugins: [
    remix({
        ssr: true,
    }),
    remixPWA()],
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedIssues blocked by other tasks or dependenciesroadmapIssues planned for future development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions