Nuxt middleware & page setup does not execute in the expected order when refreshing page
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- nuxtjs, typescript
Hướng nghiên cứu
Bắt đầu với bản tái hiện StackBlitz được liên kết và so sánh các cấu hình Nuxt-only, Ionic, i18n và Ionic-plus-i18n. Kiểm tra thiết lập tích hợp router trong nuxt.config được đề cập trong issue và tái hiện hành vi khi refresh. Được xem là hoàn tất khi setup kết hợp duy trì đúng thứ tự mong đợi: middleware toàn cục, middleware của trang, app setup, sau đó là page setup.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🐛 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.
- Ngôn ngữ chính
- TypeScript
- Star
- 458
- Fork
- 54
- Merge trung bình
- 16 giờ 28 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nuxt-modules/ionic
-
`useHead` does not resolve reactive input on the clientCó thể đã có người làm @Carpediem94 đã nhận 64 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
nuxt-modules/ionic#1004 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
nuxt-modules/ionic#908 · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
nuxt-modules/ionic#867 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs reproduction
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
nuxt-modules/ionic#696 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
IonCardĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
nuxt-modules/ionic#610 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nuxt-modules/ionic
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
stellar/stellar-dev-skill#151 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Trial & Error: guided Blind offer squeezes on phones and sits under the touch toolbar on iPadĐang mởarea:arcade game ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
fderuiter/deruiter.dev#2281 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scope: data grid type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vicharanashala/ajrasakha#1439 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: TV5Monde AsieĐang mởapproved check:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày