nuxt / devtools

Unleash Nuxt Developer Experience
https://devtools.nuxt.com
MIT License
2.85k stars 153 forks source link

fix: DevTools cannot be showed in Chrome and Firefox on Nuxt v4 #697

Closed pan93412 closed 1 month ago

pan93412 commented 1 month ago

🐛 The bug

I am using the nightly version of Nuxt (nuxt-nightly@4.0.0-28688968.58f4f477). I found Nuxt DevTools (no matter the nightly or @nuxt/devtools@1.3.9) does not work on Chrome 126 and Firefox 129.0b6 (Attachment #2). Notably, it works on Safari 17.5 (Attachment #1). It used to worked on Nuxt v3.

image image

When adding breakpoints to the code related to Nuxt DevTools, I found Firefox (and Chrome) indeed ran import("./view/client") but setupDevToolsClient was never called, as the attachment #3 shown. Safari ran as expected (attachment #4). Not sure why.

https://github.com/user-attachments/assets/df0c3b68-3e77-4791-ba55-f837bfe0efb5 https://github.com/user-attachments/assets/0ad4a9cd-7570-4cb4-b62f-df250b996a32

🛠ī¸ To reproduce

https://github.com/pan93412/nuxt-4-devtools-regression

🌈 Expected behavior

The Nuxt DevTools should be able to show on Chrome, Firefox, and Safari.

ℹī¸ Additional context

No response

pan93412 commented 1 month ago

duplicate of #698