vite-pwa / docs

Documentation: PWA integrations for Vite and the ecosystem
https://vite-pwa-org.netlify.app/
MIT License
196 stars 42 forks source link

"@vite-pwa/nuxt": "^0.1.1" - manifest.webmanifest is 404 #96

Closed MichaelJCole closed 8 months ago

MichaelJCole commented 8 months ago

Hi, I'm following the instructions for Nuxt 3 on the docs and nuxt generate isn't creating a manifest.webmanifest file in .output/public.

Can you help me understand why?

Here is a minimal example built from the documentation.

nuxt.config.ts

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  ssr: false,
  modules: ["@vite-pwa/nuxt"], // https://vite-pwa-org.netlify.app/frameworks/nuxt
  pwa: {
    /* your pwa options */
  },
  generate: {
    routes: ["/"],
  },
});

I run with npm run generate && npx serve .output/public and when Firefox loads the site, the web server 404's for the manifest.webmanifest

 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 GET /200
 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 Returned 200 in 1 ms
 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 GET /404
 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 Returned 200 in 1 ms
 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 GET /
 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 Returned 200 in 0 ms
 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 GET /manifest.webmanifest
 HTTP  11/8/2023 10:16:54 AM 127.0.0.1 Returned 404 in 1 ms

These files are created:

image

MichaelJCole commented 8 months ago

I just noticed this is the docs repo... I made an issue in the next repo here: https://github.com/vite-pwa/nuxt/issues/84 Sorry to whichever repo has the duplicate issue...