pull/12335/head
Rich Harris 2 years ago
parent cbeb564a8b
commit 9607f7e17e

@ -1002,13 +1002,12 @@ function serialize_inline_component(node, expression, context) {
b.thunk(b.block([statement]))
)
);
}
context.state.template.push(statement);
} else if (context.state.skip_hydration_boundaries) {
context.state.template.push(statement);
if (node.type === 'SvelteComponent' || (node.type === 'Component' && node.metadata.dynamic)) {
context.state.template.push(block_open, statement, block_close);
} else {
context.state.template.push(statement);
// context.state.template.push(block_open, statement, block_close);
}
}

@ -1,5 +1,6 @@
/** @import { TemplateNode, Dom, Effect } from '#client' */
import { block, branch, pause_effect } from '../../reactivity/effects.js';
import { hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';
/**
* @template P
@ -28,4 +29,9 @@ export function component(anchor, get_component, render_fn) {
effect = branch(() => render_fn(anchor, component));
}
});
if (hydrating) {
anchor = hydrate_node.nextSibling;
set_hydrate_node(anchor);
}
}

@ -267,7 +267,7 @@ export function append(anchor, dom) {
if (hydrating) {
/** @type {Effect & { nodes: EffectNodes }} */ (current_effect).nodes.end = hydrate_node;
// console.log('effect.nodes.end', hydrate_node);
// console.log('effect.nodes', current_effect.nodes);
// // next node should be a <!--]-->
// var next = hydrate_node.nextSibling;

Loading…
Cancel
Save