@svelte-vitals/vite 0.4.0 → 0.5.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.
@@ -24,7 +24,16 @@ function parseHtmlHead(html) {
24
24
  for (const link of head.querySelectorAll("link")) {
25
25
  const rel = link.getAttribute("rel");
26
26
  if (!rel) continue;
27
- tags.push({ kind: "link", rel, presence: "own", value: attrValue(link.getAttribute("href")) });
27
+ const asAttr = link.getAttribute("as");
28
+ const hasCrossorigin = link.hasAttribute("crossorigin");
29
+ tags.push({
30
+ kind: "link",
31
+ rel,
32
+ presence: "own",
33
+ value: attrValue(link.getAttribute("href")),
34
+ ...asAttr != null ? { hasAs: true, as: asAttr } : {},
35
+ ...hasCrossorigin ? { hasCrossorigin: true } : {}
36
+ });
28
37
  }
29
38
  for (const script of head.querySelectorAll("script")) {
30
39
  if (script.getAttribute("type") === "application/ld+json") {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseHtmlHead
3
- } from "../chunk-3MTVPSNS.js";
3
+ } from "../chunk-AHRJ6LY3.js";
4
4
 
5
5
  // src/hooks/handle.ts
6
6
  import { DEV } from "esm-env";
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseHtmlHead
3
- } from "./chunk-3MTVPSNS.js";
3
+ } from "./chunk-AHRJ6LY3.js";
4
4
 
5
5
  // src/plugin.ts
6
6
  import { existsSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svelte-vitals/vite",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Vite/SvelteKit plugin for svelte-vitals — analyzes prerendered HTML during vite build.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "esm-env": "^1.2.2",
43
43
  "node-html-parser": "^6.1.13",
44
44
  "tinyglobby": "^0.2.17",
45
- "@svelte-vitals/core": "0.11.0"
45
+ "@svelte-vitals/core": "0.12.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@sveltejs/kit": "^2.0.0",