Changelog
[0.27.23] 2024-11-23
min
, max
and range
validators by @YonatanKraEntityError
- now when insert/update etc... fail they throw this specific error.Changelog
[0.27.22] 2024-11-08
Improved support for sveltekit ssr. To configure:
To enable remult across all sveltekit route
// src/hooks.server.ts
import { api } from './server/api'
export const handle = api
To Use remult in ssr PageLoad
- this will leverage the event
's fetch to load data on the server without reloading it on the frontend, and abiding to all api rules even when it runs on the server
// src/routes/+page.ts
import { remult } from 'remult'
import type { PageLoad } from './$types'
export const load = (async (event) => {
// Instruct remult to use the special svelte fetch to fetch data on server side page load
remult.useFetch(event.fetch)
return repo(Task).find()
}) satisfies PageLoad