astro/packages/renderers/renderer-solid/static-html.js
Nate Moore 1abb9ed080
Upgrade Vite to latest (#2424)
* chore: unvendor vite

* chore: upgrade vue and svelte

* feat(renderer-solid): upgrade for vite@2.7.x

* chore: update yarn.lock

* fix(solid): upgrade solid renderer for vite@2.7.x

* test: improve css test

* chore: upgrade to vite@2.8.0-beta.3

* fix: replace hacky serialization with 'serialize-javascript'

* fix: externalize serialize-javascript

* fix: explicitly add execa@6.x.x to devDependencies

* test(css): skip css?url test

* chore: update vite-plugin-svelte

* fix: ssr option

* chore: update changeset

* chore: remove changeset

* chore: add changeset

* chore: add back missing changeset

* chore: update vite

* chore: update to latest vite

* test: update proload?

* chore: update dependencies

* fix: remove preact from nanostores example

* fix: update static-build-pkg to use `.mjs` extension

* fix: exclude './server.js' from custom-elements test

* chore: remove unused file
2022-02-08 17:38:00 -06:00

12 lines
331 B
JavaScript

import { ssr } from 'solid-js/web';
/**
* Astro passes `children` as a string of HTML, so we need
* a wrapper `astro-fragment` to render that content as VNodes.
*/
const StaticHtml = ({ innerHTML }) => {
if (!innerHTML) return null;
return ssr(`<astro-fragment>${innerHTML}</astro-fragment>`);
};
export default StaticHtml;