@svelte-vitals/vite 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -12
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  Vite/SvelteKit plugin for [svelte-vitals](https://github.com/oekazuma/svelte-vitals). Two things in one package:
6
6
 
7
- - Build-time gate — piggybacks on `vite build`, parses the **prerendered HTML** (head metadata, images, headings, landmarks and ids), and runs the same rule engine as the CLI (SEO, Performance, Correctness, Security, Architecture, Accessibility) — library-agnostic, because it inspects the real output. Fails the build when findings reach `failOn`.
8
- - Live dev dashboard — on by default during `vite dev`: a searchable, filterable code-health dashboard at `/__svelte-vitals/`, covering the whole project from startup via static analysis, refined to real rendered values as you browse.
7
+ - Build-time gate: hooks into `vite build`, parses the prerendered HTML (head metadata, images, headings, landmarks and ids), and runs the same rule engine as the CLI (SEO, Performance, Correctness, Security, Architecture, Accessibility). It works with any metadata library, because it inspects the real output. Fails the build when findings reach `failOn`.
8
+ - Live dev dashboard, on by default during `vite dev`: a searchable, filterable code-health dashboard at `/__svelte-vitals/`, covering the whole project from startup via static analysis, refined to real rendered values as you browse.
9
9
 
10
10
  > **ESM-only** (Node 24.16+). Ships ES modules only; `require()` is unsupported by design.
11
11
 
@@ -21,20 +21,20 @@ export default {
21
21
  };
22
22
  ```
23
23
 
24
- `vite dev` prints the dashboard's URL next to its own `Local:`/`Network:` lines. Add the `svelteVitalsHandle` hook (from `@svelte-vitals/vite/hooks`) to `src/hooks.server.ts` for per-route `measured` accuracy as you browse — the dashboard works without it too, from whole-project static analysis alone.
24
+ `vite dev` prints the dashboard's URL next to its own `Local:`/`Network:` lines. Add the `svelteVitalsHandle` hook (from `@svelte-vitals/vite/hooks`) to `src/hooks.server.ts` for per-route `measured` accuracy as you browse. The dashboard works without it too, from whole-project static analysis alone.
25
25
 
26
26
  ## Options
27
27
 
28
- - `failOn` — minimum severity that fails the build (default `critical`).
29
- - `report` — `'console' | 'json' | false` (default `console`).
30
- - `outFile` — write the JSON report to a path.
31
- - `rules` / `metaComponents` / `treatDynamicAs` — same as the CLI/core config.
32
- - `weights` — per-category weight overrides for the combined Health score.
33
- - `prerenderDir` — override the prerendered-pages directory.
34
- - `cwd` — project root (defaults to the Vite config root).
35
- - `ui` — serve the live dev dashboard (default `true`); pass `false` to keep only the build-time gate.
28
+ - `failOn`: minimum severity that fails the build (default `critical`).
29
+ - `report`: `'console' | 'json' | false` (default `console`).
30
+ - `outFile`: write the JSON report to a path.
31
+ - `rules` / `metaComponents` / `treatDynamicAs`: same as the CLI/core config.
32
+ - `weights`: per-category weight overrides for the combined Health score.
33
+ - `prerenderDir`: override the prerendered-pages directory.
34
+ - `cwd`: project root (defaults to the Vite config root).
35
+ - `ui`: serve the live dev dashboard (default `true`); pass `false` to keep only the build-time gate.
36
36
 
37
- At build time the **HTML** check covers prerendered routes only; the source scan applies project-wide. SSR and dynamic routes have no build output, so nothing checks their rendered HTML here — the `svelte-vitals` CLI covers them by source analysis, and browsing them during `vite dev` gets the live dashboard a rendered reading.
37
+ At build time the HTML check covers prerendered routes only; the source scan applies project-wide. SSR and dynamic routes have no build output, so nothing checks their rendered HTML here. The `svelte-vitals` CLI covers them by source analysis, and browsing them during `vite dev` gets the live dashboard a rendered reading.
38
38
 
39
39
  See [Live dashboard](https://oekazuma.github.io/svelte-vitals/guides/dev-dashboard/) and [Plugin mode](https://oekazuma.github.io/svelte-vitals/guides/plugin-mode/) for the full picture.
40
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svelte-vitals/vite",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Vite/SvelteKit plugin for svelte-vitals — analyzes prerendered HTML during vite build, plus a live dev dashboard.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,10 +44,10 @@
44
44
  "tinyglobby": "^0.2.17"
45
45
  },
46
46
  "peerDependencies": {
47
+ "@svelte-vitals/core": "^0.50.0",
47
48
  "@sveltejs/kit": "^2.70.3",
48
- "vite": "^8.2.2",
49
- "@svelte-vitals/core": "^0.49.0",
50
- "svelte-vitals": "^0.53.0"
49
+ "svelte-vitals": "^0.54.0",
50
+ "vite": "^8.2.2"
51
51
  },
52
52
  "peerDependenciesMeta": {
53
53
  "@sveltejs/kit": {
@@ -55,13 +55,13 @@
55
55
  }
56
56
  },
57
57
  "devDependencies": {
58
+ "@svelte-vitals/core": "0.50.0",
58
59
  "@sveltejs/kit": "^2.70.3",
59
60
  "@types/node": "^24.13.3",
60
61
  "happy-dom": "^20.11.6",
61
62
  "svelte": "^5.56.10",
62
- "vite": "^8.2.2",
63
- "svelte-vitals": "0.53.0",
64
- "@svelte-vitals/core": "0.49.0"
63
+ "svelte-vitals": "0.54.0",
64
+ "vite": "^8.2.2"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsdown",