sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.67k stars 1.93k forks source link

Adapter-static not working with my prerendered `[[page]]` and `article/[slug]` #12419

Closed jeffng50 closed 1 day ago

jeffng50 commented 4 months ago

Describe the bug

My repo is using Sveltekit, Strapi, houdini graphql, tailwindcss, daisyui Basically, or my routes [[page]] and article/[slug], it'll load slowly (and display the loading animation i've put) even when previewing npm run preview, sometimes it happens on my PC browser, mostly it happens when I browse my site using mobile (even on npm run preview --host to expose the network to my home network so i can access it by phone)

I just made my home page load data from strapi locally, and it also shows the same error, could be my handling with the loading animation?

Reproduction

My website repo

my repo is a monorepo run by (turbo)[https://turbo.build/], you can reproduce this by:

  1. at root directory
  2. npm run local-cms to boot up strapi locally
  3. npm run build-frontend to build frontend
  4. npm run preview (it has --host) to be able to run what you built
  5. you will either see the issue mentioned happening on your browser or most likely mobile, that the loading is slow

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 7840HS with Radeon 780M Graphics
    Memory: 13.60 GB / 31.19 GB
  Binaries:
    Node: 20.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (126.0.2592.81)
    Internet Explorer: 11.0.22621.3527

Severity

serious, but I can work around it

Additional Information

I can work around it on both PC and mobile by hard reloading while the loading doesn't end, it will show the pages i made

eltigerchino commented 4 months ago

Please provide a minimal reproduction and clearly describe what is not working: what error is shown?. Do not link your entire project as the number of dependencies makes it difficult to properly diagnose.