Feature: detect shareable appContext components
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
在组件库的设计当中,往往可能存在多个 App,但是有一些 App 不是通过 createApp 方法构造而来的,比如 ElementPlus 的 MessageBox 组件,它是通过 render 方法,直接渲染一个与主应用程序分离的 DOM 树,比如:
对于 App2 来说,我借用了 App1 的 appContext,就是为了共享 App1 上面的全局组件,VueI18N,全局方法之类的。
但是 App2 永远不会被插件给捕捉到
当然,看了 Vue3 的源码,发现只有调用 mount 的时候,App 才会被记录
对于我这种场景,如果想要使用 VueDevTools 调试 App2 组件,应该怎么办?下面是可调试的 Demo:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied shareable-context.zip demo and reading the Vue 3 createApp, render, and mount behavior described in the issue. Trace how the devtools plugin records mounted apps, then define detection for the separately rendered App2 so it appears in Vue DevTools while sharing App1's appContext.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100