@modern-js/main-doc 0.0.0-nightly-20240103170618 → 0.0.0-nightly-20240105170635
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/docs/en/components/stream-ssr-performance.mdx +0 -0
- package/docs/en/guides/advanced-features/ssr/stream.mdx +12 -0
- package/docs/en/guides/basic-features/html.mdx +0 -2
- package/docs/zh/components/stream-ssr-performance.mdx +0 -0
- package/docs/zh/guides/advanced-features/ssr/stream.mdx +12 -0
- package/docs/zh/guides/basic-features/html.mdx +0 -2
- package/docs/zh/guides/topic-detail/generator/plugin/api/onForged.md +1 -1
- package/package.json +7 -7
- package/docs/en/configure/app/tools/inspector.mdx +0 -9
- package/docs/zh/configure/app/tools/inspector.mdx +0 -9
File without changes
|
@@ -228,9 +228,21 @@ function ErrorElement() {
|
|
228
228
|
}
|
229
229
|
```
|
230
230
|
|
231
|
+
## Waiting for all content to load for spiders
|
232
|
+
|
233
|
+
Streaming offers a better user experience because the user can see the content as it becomes available.
|
234
|
+
|
235
|
+
However, when a spider visits your page, you might want to let all of the content load first and then produce the final HTML output instead of revealing it progressively.
|
236
|
+
|
237
|
+
Modern.js uses [isbot](https://www.npmjs.com/package/isbot) to examine the user-agent of requests, determining whether they come from a crawler.
|
238
|
+
|
231
239
|
:::info More
|
232
240
|
|
233
241
|
1. [Deferred Data](https://reactrouter.com/en/main/guides/deferred)
|
234
242
|
2. [New Suspense SSR Architecture in React 18](https://github.com/reactwg/react-18/discussions/37)
|
235
243
|
|
236
244
|
:::
|
245
|
+
|
246
|
+
import StreamSSRPerformance from '@site-docs/components/stream-ssr-performance';
|
247
|
+
|
248
|
+
<StreamSSRPerformance />
|
File without changes
|
@@ -232,9 +232,21 @@ function ErrorElement() {
|
|
232
232
|
}
|
233
233
|
```
|
234
234
|
|
235
|
+
## 为爬虫等待所有内容加载完毕
|
236
|
+
|
237
|
+
流式传输可以提高用户体验,因为当页面内容可用时,用户可以及时感知到它们。
|
238
|
+
|
239
|
+
然而,当一个爬虫访问该页面时,它可能需要先加载所有内容,直接输出整个 HTML,而不是渐进式地加载它。
|
240
|
+
|
241
|
+
Modern.js 使用 [isbot](https://www.npmjs.com/package/isbot) 对请求的 `uesr-agent`, 以判断请求是否来自爬虫。
|
242
|
+
|
235
243
|
:::info 补充信息
|
236
244
|
|
237
245
|
1. [Deferred Data](https://reactrouter.com/en/main/guides/deferred)
|
238
246
|
2. [New Suspense SSR Architecture in React 18](https://github.com/reactwg/react-18/discussions/37)
|
239
247
|
|
240
248
|
:::
|
249
|
+
|
250
|
+
import StreamSSRPerformance from '@site-docs/components/stream-ssr-performance';
|
251
|
+
|
252
|
+
<StreamSSRPerformance />
|
package/package.json
CHANGED
@@ -15,17 +15,17 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "0.0.0-nightly-
|
18
|
+
"version": "0.0.0-nightly-20240105170635",
|
19
19
|
"publishConfig": {
|
20
20
|
"registry": "https://registry.npmjs.org/",
|
21
21
|
"access": "public",
|
22
22
|
"provenance": true
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@modern-js/sandpack-react": "0.0.0-nightly-
|
25
|
+
"@modern-js/sandpack-react": "0.0.0-nightly-20240105170635"
|
26
26
|
},
|
27
27
|
"peerDependencies": {
|
28
|
-
"@modern-js/builder-doc": "0.0.0-nightly-
|
28
|
+
"@modern-js/builder-doc": "0.0.0-nightly-20240105170635"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"classnames": "^2",
|
@@ -35,12 +35,12 @@
|
|
35
35
|
"ts-node": "^10.9.1",
|
36
36
|
"typescript": "^5",
|
37
37
|
"fs-extra": "^10",
|
38
|
-
"rspress": "1.
|
39
|
-
"@rspress/shared": "1.
|
38
|
+
"rspress": "1.9.3",
|
39
|
+
"@rspress/shared": "1.9.3",
|
40
40
|
"@types/node": "^16",
|
41
41
|
"@types/fs-extra": "9.0.13",
|
42
|
-
"@modern-js/
|
43
|
-
"@modern-js/doc
|
42
|
+
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-nightly-20240105170635",
|
43
|
+
"@modern-js/builder-doc": "0.0.0-nightly-20240105170635"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"dev": "rspress dev",
|