-
Notifications
You must be signed in to change notification settings - Fork 12
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
hono clientをapiに移す #169
Conversation
ryoppippi
commented
Dec 30, 2024
- hono clientをapi側に移しました
- hono をwebの依存関係から削除しました
import { hc } from "hono/client"; | ||
|
||
export const yasunoriApiClient = hc<ApiRoute>("https://api.yasunori.dev"); | ||
export * from "@awesome-yasunori/api/src/client"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api パッケージから export するなら、 import パスに src が含まれているのも解決しておきたいですね。
There was a problem hiding this comment.
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側の事前ビルドが必要)
のどちらが良いですか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exports fieldも、ts fileそのまま指定で良いのであればビルド必要なさそうですね
☝️の方法でも良いですか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomoya
exports filedを追加しました
@tomoya よろしくお願いします! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます。こちらでバッチリです!