apollographql / apollographql/apollo-client-integrations
Error while building using vite
- Dominant language
- TypeScript
- Stars
- 556
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
HI!
I'm creating a library to wrap some precofigured hooks/funcs for my application.
Building it using vite I have this error while trying to import registerApolloClient:
```
RollupError: src/client/ssr.ts (2:9): "registerApolloClient" is not exported by "node_modules/.pnpm/@apollo+experimental-nextjs-app-support@0.10.0_@apollo+client@3.9.10_next@14.1.4_react@18.2.0/node_modules/@apollo/experimental-nextjs-app-support/dist/empty.js", imported by "src/client/ssr.ts".
```
Do you have any idea how to solve it? (I get that the error is related to the fact that the library exposes exports using `reasct-server` )
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/client/ssr.ts and the referenced @apollo/experimental-nextjs-app-support/dist/empty.js export while reproducing the Vite build. Determine why registerApolloClient is unavailable through the react-server export and document or implement a configuration-compatible resolution; done means the library builds without this RollupError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100