@gusnips/vite 0.8.1 → 0.8.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/README.md +7 -1
- package/dist/sitemap.d.ts +10 -1
- package/dist/sitemap.d.ts.map +1 -1
- package/dist/sitemap.js +10 -1
- package/dist/sitemap.js.map +1 -1
- package/package.json +1 -1
- package/src/sitemap.ts +10 -1
package/README.md
CHANGED
|
@@ -103,7 +103,13 @@ their folders — `/guides/errors` → `guides/errors.html`.
|
|
|
103
103
|
|
|
104
104
|
Every address your app puts in a canonical or a sitemap has to answer 200 rather than redirect. On
|
|
105
105
|
Cloudflare Pages that means flat files: it serves `pricing/index.html` at `/pricing/` and answers
|
|
106
|
-
`/pricing` with a 308. A flat file answers
|
|
106
|
+
`/pricing` with a 308. A flat file answers `/pricing` with a 200 and normalizes `/pricing/` to it
|
|
107
|
+
with a 308 — so the form you advertise is the form that is a page, which is the whole point.
|
|
108
|
+
|
|
109
|
+
This page said "a flat file answers both" until somebody ran the `curl -I` the next paragraph asks
|
|
110
|
+
for: `/precos/` came back `308`, `location: /precos`. Nothing about the rule changed, but the
|
|
111
|
+
detail matters when you are deciding whether a slash-tolerant hydration check is fixing anything —
|
|
112
|
+
on a host that normalizes, the browser is redirected before your bundle runs, so it never can.
|
|
107
113
|
|
|
108
114
|
Hosts differ, though. Firebase Hosting redirects `/pricing` to `/pricing/` by default, and serves
|
|
109
115
|
`pricing/index.html` at `/pricing` itself once `trailingSlash` is `false`. On a host like that,
|
package/dist/sitemap.d.ts
CHANGED
|
@@ -5,7 +5,16 @@ import type { Alternate } from "./head.ts";
|
|
|
5
5
|
* FLAT (`pricing.html`), not directory-style (`pricing/index.html`). Cloudflare Pages serves
|
|
6
6
|
* the directory form at `/pricing/` and answers `/pricing` with a 308 to it — so every address
|
|
7
7
|
* the app advertises in its canonical and its sitemap would be a redirect rather than a page.
|
|
8
|
-
* A flat file
|
|
8
|
+
* A flat file answers `/pricing` — the address the canonical and the sitemap name — with a 200,
|
|
9
|
+
* and normalizes `/pricing/` to it with a 308.
|
|
10
|
+
*
|
|
11
|
+
* This said "200 either way" until somebody measured it. On a live Pages deployment `/precos/`
|
|
12
|
+
* answers `308` with `location: /precos`, which then answers 200. The rule is untouched by that
|
|
13
|
+
* — the ADVERTISED form is the one that must be a page, and it is — but the parenthetical was
|
|
14
|
+
* inherited from a donor comment and repeated into an adopter's commit message as a live bug
|
|
15
|
+
* before anyone checked. It also has a consequence worth knowing: on a host that normalizes,
|
|
16
|
+
* `hydrateOrMount`'s slash tolerance can never fire, because the browser is redirected before it
|
|
17
|
+
* runs. That tolerance earns its place on hosts that serve both forms, not on this one.
|
|
9
18
|
*
|
|
10
19
|
* That is Cloudflare Pages, not every host. Firebase Hosting serves the directory form at
|
|
11
20
|
* `/pricing` itself with `trailingSlash: false`, and an adopter there names its own files. What
|
package/dist/sitemap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../src/sitemap.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../src/sitemap.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM9C;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC5F;AAED;+CAC+C;AAC/C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,QAAQ,EAAE,MAAM,CAAC;IACjB;iEAC6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;iFAC6E;IAC7E,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;CACnC;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAyBnE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAYjG;AAED,MAAM,WAAW,aAAa;IAC5B;;uFAEmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf;;;;iDAI6C;IAC7C,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B;0FACsF;IACtF,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAa,EAAE,EAAE,aAAa,GAAG,MAAM,CAQpF"}
|
package/dist/sitemap.js
CHANGED
|
@@ -11,7 +11,16 @@ import { escapeAttr } from "./escape.js";
|
|
|
11
11
|
* FLAT (`pricing.html`), not directory-style (`pricing/index.html`). Cloudflare Pages serves
|
|
12
12
|
* the directory form at `/pricing/` and answers `/pricing` with a 308 to it — so every address
|
|
13
13
|
* the app advertises in its canonical and its sitemap would be a redirect rather than a page.
|
|
14
|
-
* A flat file
|
|
14
|
+
* A flat file answers `/pricing` — the address the canonical and the sitemap name — with a 200,
|
|
15
|
+
* and normalizes `/pricing/` to it with a 308.
|
|
16
|
+
*
|
|
17
|
+
* This said "200 either way" until somebody measured it. On a live Pages deployment `/precos/`
|
|
18
|
+
* answers `308` with `location: /precos`, which then answers 200. The rule is untouched by that
|
|
19
|
+
* — the ADVERTISED form is the one that must be a page, and it is — but the parenthetical was
|
|
20
|
+
* inherited from a donor comment and repeated into an adopter's commit message as a live bug
|
|
21
|
+
* before anyone checked. It also has a consequence worth knowing: on a host that normalizes,
|
|
22
|
+
* `hydrateOrMount`'s slash tolerance can never fire, because the browser is redirected before it
|
|
23
|
+
* runs. That tolerance earns its place on hosts that serve both forms, not on this one.
|
|
15
24
|
*
|
|
16
25
|
* That is Cloudflare Pages, not every host. Firebase Hosting serves the directory form at
|
|
17
26
|
* `/pricing` itself with `trailingSlash: false`, and an adopter there names its own files. What
|
package/dist/sitemap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap.js","sourceRoot":"","sources":["../src/sitemap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC
|
|
1
|
+
{"version":3,"file":"sitemap.js","sourceRoot":"","sources":["../src/sitemap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAiB;IACxC,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAClE,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,OAAO,CAAC;AAC3D,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AC"}
|
package/package.json
CHANGED
package/src/sitemap.ts
CHANGED
|
@@ -15,7 +15,16 @@ import type { Alternate } from "./head.ts";
|
|
|
15
15
|
* FLAT (`pricing.html`), not directory-style (`pricing/index.html`). Cloudflare Pages serves
|
|
16
16
|
* the directory form at `/pricing/` and answers `/pricing` with a 308 to it — so every address
|
|
17
17
|
* the app advertises in its canonical and its sitemap would be a redirect rather than a page.
|
|
18
|
-
* A flat file
|
|
18
|
+
* A flat file answers `/pricing` — the address the canonical and the sitemap name — with a 200,
|
|
19
|
+
* and normalizes `/pricing/` to it with a 308.
|
|
20
|
+
*
|
|
21
|
+
* This said "200 either way" until somebody measured it. On a live Pages deployment `/precos/`
|
|
22
|
+
* answers `308` with `location: /precos`, which then answers 200. The rule is untouched by that
|
|
23
|
+
* — the ADVERTISED form is the one that must be a page, and it is — but the parenthetical was
|
|
24
|
+
* inherited from a donor comment and repeated into an adopter's commit message as a live bug
|
|
25
|
+
* before anyone checked. It also has a consequence worth knowing: on a host that normalizes,
|
|
26
|
+
* `hydrateOrMount`'s slash tolerance can never fire, because the browser is redirected before it
|
|
27
|
+
* runs. That tolerance earns its place on hosts that serve both forms, not on this one.
|
|
19
28
|
*
|
|
20
29
|
* That is Cloudflare Pages, not every host. Firebase Hosting serves the directory form at
|
|
21
30
|
* `/pricing` itself with `trailingSlash: false`, and an adopter there names its own files. What
|