So @smarihot, you need to do a file like this: ``` <script context="module"> /** @type {import('

So @smarihot, you need to do a file like this:
<script context="module">
/** @type {import('@sveltejs/kit').Load */
export async function load({ platform }) {
return {
"props": {
"key": await platform.env.KV_BINDING_NAME.get("key")
}
}
}
</script>

<script>
// Now your KV value is on your key.
export let key;
</script>

etc...
<script context="module">
/** @type {import('@sveltejs/kit').Load */
export async function load({ platform }) {
return {
"props": {
"key": await platform.env.KV_BINDING_NAME.get("key")
}
}
}
</script>

<script>
// Now your KV value is on your key.
export let key;
</script>

etc...
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?