Nuxt middleware & page setup does not execute in the expected order when refreshing page
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- nuxtjs, typescript
調査の方向性
リンクされている StackBlitz の再現例から始め、Nuxt-only、Ionic、i18n、Ionic-plus-i18n の各構成を比較します。issue で言及されている nuxt.config の router 統合設定を確認し、リフレッシュ時の挙動を再現します。完了条件は、組み合わせたセットアップが次の期待される順序を維持することです: グローバル middleware、ページ middleware、app setup、ページ setup。
索引モデルが issue の本文から書いたものです。
説明
🐛 The bug
I was using middleware to fetch user configuration data before navigating to pages, when I realized that the page setup was run before the middleware. Through some trial and error I figured out that removing Nuxt/ionic fixed the issue, but I also found out that adding the Nuxtjs/i18n module worsened the issue.
So I created a project tracking the following:
- Global middleware
- Page middleware
- App setup function
- Page setup function
And I got these results:
- (Nuxt alone) works as expected:
- (Nuxt + Nuxt/ionic) App setup gets run first but everything else in the correct order:
- (Nuxt + Nuxtjs/i18n) works as expected:
- (Nuxt + Nuxt/ionic + Nuxtjs/i18n) every page setup is run before middleware
I'm still pretty new to Nuxt & Ionic so I might be completely missing some critical information, but the Nuxt/ionic documentation gives the impression that middleware should just work with no caveats.
🛠️ To reproduce
https://stackblitz.com/edit/hui123
🌈 Expected behaviour
For the execution order to match the basic Nuxt project when refreshing the page, and to also work with the i18n nuxt module
- Global middleware
- Page middleware
- App setup function
- Page setup function
ℹ️ Additional context
Reproductions used to get the different results:
Nuxt middleware order (Nuxt only)
Nuxt middleware order (Ionic)
Nuxt middleware order (i18n)
Nuxt middleware order (Ionic + i18n)
It might be related to the ionic router integration, because if I disable it in nuxt.config the execution order goes back to normal.
- 主要言語
- TypeScript
- スター
- 458
- フォーク
- 53
- 平均マージ
- 15時間 54分
- マージ済み PR(30日)
- 25
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nuxt-modules/ionic のほかの issue
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
nuxt-modules/ionic#1004 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
nuxt-modules/ionic#908 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
nuxt-modules/ionic#867 ·
メンテナーはふだん 1 日以内に返信
-
bug needs reproduction
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
nuxt-modules/ionic#696 ·
メンテナーはふだん 1 日以内に返信
-
IonCardオープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
nuxt-modules/ionic#610 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
nuxt-modules/ionic の issue をすべて見る
似ている issue
-
area/frontend good first issue kind/cooldown
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
voidzero-dev/oxc-angular-compiler#511 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
langchain-ai/deepagentsjs#898 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
anomalyco/models.dev#8509 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation P2 UI/UX
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信