Build tooling
The Vite plugin, the ESLint config, the dev settings widget and Sentry helpers.
Configuration a theme touches in its build files, not in its pages: twilightReact() in vite.config.ts, the shared ESLint rules, the development-only settings widget, and error reporting.
Entries
The one Vite plugin call in a theme's vite.config.ts: server rendering, a route for every storefront page, translations and build checks.
twilightEslintConfigA shared ESLint config that warns on engine barrel imports, deep imports into component folders, window.location and document queries.
bestPracticesPluginThe build-time code check twilightReact() already runs: six rules print colored findings in the terminal during vite build, never failing it.
DevSettingsWidgetA development-only floating panel that lists your twilight.json settings and home-component fields with defaults, and previews edited values in vite dev.
initThemeSentryStarts Sentry error reporting in the shopper's browser, tagged with your theme name; does nothing unless a DSN was set when the theme was built.
withThemeSentryWraps the server's request handler so errors during server rendering are reported to Sentry, tagged with the theme name and the store host.
REACT_THEME_TYPE & manifest helpersNode helpers that check twilight.json declares "type": "react", the line that tells the Salla CLI this is a React theme.
DevSchema typesThe simplified shape of twilight.json settings and components that virtual:twilight/schema exports and DevSettingsWidget draws.
getFrameworkAdapter, tanstack & nextjsThe adapter objects behind twilightReact(): tanstack generates route files and returns the Vite plugins; nextjs is a placeholder whose methods throw.
TwilightRoute & option typesSupporting types of /vite: one row of the generated route table, the framework names, and option shapes twilightReact() accepts but ignores.