Skip to content
Discussion options

You must be logged in to vote

Alright, I found the issue. The problem is that TanStack's default client entry is @tanstack/react-start/dist/plugin/default-entry/client.tsx which is a file inside node_modules. A plain id.includes("/node_modules/") check matches the entry module itself.

We can work around this by excluding this specific module from the vendor bundle:

manualChunks(id) {
  if (
    id.includes("/node_modules/") &&
    !id.includes("/node_modules/@tanstack/react-start/dist/plugin/default-entry/client")
  ) {
    return "vendor";
  }
}

This issue should also go away when a custom entry module is configured:

tanstackStart({
  client: {
    entry: "client.tsx",
  },
}),

I'm still wondering whether this is wor…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mariusschulz
Comment options

@mariusschulz
Comment options

Answer selected by mariusschulz
@schiller-manuel
Comment options

@mariusschulz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants