Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hono clientをapiに移す #169

Merged
merged 4 commits into from
Dec 30, 2024
Merged

hono clientをapiに移す #169

merged 4 commits into from
Dec 30, 2024

Conversation

ryoppippi
Copy link
Member

  • hono clientをapi側に移しました
  • hono をwebの依存関係から削除しました

@ryoppippi ryoppippi requested a review from tomoya December 30, 2024 02:43
import { hc } from "hono/client";

export const yasunoriApiClient = hc<ApiRoute>("https://api.yasunori.dev");
export * from "@awesome-yasunori/api/src/client";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api パッケージから export するなら、 import パスに src が含まれているのも解決しておきたいですね。

Copy link
Member Author

@ryoppippi ryoppippi Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます

  • web内のtsconfigでaliasを追加して解決する
  • api側でpackage.jsonにexports fieldを追加する(その場合api側の事前ビルドが必要)

のどちらが良いですか?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exports fieldも、ts fileそのまま指定で良いのであればビルド必要なさそうですね
☝️の方法でも良いですか?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomoya
exports filedを追加しました

@ryoppippi ryoppippi requested a review from tomoya December 30, 2024 06:22
@ryoppippi
Copy link
Member Author

@tomoya よろしくお願いします!

Copy link
Collaborator

@tomoya tomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。こちらでバッチリです!

@tomoya tomoya merged commit 2d6e299 into main Dec 30, 2024
14 checks passed
@tomoya tomoya deleted the feature/hono branch December 30, 2024 15:23
@times-yasunori times-yasunori locked as resolved and limited conversation to collaborators Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants