@uniweb/build 0.47.0 → 0.47.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@uniweb/schemas": "^0.2.13"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@uniweb/runtime": "^0.
|
|
68
|
+
"@uniweb/runtime": "^0.21.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@tailwindcss/vite": "^4.0.0",
|
|
75
75
|
"@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
|
|
76
76
|
"vite-plugin-svgr": "^4.0.0",
|
|
77
|
-
"@uniweb/core": "^0.26.
|
|
77
|
+
"@uniweb/core": "^0.26.2"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"vite": {
|
|
@@ -7,9 +7,14 @@
|
|
|
7
7
|
* indexes natively).
|
|
8
8
|
*
|
|
9
9
|
* Selecting `host: generic-static` explicitly opts out of the Netlify
|
|
10
|
-
* `_redirects` output.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* `_redirects` output. A page with `redirect:` still emits its
|
|
11
|
+
* meta-refresh HTML (handled inside prerender.js), so redirects keep
|
|
12
|
+
* working without host help.
|
|
13
|
+
*
|
|
14
|
+
* ⛔ **`rewrite:` does NOT — this comment used to claim it did.** A rewrite
|
|
15
|
+
* is a proxy: the URL stays and the body comes from an upstream, which no
|
|
16
|
+
* static host can do. Prerender writes nothing for such a page, so the
|
|
17
|
+
* route is absent rather than degraded.
|
|
13
18
|
*/
|
|
14
19
|
|
|
15
20
|
const adapter = {
|
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
* postBuild: writes `dist/.nojekyll` (empty file).
|
|
14
14
|
*
|
|
15
15
|
* GitHub Pages does not consume `_redirects` (that's a
|
|
16
|
-
* Cloudflare/Netlify thing) — page
|
|
17
|
-
* meta-refresh HTML the prerender
|
|
18
|
-
*
|
|
16
|
+
* Cloudflare/Netlify thing) — a page's `redirect:` goes through the
|
|
17
|
+
* meta-refresh HTML the prerender emits for it.
|
|
18
|
+
*
|
|
19
|
+
* ⛔ **`rewrite:` DOES NOT WORK HERE, and this comment used to say it did.**
|
|
20
|
+
* A rewrite is a PROXY — the path keeps its URL and is served from an
|
|
21
|
+
* upstream (`/proxied/* https://upstream/:splat 200` on a host that has a
|
|
22
|
+
* redirects layer). That needs a server. Prerender deliberately writes
|
|
23
|
+
* nothing for a `rewrite:` page, so on this host the route is simply
|
|
24
|
+
* absent. Use `redirect:` if a visible URL change is acceptable.
|
|
19
25
|
*
|
|
20
26
|
* Two ways to publish, both supported:
|
|
21
27
|
*
|
package/src/prerender.js
CHANGED
|
@@ -981,9 +981,14 @@ export async function prerenderSite(siteDir, options = {}) {
|
|
|
981
981
|
continue
|
|
982
982
|
}
|
|
983
983
|
|
|
984
|
-
// Rewrite pages: served by an external site, skip rendering entirely
|
|
984
|
+
// Rewrite pages: served by an external site, skip rendering entirely.
|
|
985
|
+
// ⛔ NO FILE IS WRITTEN, ON ANY HOST — a rewrite is a PROXY (the URL stays,
|
|
986
|
+
// the body comes from upstream), so it can only be served by a host with a
|
|
987
|
+
// redirects layer: `_redirects` spells it `200`, not `302`. Where that layer
|
|
988
|
+
// does not exist the route is ABSENT, not degraded — so the line says what
|
|
989
|
+
// did not happen, which is the only signal an author gets here.
|
|
985
990
|
if (page.rewrite) {
|
|
986
|
-
onProgress(` Rewrite ${outputRoute} → ${page.rewrite}`)
|
|
991
|
+
onProgress(` Rewrite ${outputRoute} → ${page.rewrite} (no page emitted — needs a host that proxies)`)
|
|
987
992
|
continue
|
|
988
993
|
}
|
|
989
994
|
|