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.js35
1 files changed, 18 insertions, 17 deletions
diff --git a/packages/integrations/vue/client.js b/packages/integrations/vue/client.js
index 4832a9847..c6206fe51 100644
--- a/packages/integrations/vue/client.js
+++ b/packages/integrations/vue/client.js
@@ -1,21 +1,22 @@
import { h, createSSRApp, createApp } from 'vue';
import StaticHtml from './static-html.js';
-export default (element) => (Component, props, children, { client }) => {
- delete props['class'];
- if (!element.hasAttribute('ssr')) return;
+export default (element) =>
+ (Component, props, children, { client }) => {
+ delete props['class'];
+ if (!element.hasAttribute('ssr')) return;
- // Expose name on host component for Vue devtools
- const name = Component.name ? `${Component.name} Host` : undefined;
- const slots = {};
- if (children != null) {
- slots.default = () => h(StaticHtml, { value: children });
- }
- if (client === 'only') {
- const app = createApp({ name, render: () => h(Component, props, slots) });
- app.mount(element, false);
- } else {
- const app = createSSRApp({ name, render: () => h(Component, props, slots) });
- app.mount(element, true);
- }
-};
+ // Expose name on host component for Vue devtools
+ const name = Component.name ? `${Component.name} Host` : undefined;
+ const slots = {};
+ if (children != null) {
+ slots.default = () => h(StaticHtml, { value: children });
+ }
+ if (client === 'only') {
+ const app = createApp({ name, render: () => h(Component, props, slots) });
+ app.mount(element, false);
+ } else {
+ const app = createSSRApp({ name, render: () => h(Component, props, slots) });
+ app.mount(element, true);
+ }
+ };
atar/f7362a820ff19cf4080c5061b6276b91?s=13&d=retro' width='13' height='13' alt='Gravatar' /> Augustine Kim 3-1/+35 2023-04-04fix(node): Fix malformed URLs crashing the server in certain cases (#6746)Gravatar Erika 7-220/+97 2023-04-04Fix #6618: sitemap urls generated without slash (#6658)Gravatar André Alves 3-0/+39 2023-04-04ci: use correct issue number (#6745)Gravatar Emanuele Stoppa 1-1/+1 2023-04-04Fix broken links in TailwindCSS section (#6747)Gravatar Felix Frey 1-2/+2 2023-04-04[ci] formatGravatar Princesseuh 1-1/+1 2023-04-04fix(images): Simpler logic for collecting images in Markdown (#6744)Gravatar Erika 7-42/+54 2023-04-03[ci] formatGravatar Princesseuh 1-1/+2 2023-04-03feat(image): Export more types and utilities for users to use (#6739)Gravatar Erika 13-38/+57 2023-04-03fix(images): Return the proper content-type for the chosen format (#6741)Gravatar Erika 4-7/+16 2023-04-03[Markdoc] Fix: Support `render: null` (#6723)Gravatar Ben Holmes 9-60/+309 2023-04-03gitignore env.d.ts files in e2e tests (#6737)Gravatar Bjorn Lu 1-0/+1 2023-03-31[ci] formatGravatar matthewp 7-8/+17 2023-03-31Better errors for when response is already sent (#6719)Gravatar Matthew Phillips 12-3/+90 2023-03-31[ci] formatGravatar matthewp 2-8/+7 2023-03-31supporting top of await (#6671)Gravatar wulinsheng123 7-5/+63 2023-03-31[ci] release (#6694)astro@2.1.9@astrojs/rss@2.3.2@astrojs/react@2.1.1@astrojs/lit@2.0.0@astrojs/image@0.16.4Gravatar Houston (Bot) 59-143/+131 2023-03-31fix(check): Dynamically import check command (#6717)Gravatar Erika 2-1/+7 2023-03-31fix(errors): Add simplified message for MarkdownImageNotFound (#6718)Gravatar Erika 1-0/+2 2023-03-31[ci] formatGravatar Princesseuh 1-2/+2 2023-03-31Fix incorrect path in error overlay on Win (#6679)Gravatar Peter Timoshevsky 5-5/+43 2023-03-30Remove unnecessary image-related `.wasm` files inside build output when possi...Gravatar Erika 6-47/+45 2023-03-30Fix InferGetStaticParamsType and InferGetStaticPropsType not working with syn...Gravatar Erika 2-7/+16 2023-03-30Fix multiple images being generated for the same image (#6710)Gravatar Erika 6-15/+28 2023-03-30[RSS] Fix: update `RSSFeedItem` type to comply with `strictest` tsconfig (#6614)Gravatar Aivars Liepa 2-1/+6 2023-03-29Update lit-ssr dependency (#6681)Gravatar Elliott Marquez 13-82/+107 2023-03-29fix(images): Improve error handling around the new assets feature (#6649)Gravatar Erika 17-21/+290 2023-03-29Use debug option for debugDir (#6554)Gravatar Isaac 1-1/+1