@jill64/svelte-html
v1.1.20
Published
🏷️ Declarative attribute binding for the root html element
Downloads
67,835
Maintainers
Readme
SSR
Attribute binding with <SvelteHTML>
is only applied on the client.
To assign arbitrary attributes during SSR, use the apply
function in the handle
hook.
// hooks.server.js
import { apply } from '@jill64/svelte-html'
export const handle = async ({ event, resolve }) => {
// ...
return resolve(event, {
transformPageChunk: apply({
lang: 'en',
prefix: 'example'
})
})
}