@unhead/shared 1.7.0 → 1.7.2

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.
package/dist/index.cjs CHANGED
@@ -664,10 +664,12 @@ function tagWeight(tag) {
664
664
  if (typeof priority === "number")
665
665
  return priority;
666
666
  if (tag.tag === "meta") {
667
+ if (tag.props["http-equiv"] === "content-security-policy")
668
+ weight = -30;
667
669
  if (tag.props.charset)
668
670
  weight = -20;
669
- if (tag.props["http-equiv"] === "content-security-policy")
670
- weight = 0;
671
+ if (tag.props.name === "viewport")
672
+ weight = -15;
671
673
  } else if (tag.tag === "link" && tag.props.rel === "preconnect") {
672
674
  weight = 20;
673
675
  } else if (tag.tag in TAG_WEIGHTS) {
package/dist/index.mjs CHANGED
@@ -662,10 +662,12 @@ function tagWeight(tag) {
662
662
  if (typeof priority === "number")
663
663
  return priority;
664
664
  if (tag.tag === "meta") {
665
+ if (tag.props["http-equiv"] === "content-security-policy")
666
+ weight = -30;
665
667
  if (tag.props.charset)
666
668
  weight = -20;
667
- if (tag.props["http-equiv"] === "content-security-policy")
668
- weight = 0;
669
+ if (tag.props.name === "viewport")
670
+ weight = -15;
669
671
  } else if (tag.tag === "link" && tag.props.rel === "preconnect") {
670
672
  weight = 20;
671
673
  } else if (tag.tag in TAG_WEIGHTS) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/shared",
3
3
  "type": "module",
4
- "version": "1.7.0",
4
+ "version": "1.7.2",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -34,7 +34,7 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@unhead/schema": "1.7.0"
37
+ "@unhead/schema": "1.7.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "packrup": "^0.1.0"