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

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

Open
aschultz opened this issue Jun 18, 2024 · 0 comments
Open

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

aschultz opened this issue Jun 18, 2024 · 0 comments

Comments

@aschultz
Copy link

aschultz commented Jun 18, 2024

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()],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant