astro-webvitalsv0.4.9

← All examples

Default component output

What <WebVitals /> adds to a statically built page: the resolved configuration as an inline script and one module script from the site’s own origin. Captured from dist/index.html of the demo build, formatted for reading.

Default component output

examples/output/default.html
---
import { WebVitals } from "@casoon/astro-webvitals";
---

<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Default</title>
	</head>
	<body>
		<h1>Default</h1>
		<WebVitals />
	</body>
</html>
<script>(function(){const config = {
  "debug": false,
  "consoleDock": false,
  "position": "bottom-right",
  "desktopPositions": {
    "top-right": "top: 16px; right: 16px;",
    "top-left": "top: 16px; left: 16px;",
    "bottom-right": "bottom: 16px; right: 16px;",
    "bottom-left": "bottom: 16px; left: 16px;"
  },
  "mobilePosition": "bottom: 0; left: 0; right: 0;",
  "batchReporting": true,
  "batchInterval": 5000,
  "checkAccessibility": false,
  "highlightAccessibility": false,
  "extendedMetrics": false,
  "smartDetection": false,
  "performanceBudget": {
    "LCP": 2500,
    "CLS": 0.1,
    "FCP": 1800,
    "TTFB": 800,
    "INP": 200
  },
  "headers": {},
  "sampleRate": 1,
  "trackSoftNavigations": false,
  "attribution": false,
  "trackLongTasks": false,
  "maxBatchSize": 10,
  "retryFailedMetrics": false,
  "respectDnt": false,
  "consent": true,
  "dashboard": false
};
window.__WEBVITALS_CONFIG__ = config;
})();</script>
<script type="module" src="/_astro/WebVitals.astro_astro_type_script_index_0_lang.KhS4lISl.js"></script>
  • WebVitals
  • defaults
  • static build