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

Is there any way to guarantee rsf{n} endpoints are stable across builds? #1202

Closed
knpwrs opened this issue Jan 30, 2025 · 1 comment · Fixed by #1203
Closed

Is there any way to guarantee rsf{n} endpoints are stable across builds? #1202

knpwrs opened this issue Jan 30, 2025 · 1 comment · Fixed by #1203

Comments

@knpwrs
Copy link

knpwrs commented Jan 30, 2025

I noticed that in development, calling a server action resulted in a call to an endpoint like /RSC/F/_/{filepath}/{functionName}.txt; however, when running the production build, those endpoints are more like /RSC/F/assets/rsf0/{functionName}.txt.

That rsf0 bit is generated here:

`${DIST_ASSETS}/rsf${i}`,

The 0 appears to be based on whatever vite chunk the function ends up in, and I can see multiple endpoints in my test build along the lines of 1, 2, etc.

Is there any way to guarantee the stability of these endpoints across builds? What happens if I produce a new build and a server function I was calling ends up in a different vite entry, but someone's client hasn't been refreshed yet and so the client ends up calling the wrong endpoint?

@dai-shi
Copy link
Owner

dai-shi commented Jan 30, 2025

but someone's client hasn't been refreshed yet and so the client ends up calling the wrong endpoint?

Good point. I think we should add "hash" like "rsc".

Related: #1037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants