Skip to content

Conversation

@katywings
Copy link
Contributor

@katywings katywings commented Nov 18, 2025

What is the current behavior?

  1. @tanstack/server-functions-plugin isn't strictly pinned to a version.
  2. @tanstack/server-functions-plugin config is broken.
  3. Server function urls include the filename of the corresponding function.
  4. Server function API's are imported via relative paths.

What is the new behavior?

  1. @tanstack/server-functions-plugin is now strictly pinned, because TanStack is still in prerelease mode (no semver).
  2. @tanstack/server-functions-plugin` config is updated to the newest structure.
  3. Server function urls do not include the filename of the corresponding function anymore. The TanStack Server Functions Plugin already encodes the filename into the function id via https://github.com/TanStack/router/blob/40b7576ff89d549af1218a1925c7cfaf9e85d724/packages/server-functions-plugin/src/index.ts#L111.
  4. Server function API's are imported via package.json exports. (resulted in Cannot read properties of undefined (reading 'SERVER_BASE_URL') with actual (non-monorepo) projects.

Other information

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

⚠️ No Changeset found

Latest commit: 46bf8c3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Nov 18, 2025

Deploy Preview for solid-start-landing-page failed. Why did it fail? →

Name Link
🔨 Latest commit 46bf8c3
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/691ca571ae73d70008bfce6f

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2005

commit: 46bf8c3

@katywings katywings force-pushed the devinxi-update-tanstack-server-fn branch from 502a2ab to 6f6293d Compare November 18, 2025 16:09
@katywings katywings changed the title WIP: Devinxi update tanstack server fn Update tanstack server-functions-plugin and cleanup server functions Nov 18, 2025
@katywings katywings changed the title Update tanstack server-functions-plugin and cleanup server functions Update server-functions-plugin and cleanup server functions Nov 18, 2025
@katywings katywings marked this pull request as ready for review November 18, 2025 16:25
@katywings katywings force-pushed the devinxi-update-tanstack-server-fn branch from 6f6293d to 46bf8c3 Compare November 18, 2025 16:57
},
server: {
directive: "use server",
callers: [
Copy link
Contributor

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}')`,
Copy link
Contributor

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?

@atilafassina atilafassina merged commit 79bf309 into main Nov 19, 2025
5 of 9 checks passed
@atilafassina atilafassina deleted the devinxi-update-tanstack-server-fn branch November 19, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug?]: 'use server' will cause an error when there is Chinese in the file path

4 participants