mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
31d0688016
* 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>
9 lines
426 B
JavaScript
9 lines
426 B
JavaScript
import { h, createSSRApp } from 'vue';
|
|
import StaticHtml from './static-html.js';
|
|
|
|
export default (element) => (Component, props, 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);
|
|
};
|