Describe the bug#
Build output is incorrect for @tanstack/react-query-persist-client PersistQueryClientProvider. Imports from "react.js" instead of "react"
- import * as React from "react.js";
+ import * as React from "react";
When using with Vite:
node_modules/@tanstack/react-query-persist-client/build/modern/PersistQueryClientProvider.js:4:23:
4 │ import * as React from "react.js";
╵ ~~~~~~~~~~
Your minimal, reproducible example#
https://stackblitz.com/edit/vitejs-vite-1tmnhf?file=src%2Fmain.tsx&terminal=dev
Steps to reproduce#
- Open minimal reproducible example
- Start dev server with
npm run dev (should start automatically)
- View error in terminal
Expected behavior#
Build output imports correct React location.
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
- OS: macOS
- Browser: Firefox
Tanstack Query adapter#
react-query
TanStack Query version#
5.0.0-beta.0
TypeScript version#
5.0.2
Additional context#
No response
in the sourcecode (typescript) we always do:
as you can see here:
https://github.com/TanStack/query/blob/1d3ee672d2a1536e3463243813c91902aa97d973/packages/react-query-persist-client/src/PersistQueryClientProvider.tsx#L2
@lachlancollins does this have something to do with how things are bundled in
beta?