You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server Function called from inside createClientOnlyFn results in error "Server function module export not resolved" #5381
root cause here is order of compilation, we first apply createClientOnlyFn which removes the reference to serverFn on the server and then dead code elimination kicks in.
we need to rearrange the compiler plugins to make this work
Reacted by Ulrich Stark, Gumimaco and Leonardo Ferrari
Activity
schiller-manuel commentedon Oct 6, 2025
root cause here is order of compilation, we first apply
createClientOnlyFnwhich removes the reference toserverFnon the server and then dead code elimination kicks in.we need to rearrange the compiler plugins to make this work
manish-baghel commentedon Oct 12, 2025
@schiller-manuel
Is there any workaround for now?
In my case it was mainly happening due to tanstack-devtool vite plugin. Someone else also reported it TanStack/devtools#209
schiller-manuel commentedon Oct 12, 2025
@manish-baghel this is a different issue IMO, not related to this one here. are you using createClientOnlyFn?
fix: correct compiler plugin order, only handle createMiddlware in a …