Skip to content

Config

config

Svelte config gold-standard checks — svelte.config.js presence.

A SvelteKit project must ship a svelte.config.{js,ts} (it drives the compiler, adapters and $lib aliases). This is the svelte delta over the shared node manifest checks.

check_svelte_config(project)

Check: a svelte.config.{js,ts} is present at the project root.

Source code in packages/axm-init/src/axm_init/checks/svelte/config.py
Python
def check_svelte_config(project: Path) -> CheckResult:
    """Check: a ``svelte.config.{js,ts}`` is present at the project root."""
    if any((project / name).is_file() for name in _SVELTE_CONFIGS):
        return CheckResult(
            name="config.svelte_config",
            category="config",
            passed=True,
            weight=3,
            message="svelte.config found",
            details=[],
            fix="",
        )
    return CheckResult(
        name="config.svelte_config",
        category="config",
        passed=False,
        weight=3,
        message="No svelte.config.js",
        details=[],
        fix="Add a svelte.config.js (SvelteKit project config).",
    )