@gusnips/vite 0.5.5 → 0.6.0
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 -0
- package/dist/node.d.ts +11 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +11 -0
- package/dist/node.js.map +1 -1
- package/package.json +2 -2
- package/src/node.ts +11 -0
package/README.md
CHANGED
|
@@ -81,6 +81,13 @@ stream, which lands them inside your body when you are filling one `<div>` rathe
|
|
|
81
81
|
a document — so those get stripped, and a render error is rethrown so a broken page fails the
|
|
82
82
|
build instead of shipping.
|
|
83
83
|
|
|
84
|
+
End your prerender script with `process.exit(0)`. Under bun, importing this renderer leaves the
|
|
85
|
+
process alive after the last file is written: `react-dom/server` exits, `react-dom/static.browser`
|
|
86
|
+
does not, and `process.getActiveResourcesInfo()` shows nothing either way, so the only symptom is a
|
|
87
|
+
script that finishes its work and never returns. Node exits either way. We do not call `exit` for
|
|
88
|
+
you — a library killing its host process is worse than the hang — and in CI the alternative is a
|
|
89
|
+
job that builds everything and then runs to its timeout.
|
|
90
|
+
|
|
84
91
|
## Flat files
|
|
85
92
|
|
|
86
93
|
That `pageFile` at the top writes `pricing.html`, not `pricing/index.html`. Nested routes keep
|
package/dist/node.d.ts
CHANGED
|
@@ -17,6 +17,17 @@ export declare function loadTemplate(distDir: string): Promise<string>;
|
|
|
17
17
|
* bundle, and a plugin running in `closeBundle` is inside the build that would have to have
|
|
18
18
|
* produced it. So the entry is a path on disk, written by `vite build --ssr src/entry-server.tsx`,
|
|
19
19
|
* and nothing in the source tree references it.
|
|
20
|
+
*
|
|
21
|
+
* **The calling script has to exit itself.** This import is where the renderer enters your
|
|
22
|
+
* process, and under bun `react-dom/static.browser` — which invariant 1 requires, so every app on
|
|
23
|
+
* this rig loads it — leaves that process alive after its last await. Measured by elimination with
|
|
24
|
+
* no app code at all: `react-dom/server` exits, `static.browser` does not, and
|
|
25
|
+
* `process.getActiveResourcesInfo()` reports nothing either way, so the handle is invisible to
|
|
26
|
+
* everything except the hang. Under node it exits. Nothing here can undo it — a library must not
|
|
27
|
+
* call `process.exit` on its host — so a prerender script ends with `process.exit(0)` once every
|
|
28
|
+
* file is written, and in CI the alternative is a job that does all its work and then runs to its
|
|
29
|
+
* timeout. Five adopters had already written that line against a DIFFERENT holder (an auth client
|
|
30
|
+
* whose token-refresh timer starts at module scope); none of them knew the renderer does it too.
|
|
20
31
|
*/
|
|
21
32
|
export declare function loadRenderer<Context = unknown>(entryFile: string): Promise<PageRenderer<Context>>;
|
|
22
33
|
/** Write one file under `dist`, creating the folders a nested route needs. */
|
package/dist/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUnE;AAWD
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUnE;AAWD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,YAAY,CAAC,OAAO,GAAG,OAAO,EAClD,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAOhC;AAED,8EAA8E;AAC9E,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9F;AAED,yEAAyE;AACzE,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,UAAU,CAAC;IAChB;gCAC4B;IAC5B,QAAQ,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB,CAAC,IAAI;IACvC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB;+CAC2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,+FAA+F;IAC/F,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAC7B,+FAA+F;IAC/F,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,EACvC,KAAK,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,KAAa,GACd,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAsB/C;AAgDD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiCrF"}
|
package/dist/node.js
CHANGED
|
@@ -56,6 +56,17 @@ function exportsRenderer(mod) {
|
|
|
56
56
|
* bundle, and a plugin running in `closeBundle` is inside the build that would have to have
|
|
57
57
|
* produced it. So the entry is a path on disk, written by `vite build --ssr src/entry-server.tsx`,
|
|
58
58
|
* and nothing in the source tree references it.
|
|
59
|
+
*
|
|
60
|
+
* **The calling script has to exit itself.** This import is where the renderer enters your
|
|
61
|
+
* process, and under bun `react-dom/static.browser` — which invariant 1 requires, so every app on
|
|
62
|
+
* this rig loads it — leaves that process alive after its last await. Measured by elimination with
|
|
63
|
+
* no app code at all: `react-dom/server` exits, `static.browser` does not, and
|
|
64
|
+
* `process.getActiveResourcesInfo()` reports nothing either way, so the handle is invisible to
|
|
65
|
+
* everything except the hang. Under node it exits. Nothing here can undo it — a library must not
|
|
66
|
+
* call `process.exit` on its host — so a prerender script ends with `process.exit(0)` once every
|
|
67
|
+
* file is written, and in CI the alternative is a job that does all its work and then runs to its
|
|
68
|
+
* timeout. Five adopters had already written that line against a DIFFERENT holder (an auth client
|
|
69
|
+
* whose token-refresh timer starts at module scope); none of them knew the renderer does it too.
|
|
59
70
|
*/
|
|
60
71
|
export async function loadRenderer(entryFile) {
|
|
61
72
|
const mod = await import(__rewriteRelativeImportExtension(pathToFileURL(entryFile).href));
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAe;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC9C,IAA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CAAC,MAAM,GAAG,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,kDAAkD,OAAO,QAAQ;YAC5F,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YAClE,+EAA+E,CAClF,CAAC;IAEJ,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gusnips/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The build-time half of a prerendered Vite SPA: head baking, sitemap, robots, the prerender driver, and a shared vite preset.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"release:major": "bun pm version major && bun publish --access public"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@gusnips/react": "0.
|
|
62
|
+
"@gusnips/react": "0.6.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@tailwindcss/vite": "^4",
|
package/src/node.ts
CHANGED
|
@@ -57,6 +57,17 @@ function exportsRenderer<Context>(mod: unknown): mod is { renderPage: PageRender
|
|
|
57
57
|
* bundle, and a plugin running in `closeBundle` is inside the build that would have to have
|
|
58
58
|
* produced it. So the entry is a path on disk, written by `vite build --ssr src/entry-server.tsx`,
|
|
59
59
|
* and nothing in the source tree references it.
|
|
60
|
+
*
|
|
61
|
+
* **The calling script has to exit itself.** This import is where the renderer enters your
|
|
62
|
+
* process, and under bun `react-dom/static.browser` — which invariant 1 requires, so every app on
|
|
63
|
+
* this rig loads it — leaves that process alive after its last await. Measured by elimination with
|
|
64
|
+
* no app code at all: `react-dom/server` exits, `static.browser` does not, and
|
|
65
|
+
* `process.getActiveResourcesInfo()` reports nothing either way, so the handle is invisible to
|
|
66
|
+
* everything except the hang. Under node it exits. Nothing here can undo it — a library must not
|
|
67
|
+
* call `process.exit` on its host — so a prerender script ends with `process.exit(0)` once every
|
|
68
|
+
* file is written, and in CI the alternative is a job that does all its work and then runs to its
|
|
69
|
+
* timeout. Five adopters had already written that line against a DIFFERENT holder (an auth client
|
|
70
|
+
* whose token-refresh timer starts at module scope); none of them knew the renderer does it too.
|
|
60
71
|
*/
|
|
61
72
|
export async function loadRenderer<Context = unknown>(
|
|
62
73
|
entryFile: string,
|