@timber-js/app 0.2.0-alpha.141 → 0.2.0-alpha.142
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/client/nuqs-adapter.d.ts +1 -1
- package/dist/client/nuqs-adapter.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/server/early-hints.d.ts.map +1 -1
- package/dist/server/internal.js.map +1 -1
- package/package.json +3 -3
- package/src/server/build-manifest.ts +6 -6
- package/src/server/early-hints.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timber-js/app",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.142",
|
|
4
4
|
"description": "Vite-native React framework built for Servers and Serverless Platforms — correct HTTP semantics, real status codes, pages that work without JavaScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare-workers",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@content-collections/vite": "^0.2.0",
|
|
133
133
|
"@mdx-js/rollup": "^3.0.0",
|
|
134
134
|
"@vitejs/plugin-react": "^6.0.0",
|
|
135
|
-
"@vitejs/plugin-rsc": ">=0.5.
|
|
135
|
+
"@vitejs/plugin-rsc": ">=0.5.27",
|
|
136
136
|
"nuqs": "^2.0.0",
|
|
137
137
|
"react": "19.3.0-canary-d5736f09-20260507",
|
|
138
138
|
"react-dom": "19.3.0-canary-d5736f09-20260507",
|
|
@@ -163,4 +163,4 @@
|
|
|
163
163
|
"engines": {
|
|
164
164
|
"node": ">=22.12.0"
|
|
165
165
|
}
|
|
166
|
-
}
|
|
166
|
+
}
|
|
@@ -92,12 +92,12 @@ export function collectRouteCss(segments: SegmentWithFiles[], manifest: BuildMan
|
|
|
92
92
|
* via injectHead() before </head>.
|
|
93
93
|
*/
|
|
94
94
|
export function buildCssLinkTags(cssUrls: string[]): string {
|
|
95
|
-
// Emit <link rel="stylesheet">
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
95
|
+
// Emit only <link rel="stylesheet"> — no preload tags. CSS preloading
|
|
96
|
+
// is handled by 103 Early Hints (Link header) which fires before the
|
|
97
|
+
// HTML stream. Float also emits `<link rel="stylesheet" data-precedence>`
|
|
98
|
+
// at the top of <head> during Fizz rendering — the browser discovers
|
|
99
|
+
// CSS from that tag. A <link rel="preload"> here would arrive *after*
|
|
100
|
+
// Float's stylesheet tag and trigger "Preload was ignored" warnings.
|
|
101
101
|
return cssUrls.map((url) => `<link rel="stylesheet" href="${url}">`).join('');
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -127,6 +127,8 @@ export function collectEarlyHintHeaders(
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
// Per-route CSS — as=style; rel=preload
|
|
130
|
+
// The HTML <head> also contains a matching <link rel="preload" as="style">
|
|
131
|
+
// tag so browsers can deduplicate the 103 hint against the HTML tag.
|
|
130
132
|
for (const url of collectRouteCss(segments, manifest)) {
|
|
131
133
|
add(url, formatLinkHeader({ href: url, rel: 'preload', as: 'style' }));
|
|
132
134
|
}
|