QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.84k stars 1.31k forks source link

[🐞] `qwik-prefetch-service-worker.js` 404 in dev mode #6600

Closed DustinJSilk closed 4 months ago

DustinJSilk commented 4 months ago

Which component is affected?

Qwik Runtime

Describe the bug

When using the PrefetchServiceWorker component, a 404 is thrown when fetching qwik-prefetch-service-worker.js during dev mode.

To get dev mode working, you must first run pnpm build so that the dist folder exists with the file.

Reproduction

https://github.com/DustinJSilk/qwik-prefetch-dev-file

Steps to reproduce

$ pnpm i

$ pnpm start

See 404 error in the browser when fetching the prefetch service worker file.

System Info

System:
    OS: macOS 14.4.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 28.74 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.0.5 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 126.0.6478.116
    Safari: 17.4.1
  npmPackages:
    @builder.io/qwik: github:QwikDev/qwik-build#ad7cc99c09c59882b4569c8d7c1d02543a7051f0 => 1.5.7-dev20240622232135 
    @builder.io/qwik-city: github:QwikDev/qwik-city-build#8effe19b19d9c5ff7580c8d2f27dd6b8fa5f903a => 1.5.7-dev20240622232712 
    typescript: 5.4.5 => 5.4.5 
    undici: * => 6.19.2 
    vite: ^5.2.10 => 5.3.1

Additional Information

No response

DustinJSilk commented 4 months ago

This is also an issue with the preview command

gioboa commented 4 months ago

This is also an issue with the preview command

In preview mode it's working fine to me.

I'll disable the fetch in dev mode