Sierra guide / Building
Configuration
Everything Sierra does at build time is read from one file, sierra.config.js. A key you leave out has a default, so a small app states two or three of them.
// config/sierra.config.js
export default {
target: 'static',
siteUrl: 'https://example.com',
llms: true,
document: { lang: 'en', bodyClass: 'app theme-default' },
}
What else it can do
targetpicks'spa'(the default),'static'or'widget'routesDir,outDirandbasemove the routes folder, the build output and the public pathtrailingSlashis'always','never'or'preserve'junction: { url, apiPrefix, tokenKey, cookieAuth, … }wires the browser to the API, as data onlyschemanames the.litefile, orfalseto turn seeding offtheme,analyticsanddevtoolsswitch on those features and hand them their optionsautoImportlists the components and module bindings that need no importsiteUrlfeeds the sitemap, andllmsandmarkdownPagesemitllms.txtand a markdown copy of each pageofflineandpushwrite a service worker with a precache list and Web Push handlersfunctionspoints at a directory of host functions that answer their own pathpluginsadds Vite plugins, andviteis deep-merged over everything last
In depth: README § Configuration