@svelte-vitals/core
v0.55.2
Published
Shared, runtime-agnostic core for svelte-vitals (types, rule engine, scorer, reporter).
Maintainers
Readme
@svelte-vitals/core
Runtime-agnostic core for svelte-vitals: shared types, the rule engine, scorer, and reporters, plus the full rule set across six categories: SEO, Performance, Correctness, Security, Architecture, Accessibility.
This package is mode-independent and contains no I/O. It operates on a normalized ResolvedHead[] intermediate representation, so the same rules run unchanged whether heads come from static source analysis (the svelte-vitals CLI) or from prerendered HTML (the @svelte-vitals/vite plugin). It has zero runtime dependencies and no node: imports.
Most users don't depend on this directly; install
svelte-vitalsinstead. This package is for building tools on top of the shared engine.
ESM-only (Node 24.16+). Ships ES modules only;
require()is unsupported by design.
Entry points
| Entry | Contents | Stability |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| @svelte-vitals/core | defineConfig and the config types; the JsonReport types for reading a report; summarize, hasFailureAtOrAbove, formatGithubReport, formatMarkdownReport for rendering one and gating on it | Follows semver. For the renderers, that covers the function, not the text it returns, which stays human-readable and may change. |
| @svelte-vitals/core/internal | The engine, rules, fact collection, reporters, and scoring, which is what the CLI and the Vite plugin share | No guarantee. Anything here may change in any release, including a patch. |
Reach for /internal only if you accept pinning an exact version. If something there is what you
actually need, open an issue. The point of the split is that promoting a name into the stable
entry is an additive change.
