Skip to content

Standalone devtools not working when app is mounted to body + top-level await #750

Open
@ferferga

Description

My app is mounted to document.body directly, which in itself does not cause an issue with DevTools. However, I also use top-level await, which delays the mounting process until all the promises have been resolved. This order of events cause a race condition, where DevTools is mounted before the app and it get's replaced by Vue after mounting

Expected behaviour

Devtools should be mounted after it detects that all the other apps are also mounted to avoid being overwritten (we can't stop the user from manipulating the DOM, so I think it's a sensible middleground).

Reproduction

https://stackblitz.com/edit/vue3-vite-typescript-starter-jkegp2zi?file=src%2Fmain.ts

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions