Mixins / API

foldkit-mixins/vite

foldkit-mixins/vite: the application's stylesheet as a file. A server that writes the sheet into every page sends it every time and has its framework parse it again to check the page; a hashed file is fetched once and cached. The plugin builds the sheet module, writes assets/styles-<hash>.css into the browser build, and gives the server entry its address:

ts
import { href } from 'virtual:foldkit-styles'

In dev the same href serves the sheet from the dev server, so the server entry has one code path.

Functions

stylesThe plugin: see the module's comment.

Interfaces