QwikDev / qwik

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

[🐞] Custom 404 page is only generated when server adapter is added #4507

Open ahnpnl opened 1 year ago

ahnpnl commented 1 year ago

Which component is affected?

Qwik City (routing)

Describe the bug

Problem

With a newly generated Qwik app with Qwik City, a custom 404 page is not generated in build production folder unless a server adapter is added.

Expected behavior

I'm not sure if this is a bug or it is intended. I've read documentation at https://qwik.builder.io/docs/advanced/routing/#default-404-page and there is no information about server adapter needs to be added. This is either a bug with qwik build production or the documentation was missing the information.

Reproduction

https://github.com/ahnpnl/my-qwik-app

Steps to reproduce

System Info

System:
    OS: macOS 13.4
    CPU: (8) arm64 Apple M1
    Memory: 83.63 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.5.1 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 114.0.5735.106
    Firefox: 113.0.2
    Safari: 16.5
  npmPackages:
    @builder.io/qwik: ~1.1.5 => 1.1.5 
    @builder.io/qwik-city: ~1.1.5 => 1.1.5 
    undici: 5.22.1 => 5.22.1 
    vite: 4.3.9 => 4.3.9

Additional Information

No response

nsdonato commented 1 year ago

Hey @ahnpnl Can you update to the new version 1.2.2 and test if you still have the problem? Thank you 😊

ahnpnl commented 1 year ago

I just upgraded the reproduce repo main branch to be the latest version, still the 404.html isn't in dist folder after running build