Repository navigation
fix: safe build for target ssr - #109
Conversation
sprusak
commented
Sep 5, 2025
- used tsup and new mapping as in query-devtools https://github.com/TanStack/query/blob/main/packages/query-devtools/package.json
- eliminated browser only code for a server build, this makes sure projects with server side rendering can safely execute this code
cdb6ec6 to
b90a2f2
Compare
| entries: { | ||
| entry: 'src/index.ts', | ||
| dev_entry: true, | ||
| server_entry: true, |
There was a problem hiding this comment.
ℹ️ build for SSR, will pick up this server_entry that have client side only modules removed which makes it safe to use, and Devtols are only ever mounted on the client side
|
I also opened this PR up as a reference to the failing issues you saw: #110 |
|
Feel free to add those changes and I'll approve and merge and close the other one! |
|
Also, run |
OK thanks, I hope its ok now. I guess might be useful to add some step in CI, that verify if changeset is added? I might create some PR |
More templates
@tanstack/devtools
@tanstack/devtools-ui
@tanstack/devtools-vite
@tanstack/devtools-event-bus
@tanstack/devtools-event-client
@tanstack/react-devtools
@tanstack/solid-devtools
commit: |
|
@sprusak not every PR requires a changeset, it depends, but might be a good idea to see if there's room for improvement! |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @tanstack/devtools@0.6.8 ### Patch Changes - Changed package.json exports to allow safe usage in ssr environments ([#109](#109)) ## @tanstack/react-devtools@0.6.4 ### Patch Changes - Updated dependencies \[[`6447ab2`](6447ab2)]: - @tanstack/devtools@0.6.8 ## @tanstack/solid-devtools@0.6.4 ### Patch Changes - Updated dependencies \[[`6447ab2`](6447ab2)]: - @tanstack/devtools@0.6.8 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>