hey-api / openapi-ts

🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more. Support: @mrlubos
https://heyapi.dev
Other
1.43k stars 106 forks source link

When `config.client.bundle` is true, the import path for the client is incorrect in plugin. #1120

Closed anchan828 closed 1 month ago

anchan828 commented 1 month ago

Description

There is an import error in the generated @tanstack/react-query.gen.ts.

import type { Options } from './client'; // <- I think it's `../client` instead of `./client`.
import {
  queryOptions,
  type UseMutationOptions,
  type DefaultError,
} from '@tanstack/react-query';

Reproducible example or configuration

https://stackblitz.com/edit/hey-api-client-fetch-plugin-tanstack-react-query-1zhha6?file=src%2Fclient%2F%40tanstack%2Freact-query.gen.ts

OpenAPI specification (optional)

No response

System information (optional)

{
  "@hey-api/openapi-ts": "0.53.7",
  "@hey-api/client-fetch": "0.4.0"
}
stackblitz[bot] commented 1 month ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

mrlubos commented 1 month ago

You're right, thanks for catching!