astro-webvitalsv0.4.9

← All examples

Dashboard route

webVitalsDashboard() injects a prerendered route at /__web-vitals, marked noindex, nofollow. It reads what <WebVitals dashboard /> stored in the same browser.

Dashboard route

examples/output/routes.txt
import { webVitalsDashboard } from "@casoon/astro-webvitals/integration";
import { defineConfig } from "astro/config";

// Demo project for the website showcase. `node examples/capture.mjs` builds it and
// writes what the component and the integration generate to examples/output/.
export default defineConfig({
	integrations: [webVitalsDashboard()],
});
$ astro build   # examples/demo

Pages in dist/:
  __web-vitals/index.html   <- injected by webVitalsDashboard()
  index.html
  local/index.html
  production/index.html

__web-vitals/index.html:
  <meta name="robots" content="noindex, nofollow">
  <script type="module" src="/_astro/dashboard.astro_astro_type_script_index_0_lang.YQl8rvJm.js">
  • webVitalsDashboard
  • integration
  • localStorage