Expose Vue component names for devtools (#1512)

* Expose name on host component for Vue devtools

* Add changeset

* Update changeset to patch from minor

* [ci] collect stats

* [ci] collect stats

Co-authored-by: leviceccato <leviceccato@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
This commit is contained in:
Levi 2021-10-15 06:08:07 +11:00 committed by GitHub
parent 32dbf68247
commit 31d0688016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/renderer-vue': patch
---
Expose name on host component for Vue devtools

View file

@ -2,6 +2,8 @@ import { h, createSSRApp } from 'vue';
import StaticHtml from './static-html.js';
export default (element) => (Component, props, children) => {
const app = createSSRApp({ render: () => h(Component, props, { default: () => h(StaticHtml, { value: children }) }) });
// Expose name on host component for Vue devtools
const name = Component.name ? `${Component.name} Host` : undefined;
const app = createSSRApp({ name, render: () => h(Component, props, { default: () => h(StaticHtml, { value: children }) }) });
app.mount(element, true);
};

View file

@ -40,5 +40,5 @@ Date,Commits (24hr),Issues (24hr),Issues:BUG (24hr),Issues:RFC (24hr),Issues:DOC
"Sunday, October 10, 2021",6,0,0,0,0,3,19,195,11,54,33,15,"2021-10-10T12:05:25.390Z"
"Monday, October 11, 2021",3,1,1,0,0,2,18,195,12,54,33,15,"2021-10-11T12:06:07.437Z"
"Tuesday, October 12, 2021",7,3,3,0,0,6,19,197,15,54,33,14,"2021-10-12T12:05:36.457Z"
"Wednesday, October 13, 2021",15,5,4,0,0,3,8,199,18,53,32,15,"2021-10-13T12:07:05.775Z"
"Thursday, October 14, 2021",7,2,2,0,0,6,8,201,20,53,32,15,"2021-10-14T12:05:35.253Z"
"Wednesday, October 13, 2021",16,5,4,0,0,3,8,199,18,53,32,15,"2021-10-13T12:15:38.734Z"
"Thursday, October 14, 2021",8,3,3,0,0,6,7,202,21,53,32,15,"2021-10-14T12:15:34.689Z"

1 Date Commits (24hr) Issues (24hr) Issues:BUG (24hr) Issues:RFC (24hr) Issues:DOC (24hr) PRs (24hr) Open PRs Open Issues Bugs: Needs Triage Bugs: Accepted RFC: In Progress RFC: Accepted Date (ISO)
40 Sunday, October 10, 2021 6 0 0 0 0 3 19 195 11 54 33 15 2021-10-10T12:05:25.390Z
41 Monday, October 11, 2021 3 1 1 0 0 2 18 195 12 54 33 15 2021-10-11T12:06:07.437Z
42 Tuesday, October 12, 2021 7 3 3 0 0 6 19 197 15 54 33 14 2021-10-12T12:05:36.457Z
43 Wednesday, October 13, 2021 15 16 5 4 0 0 3 8 199 18 53 32 15 2021-10-13T12:07:05.775Z 2021-10-13T12:15:38.734Z
44 Thursday, October 14, 2021 7 8 2 3 2 3 0 0 6 8 7 201 202 20 21 53 32 15 2021-10-14T12:05:35.253Z 2021-10-14T12:15:34.689Z