summaryrefslogtreecommitdiff
path: root/packages/integrations/vue/static-html.js
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2023-05-17 10:18:04 -0400
committerGravatar GitHub <noreply@github.com> 2023-05-17 10:18:04 -0400
commit3d525efc95cfb2deb5d9e04856d02965d66901c9 (patch)
treeaf1973aede0d2950d94b7ebfc957770be214446c /packages/integrations/vue/static-html.js
parente9fc2c2213036d47cd30a47a6cdad5633481a0f8 (diff)
downloadastro-3d525efc95cfb2deb5d9e04856d02965d66901c9.tar.gz
astro-3d525efc95cfb2deb5d9e04856d02965d66901c9.tar.zst
astro-3d525efc95cfb2deb5d9e04856d02965d66901c9.zip
Prevent removal of nested slots within islands (#7093)
* Prevent removal of nested slots within islands * Fix build errors
Diffstat (limited to 'packages/integrations/vue/static-html.js')
-rw-r--r--packages/integrations/vue/static-html.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/integrations/vue/static-html.js b/packages/integrations/vue/static-html.js
index a7f09eace..34740f88f 100644
--- a/packages/integrations/vue/static-html.js
+++ b/packages/integrations/vue/static-html.js
@@ -10,10 +10,12 @@ const StaticHtml = defineComponent({
props: {
value: String,
name: String,
+ hydrate: Boolean,
},
- setup({ name, value }) {
+ setup({ name, value, hydrate }) {
if (!value) return () => null;
- return () => h('astro-slot', { name, innerHTML: value });
+ let tagName = hydrate ? 'astro-slot' : 'astro-static-slot';
+ return () => h(tagName, { name, innerHTML: value });
},
});