mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
e9a77d8619
* wip: fix nested islands
* fix: improve hydration for dynamic content
* chore: fix bundle-size script for new files
* chore: allow-list client:* directive files
* fix(#3362): fix client:only behavior for React, Vue, Solid
* test: add client-only e2e test
* chore: update lockfile
* test: fix e2e tests
* test: add framework nesting e2e tests
* Update packages/astro/src/runtime/client/events.ts
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* chore: add changeset
* fix(preact): ignore hydrate roots
* chore: remove `ssr` check in integrations
* Revert "chore: remove `ssr` check in integrations"
This reverts commit ba27eaae55
.
* chore: add changeset
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
15 lines
387 B
JavaScript
15 lines
387 B
JavaScript
import SvelteWrapper from './Wrapper.svelte';
|
|
|
|
export default (target) => {
|
|
return (component, props, children, { client }) => {
|
|
if (!target.hasAttribute('ssr')) return;
|
|
delete props['class'];
|
|
try {
|
|
new SvelteWrapper({
|
|
target,
|
|
props: { __astro_component: component, __astro_children: children, ...props },
|
|
hydrate: client !== 'only',
|
|
});
|
|
} catch (e) {}
|
|
};
|
|
};
|