@svelte-vitals/vite 0.30.0 → 0.30.1

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.
@@ -107,9 +107,9 @@ function parseHtmlHead(html) {
107
107
  });
108
108
  }
109
109
  for (const link of head.querySelectorAll("link")) {
110
- const rel = link.getAttribute("rel");
110
+ const rel = link.getAttribute("rel")?.toLowerCase();
111
111
  if (!rel) continue;
112
- const asAttr = link.getAttribute("as");
112
+ const asAttr = link.getAttribute("as")?.toLowerCase();
113
113
  const hasCrossorigin = link.hasAttribute("crossorigin");
114
114
  const hreflang = link.getAttribute("hreflang");
115
115
  const href = link.getAttribute("href");
@@ -2,7 +2,7 @@ import {
2
2
  isLoopbackOrigin,
3
3
  parseHtmlHead,
4
4
  toOccurrenceMap
5
- } from "../chunk-VLQYXCE6.js";
5
+ } from "../chunk-6FDRI4Q6.js";
6
6
 
7
7
  // src/hooks/handle.ts
8
8
  import { DEV } from "esm-env";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  collectRenderedHeads,
3
3
  isLoopbackOrigin
4
- } from "./chunk-VLQYXCE6.js";
4
+ } from "./chunk-6FDRI4Q6.js";
5
5
 
6
6
  // src/plugin.ts
7
7
  import { existsSync } from "fs";
@@ -589,14 +589,18 @@ function svelteVitals(options = {}) {
589
589
  validateRulesOption(options.rules);
590
590
  validateOverridesOption(options.overrides, options.rules);
591
591
  let root = options.cwd ?? process.cwd();
592
- let minifyFlag;
592
+ let minify;
593
+ let configFile;
593
594
  const buildPlugin = {
594
595
  name: "svelte-vitals",
595
596
  apply: "build",
596
597
  enforce: "post",
598
+ config(userConfig) {
599
+ minify = userConfig.build?.minify;
600
+ },
597
601
  configResolved(config) {
598
602
  if (!options.cwd) root = config.root;
599
- if (!config.build.ssr) minifyFlag = { minify: config.build.minify, configFile: config.configFile };
603
+ configFile = config.configFile;
600
604
  },
601
605
  async closeBundle() {
602
606
  const pagesDir = options.prerenderDir ? options.prerenderDir : join3(root, DEFAULT_PRERENDER_DIR);
@@ -605,7 +609,7 @@ function svelteVitals(options = {}) {
605
609
  const resolvedConfig = await resolveConfig(root, options);
606
610
  let result;
607
611
  try {
608
- const viteMinifyDisabled = minifyFlag ? await resolveMinifyDisabled(minifyFlag.minify, minifyFlag.configFile, root) : void 0;
612
+ const viteMinifyDisabled = await resolveMinifyDisabled(minify, configFile, root);
609
613
  result = await analyze(
610
614
  resolved,
611
615
  root,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svelte-vitals/vite",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
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",
@@ -42,8 +42,8 @@
42
42
  "esm-env": "^1.2.2",
43
43
  "node-html-parser": "^9.0.1",
44
44
  "tinyglobby": "^0.2.17",
45
- "@svelte-vitals/core": "0.43.0",
46
- "svelte-vitals": "0.47.0"
45
+ "@svelte-vitals/core": "0.43.1",
46
+ "svelte-vitals": "0.47.1"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@sveltejs/kit": "^2.70.2",