-
Notifications
You must be signed in to change notification settings - Fork 402
Update server-functions-plugin and cleanup server functions #2005
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
Conversation
|
❌ Deploy Preview for solid-start-landing-page failed. Why did it fail? →
|
commit: |
502a2ab to
6f6293d
Compare
TanStack Server Functions already encodes the name into the function id: https://github.com/TanStack/router/blob/40b7576ff89d549af1218a1925c7cfaf9e85d724/packages/server-functions-plugin/src/index.ts#L111 Refs: #1859, #1872
6f6293d to
46bf8c3
Compare
| }, | ||
| server: { | ||
| directive: "use server", | ||
| callers: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this completely changed did it?
| )}'`, | ||
| replacer: (opts) => | ||
| `createServerReference(${opts.fn}, '${opts.functionId}', '${opts.extractedFilename}')`, | ||
| `createServerReference(${opts.fn}, '${opts.functionId}')`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the filename wasn't doing much anyways was it?
What is the current behavior?
@tanstack/server-functions-pluginisn't strictly pinned to a version.@tanstack/server-functions-pluginconfig is broken.Server function API's are imported via relative paths.What is the new behavior?
@tanstack/server-functions-pluginis now strictly pinned, because TanStack is still in prerelease mode (no semver).Server function API's are imported via package.json exports.(resulted inCannot read properties of undefined (reading 'SERVER_BASE_URL')with actual (non-monorepo) projects.Other information
'use server'will cause an error when there is Chinese in the file path #1859