Closed MC-dusk closed 1 year ago
These files will be generated on production.
Just run astro build
and look at dist
folder
ok, I just ran pnpm run dev
, and the console showed:
12:56:13 [serve] 404 /registerSW.js
12:56:35 [serve] 404 /favicons/favicon.svg
12:56:35 [serve] 404 /manifest.webmanifest
when I used pnpm run build
and pnpm run preview
, that worked fine.
But there are other problems:
Hey @MC-dusk, thanks for opening an issue!
When you run pnpm run build
, the registerSW.js
and manifest.webmanifest
files are generated for your at build time.
Make sure that the empty script tag is present inside of Layout.astro
. This is a hack we use to make vite-plugin-pwa
generate those files.
Marking as closed.
can't find
registerSW.js
andmanifest.webmanifest
but they are in
Layout.astro
https://github.com/shaunchander/astro-pwa-starter/blob/3ec78ebcf1ebb0c99b363b236d6dbd7903d48e4c/src/components/global/Layout/Layout.astro#L161-L162