mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
c9d833ee0b
* fix: add packages to external * fix: improve renderer error message * fix: reenable vue renderer * chore: remove `extensions` from templates * fix: reenable @astrojs/renderer-vue * refactor: add types to snowpack plugin * fix: update snowpack * fix: use manual SSR wrapper for Svelte * chore: add changesets * chore: bump snowpack * test: fix failing test * chore: remove redundant entries
15 lines
394 B
JavaScript
15 lines
394 B
JavaScript
import SvelteWrapper from './Wrapper.svelte.ssr.js';
|
|
|
|
function check(Component) {
|
|
return Component['render'] && Component['$$render'];
|
|
}
|
|
|
|
async function renderToStaticMarkup(Component, props, children) {
|
|
const { html } = SvelteWrapper.render({ __astro_component: Component, __astro_children: children, ...props });
|
|
return { html };
|
|
}
|
|
|
|
export default {
|
|
check,
|
|
renderToStaticMarkup,
|
|
};
|