You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: change default rscPayloadDir to avoid Windows-incompatible colon (#94)
The default value `fun:rsc-payload` contains a colon which is not
allowed in file/directory names on Windows, causing build errors.
Change to `fun__rsc-payload` which is Windows-safe and still unlikely
to collide with user code.
Closes#92
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: packages/docs/src/pages/api/Defer.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ interface DeferOptions {
65
65
```
66
66
67
67
-**name:** An optional identifier to help with debugging. When provided:
68
-
- In development mode, the name is included in the RSC payload file name (e.g., `/funstack__/fun:rsc-payload/HomePage-b5698be72eea3c37`)
68
+
- In development mode, the name is included in the RSC payload file name (e.g., `/funstack__/fun__rsc-payload/HomePage-b5698be72eea3c37`)
69
69
- In production mode, the name is logged when the payload file is emitted
70
70
71
71
### Returns
@@ -105,6 +105,6 @@ Using the `name` option makes it easier to identify which deferred component cor
105
105
106
106
By default, FUNSTACK Static puts the entire app (`<App />`) into one RSC payload (`/funstack__/index.txt`). The client fetches this payload to render your SPA.
107
107
108
-
When you use `defer(<Component />)`, FUNSTACK Static creates **additional RSC payloads** for the rendering result of the element. This results in an additional emit of RSC payload files like `/funstack__/fun:rsc-payload/b5698be72eea3c37`. If you provide a `name` option, the file name will include it (e.g., `/funstack__/fun:rsc-payload/HomePage-b5698be72eea3c37`).
108
+
When you use `defer(<Component />)`, FUNSTACK Static creates **additional RSC payloads** for the rendering result of the element. This results in an additional emit of RSC payload files like `/funstack__/fun__rsc-payload/b5698be72eea3c37`. If you provide a `name` option, the file name will include it (e.g., `/funstack__/fun__rsc-payload/HomePage-b5698be72eea3c37`).
109
109
110
-
In the main RSC payload, the `defer` call is replaced with a client component `<DeferredComponent moduleId="fun:rsc-payload/b5698be72eea3c37" />`. This component is responsible for fetching the additional RSC payload from client and renders it when it's ready.
110
+
In the main RSC payload, the `defer` call is replaced with a client component `<DeferredComponent moduleId="fun__rsc-payload/b5698be72eea3c37" />`. This component is responsible for fetching the additional RSC payload from client and renders it when it's ready.
Copy file name to clipboardExpand all lines: packages/docs/src/pages/api/FunstackStatic.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,19 +229,19 @@ Sentry.init({
229
229
### rscPayloadDir (optional)
230
230
231
231
**Type:**`string`
232
-
**Default:**`"fun:rsc-payload"`
232
+
**Default:**`"fun__rsc-payload"`
233
233
234
234
Directory name used for RSC payload files in the build output. The final file paths follow the pattern `/funstack__/{rscPayloadDir}/{hash}.txt`.
235
235
236
-
Change this if your hosting platform has issues with the default directory name. For example, Cloudflare Workers redirects URLs containing colons to percent-encoded equivalents, adding an extra round trip.
236
+
Change this if your hosting platform has issues with the default directory name.
237
237
238
-
**Important:** The value is used as a marker for string replacement during the build process. Choose a value that is unique enough that it does not appear in your application's source code. The default value `"fun:rsc-payload"` is designed to be unlikely to collide with user code.
238
+
**Important:** The value is used as a marker for string replacement during the build process. Choose a value that is unique enough that it does not appear in your application's source code. The default value `"fun__rsc-payload"` is designed to be unlikely to collide with user code.
239
239
240
240
```typescript
241
241
funstackStatic({
242
242
root: "./src/root.tsx",
243
243
app: "./src/App.tsx",
244
-
rscPayloadDir: "fun-rsc-payload",// Avoid colons for Cloudflare Workers
Copy file name to clipboardExpand all lines: packages/docs/src/pages/learn/HowItWorks.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,12 +45,12 @@ dist/public
45
45
│ ├── root-DvE5ENz2.css
46
46
│ └── rsc-D0fjt5Ie.js
47
47
├── funstack__
48
-
│ └── fun:rsc-payload
48
+
│ └── fun__rsc-payload
49
49
│ └── db1923b9b6507ab4.txt
50
50
└── index.html
51
51
```
52
52
53
-
The RSC payload files under `funstack__` are loaded by the client-side code to bootstrap the application with server-rendered content. The `fun:rsc-payload` directory name is [configurable](/api/funstack-static#rscpayloaddir-optional) via the `rscPayloadDir` option.
53
+
The RSC payload files under `funstack__` are loaded by the client-side code to bootstrap the application with server-rendered content. The `fun__rsc-payload` directory name is [configurable](/api/funstack-static#rscpayloaddir-optional) via the `rscPayloadDir` option.
54
54
55
55
This can been seen as an **optimized version of traditional client-only SPAs**, where the entire application is bundled into JavaScript files. By using RSC, some of the rendering work is offloaded to the build time, resulting in smaller JavaScript bundles combined with RSC payloads that require less client-side processing (parsing is easier, no JavaScript execution needed).
0 commit comments