@funstack/static 0.0.2 → 0.0.4
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 +12 -3
- package/dist/bin/skill-installer.d.mts +1 -0
- package/dist/bin/skill-installer.mjs +12 -0
- package/dist/bin/skill-installer.mjs.map +1 -0
- package/dist/build/buildApp.mjs +4 -3
- package/dist/build/buildApp.mjs.map +1 -1
- package/dist/build/rscProcessor.mjs +9 -3
- package/dist/build/rscProcessor.mjs.map +1 -1
- package/dist/client/entry.d.mts +1 -0
- package/dist/client/entry.mjs +17 -9
- package/dist/client/entry.mjs.map +1 -1
- package/dist/client/globals.mjs.map +1 -1
- package/dist/docs/FAQ.md +5 -0
- package/dist/docs/GettingStarted.md +180 -0
- package/dist/docs/MigratingFromViteSPA.md +321 -0
- package/dist/docs/api/Defer.md +110 -0
- package/dist/docs/api/FunstackStatic.md +184 -0
- package/dist/docs/index.md +22 -0
- package/dist/docs/learn/HowItWorks.md +109 -0
- package/dist/docs/learn/LazyServerComponents.md +120 -0
- package/dist/docs/learn/OptimizingPayloads.md +107 -0
- package/dist/docs/learn/RSC.md +179 -0
- package/dist/docs/learn/SSR.md +104 -0
- package/dist/entries/client.d.mts +1 -1
- package/dist/entries/rsc-client.d.mts +2 -2
- package/dist/entries/rsc-client.mjs +2 -2
- package/dist/entries/server.d.mts +2 -2
- package/dist/plugin/index.d.mts +17 -1
- package/dist/plugin/index.d.mts.map +1 -1
- package/dist/plugin/index.mjs +10 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/rsc/defer.d.mts +18 -3
- package/dist/rsc/defer.d.mts.map +1 -1
- package/dist/rsc/defer.mjs +34 -14
- package/dist/rsc/defer.mjs.map +1 -1
- package/dist/rsc/entry.d.mts.map +1 -1
- package/dist/rsc/entry.mjs +85 -20
- package/dist/rsc/entry.mjs.map +1 -1
- package/dist/rsc-client/clientWrapper.d.mts +3 -3
- package/dist/rsc-client/clientWrapper.d.mts.map +1 -1
- package/dist/rsc-client/clientWrapper.mjs +2 -2
- package/dist/rsc-client/clientWrapper.mjs.map +1 -1
- package/dist/rsc-client/entry.d.mts +1 -1
- package/dist/rsc-client/entry.mjs +1 -1
- package/dist/ssr/entry.d.mts +2 -0
- package/dist/ssr/entry.d.mts.map +1 -1
- package/dist/ssr/entry.mjs +6 -2
- package/dist/ssr/entry.mjs.map +1 -1
- package/package.json +26 -11
- package/skills/funstack-static-knowledge/SKILL.md +44 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funstack/static",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "FUNSTACK static library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -8,6 +8,16 @@
|
|
|
8
8
|
"url": "git+https://github.com/uhyo/funstack-static.git",
|
|
9
9
|
"directory": "packages/static"
|
|
10
10
|
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"vite-plugin",
|
|
13
|
+
"react",
|
|
14
|
+
"framework",
|
|
15
|
+
"react-server-components",
|
|
16
|
+
"rsc"
|
|
17
|
+
],
|
|
18
|
+
"bin": {
|
|
19
|
+
"funstack-static-skill-installer": "./dist/bin/skill-installer.mjs"
|
|
20
|
+
},
|
|
11
21
|
"exports": {
|
|
12
22
|
".": {
|
|
13
23
|
"types": "./dist/index.d.mts",
|
|
@@ -26,27 +36,30 @@
|
|
|
26
36
|
}
|
|
27
37
|
},
|
|
28
38
|
"files": [
|
|
29
|
-
"dist"
|
|
39
|
+
"dist",
|
|
40
|
+
"skills"
|
|
30
41
|
],
|
|
31
42
|
"author": "uhyo <uhyo@uhy.ooo>",
|
|
32
43
|
"license": "MIT",
|
|
33
44
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@types/
|
|
45
|
+
"@playwright/test": "^1.58.1",
|
|
46
|
+
"@types/node": "^25.1.0",
|
|
47
|
+
"@types/react": "^19.2.10",
|
|
36
48
|
"@types/react-dom": "^19.2.3",
|
|
37
|
-
"jsdom": "^27.
|
|
38
|
-
"react": "^19.2.
|
|
39
|
-
"react-dom": "^19.2.
|
|
40
|
-
"tsdown": "^0.
|
|
49
|
+
"jsdom": "^27.4.0",
|
|
50
|
+
"react": "^19.2.4",
|
|
51
|
+
"react-dom": "^19.2.4",
|
|
52
|
+
"tsdown": "^0.20.1",
|
|
41
53
|
"typescript": "^5.9.3",
|
|
42
54
|
"vite": "^7.3.1",
|
|
43
|
-
"vitest": "^4.0.
|
|
55
|
+
"vitest": "^4.0.18"
|
|
44
56
|
},
|
|
45
57
|
"dependencies": {
|
|
46
|
-
"@
|
|
58
|
+
"@funstack/skill-installer": "^1.0.0",
|
|
59
|
+
"@vitejs/plugin-rsc": "^0.5.17",
|
|
47
60
|
"react-error-boundary": "^6.1.0",
|
|
48
61
|
"rsc-html-stream": "^0.0.7",
|
|
49
|
-
"srvx": "^0.10.
|
|
62
|
+
"srvx": "^0.10.1"
|
|
50
63
|
},
|
|
51
64
|
"peerDependencies": {
|
|
52
65
|
"react": "^19.2.3",
|
|
@@ -55,9 +68,11 @@
|
|
|
55
68
|
},
|
|
56
69
|
"scripts": {
|
|
57
70
|
"build": "tsdown",
|
|
71
|
+
"build:docs": "node --experimental-strip-types scripts/generate-ai-docs.ts",
|
|
58
72
|
"dev": "tsdown --watch",
|
|
59
73
|
"test": "vitest",
|
|
60
74
|
"test:run": "vitest run",
|
|
75
|
+
"test:e2e": "playwright test --config e2e/playwright.config.ts",
|
|
61
76
|
"typecheck": "tsc --noEmit"
|
|
62
77
|
}
|
|
63
78
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: funstack-static-knowledge
|
|
3
|
+
description: Use this skill when you need information about `@funstack/static` (the React framework your app is built with). What it is even about, API references, best practices, etc.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# FUNSTACK Static Knowledge
|
|
7
|
+
|
|
8
|
+
**FUNSTACK Static** (`@funstack/static`) is a React framework designed to build SPA application that can be deployed as static files to any static hosting service. Its prominent features is support for React Server Components (RSC) which allows optimizing the performance of the application by rendering parts of the UI at build time.
|
|
9
|
+
|
|
10
|
+
Note that FUNSTACK Static never runs on the server at runtime (except during development). Server Components are rendered at build time into RSC payloads which are then shipped to the client. The client React runtime can then seamlessly render both Client and Server Components into the DOM.
|
|
11
|
+
|
|
12
|
+
## FUNSTACK Static Entrypoint
|
|
13
|
+
|
|
14
|
+
FUNSTACk Static is served as a Vite plugin. See your app's `vite.config.ts` file for the current configuration. A typical configuration looks like this:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { defineConfig } from "vite";
|
|
18
|
+
import react from "@vitejs/plugin-react";
|
|
19
|
+
import { funstackStatic } from "@funstack/static";
|
|
20
|
+
|
|
21
|
+
export default defineConfig({
|
|
22
|
+
plugins: [
|
|
23
|
+
react(),
|
|
24
|
+
funstackStatic({
|
|
25
|
+
root: "./src/Root.tsx",
|
|
26
|
+
app: "./src/App.tsx",
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Entrypoint.** Here, the `root` option points to the Root component of your application which is responsible for the HTML shell of your application. The `app` option points to the main App component which is the entrypoint for your application's UI.
|
|
33
|
+
|
|
34
|
+
**Server and Client Components.** The entrypoint components (Root and App) are **server components**. FUNSTACK Static follows React's conventions for Server and Client Components; the entrypoint is executed as a Server module. Modules marked with the `"use client"` directive are executed as Client modules. Server modules can import both Server and Client modules, while Client modules can only import other Client modules.
|
|
35
|
+
|
|
36
|
+
**Server Actions.** Note that Server Actions (`"use server"`) are **NOT** supported in FUNSTACK Static, as there is no server runtime deployed.
|
|
37
|
+
|
|
38
|
+
## FUNSTACK Static Docs
|
|
39
|
+
|
|
40
|
+
More detailed documentation about FUNSTACK Static (including API references and best practices) can be found inside `node_modules` at:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
node_modules/@funstack/static/dist/docs/index.md
|
|
44
|
+
```
|