Loading...
Loading...
The ossido.config.ts shape: server options, Vite passthrough, logging, SSR render threads, output mode, build hooks, and view transitions.
interface OssidoConfig {
server?: Partial<OssidoConfigServer>;
vite?: {
alias?: AliasOptions;
css?: CSSOptions;
optimizeDeps?: DepOptimizationOptions;
plugins?: Array<PluginOption>;
};
logging?: OssidoConfigLogging;
dev?: OssidoConfigDev;
ssr?: OssidoConfigSsr;
/**
* Default build output mode. Default `'server'`.
* - `'server'`: build the SSR server (`ossido build`).
* - `'static'`: statically generate the site (equivalent to `ossido build
* --static`).
*
* The `--static` / `--server` CLI flags override this per invocation.
*/
output?: OssidoConfigOutput;
/** Build lifecycle hooks (`ossido build`, both output modes; not `dev`). */
build?: OssidoConfigBuild;
/**
* Override which `.env` file(s) are loaded, as a path or array of paths
* (relative to the project root, loaded in order - a later file overrides an
* earlier one). When set, this **replaces** the default
* `.env` / `.env.local` / `.env.[mode]` cascade. Leave unset to keep the
* default cascade.
*
* Only meaningful alongside an `#[ossido::Environment]` struct, which defines
* the typed schema these variables populate.
*/
env?: string | Array<string>;
/**
* Animate client-side navigations with the browser
* [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API).
* Default `false`. When enabled, `push`/`replace`/`<Link>`/back-forward
* navigations run inside `document.startViewTransition` (a crossfade by
* default; customise with `view-transition-name` / `::view-transition-*` CSS).
* No-ops where unsupported or under `prefers-reduced-motion`; override per
* navigation with `push(path, { viewTransition: false })` or
* `<Link viewTransition={false}>`.
*/
viewTransitions?: boolean;
}import type { OssidoConfig } from '@ossido-labs/ossido/config';
const config: OssidoConfig = {
output: 'static',
server: { port: 3000 },
};
export default config;