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

frontend: init.tsをmain-boot.ts/sub-boot.tsのように分ける #10838

Closed
syuilo opened this issue May 12, 2023 · 7 comments
Closed

frontend: init.tsをmain-boot.ts/sub-boot.tsのように分ける #10838

syuilo opened this issue May 12, 2023 · 7 comments
Assignees
Labels
packages/frontend Client side specific issue/PR 💚Refactor Rewriting code without changing behavior

Comments

@syuilo
Copy link
Member

syuilo commented May 12, 2023

Summary

main-boot.tsはinit.tsと同様

sub-boot.tsはmain-bootを簡略化したもので、UIもZenUIにする
シェアページやMiAuth認証ページなどにアクセスされた際に、main-bootではなくsub-bootで読み込むことでパフォーマンスの向上やフルUIで開いてしまう問題を解決する

@syuilo syuilo added packages/frontend Client side specific issue/PR 💚Refactor Rewriting code without changing behavior labels May 12, 2023
@syuilo syuilo self-assigned this May 12, 2023
@acid-chicken
Copy link
Member

Storybook の preview でやってるワークアラウンドが解決するような minimum boot があると嬉しい

@syuilo
Copy link
Member Author

syuilo commented May 12, 2023

Viteで複数のエントリポイント(?)をビルドするように設定するのが面倒かも(そもそもできるのかしら)

@tamaina
Copy link
Contributor

tamaina commented May 12, 2023

init.tsでは条件によってsub-boot.tsとmain-boot.tsをdynamic import&boot関数実行するだけにするとか?

@syuilo
Copy link
Member Author

syuilo commented May 12, 2023

それでも良いか

@tamaina
Copy link
Contributor

tamaina commented May 12, 2023

(Zen UIを考えた時、sub-bootにファイル分割して削ぎ落とせるものって少ない気がする…)

@syuilo
Copy link
Member Author

syuilo commented May 12, 2023

dynamic importだとHTTPリクエストが1増えるから初回アクセス時の表示速度という観点では今より悪化するかも

@syuilo
Copy link
Member Author

syuilo commented May 17, 2023

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR 💚Refactor Rewriting code without changing behavior
Projects
None yet
Development

No branches or pull requests

3 participants