Skip to content

v5 beta: react-query-persist-client import coming from "react.js" #5777

@tmm

Description

@tmm

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

  1. Open minimal reproducible example
  2. Start dev server with npm run dev (should start automatically)
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv5

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions