summaryrefslogtreecommitdiff
path: root/packages/integrations/vue/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/vue/client.js')
-rw-r--r--packages/integrations/vue/client.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/integrations/vue/client.js b/packages/integrations/vue/client.js
index 648a69658..faf1ac63a 100644
--- a/packages/integrations/vue/client.js
+++ b/packages/integrations/vue/client.js
@@ -1,8 +1,9 @@
import { h, createSSRApp, createApp } from 'vue';
+import { setup } from 'virtual:@astrojs/vue/app'
import StaticHtml from './static-html.js';
export default (element) =>
- (Component, props, slotted, { client }) => {
+ async (Component, props, slotted, { client }) => {
delete props['class'];
if (!element.hasAttribute('ssr')) return;
@@ -14,9 +15,11 @@ export default (element) =>
}
if (client === 'only') {
const app = createApp({ name, render: () => h(Component, props, slots) });
+ await setup(app);
app.mount(element, false);
} else {
const app = createSSRApp({ name, render: () => h(Component, props, slots) });
+ await setup(app);
app.mount(element, true);
}
};