Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapter-vercel creates ISR symlinks for __data.json files for server routes #12690

Open
Rich-Harris opened this issue Sep 19, 2024 · 1 comment
Labels
bug Something isn't working pkg:adapter-vercel Pertaining to the Vercel adapter

Comments

@Rich-Harris
Copy link
Member

Describe the bug

adapter-vercel creates symlinks for routes with config.isr, but also creates symlinks for their subsidiary __data.json routes (both symlinks point at the same underlying route), which ensures that responses get ISR'd whether you hit the route directly or via client-side navigation.

This should only apply to pages, however — it should not apply to server routes. Currently, it does. (Maybe it should only apply to pages that export a load function? Not sure.)

In theory this should be harmless (though I guess it adds to the number of routes, and there's a limit to that number) but the existence of this unnecessary symlink appears to be triggering a separate bug related to ISR that is outside SvelteKit's control. In any case, it's messy and we should remove it

Reproduction

  • use adapter-vercel
  • add export const config = { isr: { expiration: 1000 } }; to a src/routes/blah/+server.js file
  • build the site
  • note the existence of .vercel/functions/blah/__data.json.func and associated __data.json.prerender-config.json

Logs

No response

System Info

latest

Severity

annoyance

Additional Information

No response

@Rich-Harris Rich-Harris added bug Something isn't working pkg:adapter-vercel Pertaining to the Vercel adapter labels Sep 19, 2024
@mvd3698
Copy link

mvd3698 commented Oct 10, 2024

We are having huge problems because of this issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:adapter-vercel Pertaining to the Vercel adapter
Projects
None yet
Development

No branches or pull requests

2 participants