Configuration reference
Configuration reference
Section titled “Configuration reference”Slida looks for one config file in the project root. If no config file exists, Slida uses an empty config. If multiple config files exist, Slida stops and asks you to keep only one.
Supported filenames
Section titled “Supported filenames”Slida supports these filenames:
slida.config.tsslida.config.jsslida.config.mjsslida.config.mtsslida.config.cjsslida.config.cts
The config file must default-export a plain object.
Use defineConfig() for TypeScript help:
import { fileURLToPath } from "node:url";
import { defineConfig } from "@slida/cli";
export default defineConfig({ port: 4321, theme: "google-basic", astro: { vite: { resolve: { alias: { "@slides": fileURLToPath(new URL("./slides", import.meta.url)), }, }, }, },});Public fields
Section titled “Public fields”| Field | Type | Description |
|---|---|---|
port |
number |
Default dev-server port. A CLI --port value overrides this. |
theme |
string |
Built-in theme name, installed npm package specifier, or auto-downloaded npm:package[@version]. |
astro |
AstroInlineConfig subset |
Extra Astro config Slida allows users to provide. |
Astro boundary
Section titled “Astro boundary”Slida owns the runtime Astro fields that are required to build and preview decks.
Do not configure these fields through slida.config.*:
rootsrcDirconfigFileoutputserveroutDirlogLeveldevToolbar
Slida also strips nested Vite root from user-provided astro.vite config.
User Vite plugins and aliases are appended after Slida’s required runtime plugins and aliases.
CLI precedence
Section titled “CLI precedence”For slida open, the dev-server port is resolved in this order:
--portor-pfrom the command line.portfromslida.config.*.- Slida’s default port,
4321.