@modern-js/main-doc 3.2.1 → 3.2.2
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.
|
@@ -48,6 +48,18 @@ export default defineServerConfig({
|
|
|
48
48
|
|
|
49
49
|
After creating the file, you can write custom logic in this file.
|
|
50
50
|
|
|
51
|
+
3. Include `server` directory in `tsconfig.json`
|
|
52
|
+
|
|
53
|
+
```json5
|
|
54
|
+
{
|
|
55
|
+
// ...
|
|
56
|
+
"include": [
|
|
57
|
+
// ...
|
|
58
|
+
"server"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
51
63
|
## Capabilities of the Custom Web Server
|
|
52
64
|
|
|
53
65
|
Modern.js's Web Server is based on Hono, and in the latest version of the Custom Web Server, we expose Hono's middleware capabilities, you can refer to [Hono API](https://hono.dev/docs/api/context) for more usage.
|
|
@@ -48,6 +48,18 @@ export default defineServerConfig({
|
|
|
48
48
|
|
|
49
49
|
创建文件后,可以在这个文件中编写自定义逻辑。
|
|
50
50
|
|
|
51
|
+
3. 你可以将 `server` 目录包含在 `tsconfig.json` 中
|
|
52
|
+
|
|
53
|
+
```json5
|
|
54
|
+
{
|
|
55
|
+
// ...
|
|
56
|
+
"include": [
|
|
57
|
+
// ...
|
|
58
|
+
"server"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
51
63
|
## 自定义 Web Server 能力
|
|
52
64
|
|
|
53
65
|
Modern.js 的服务器基于 Hono 实现,在最新版本的自定义 Web Server 中,我们向用户暴露了 Hono 的中间件能力,你可以参考 [Hono 文档](https://hono.dev/docs/api/context) 了解更多用法。
|
package/package.json
CHANGED
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
"modern",
|
|
17
17
|
"modern.js"
|
|
18
18
|
],
|
|
19
|
-
"version": "3.2.
|
|
19
|
+
"version": "3.2.2",
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"registry": "https://registry.npmjs.org/",
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"mermaid": "^11.
|
|
26
|
-
"@modern-js/sandpack-react": "3.2.
|
|
25
|
+
"mermaid": "^11.15.0",
|
|
26
|
+
"@modern-js/sandpack-react": "3.2.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"rsbuild-plugin-open-graph": "1.1.
|
|
30
|
-
"@rsbuild/plugin-sass": "1.5.
|
|
31
|
-
"@rspress/core": "2.0.
|
|
29
|
+
"rsbuild-plugin-open-graph": "1.1.3",
|
|
30
|
+
"@rsbuild/plugin-sass": "1.5.3",
|
|
31
|
+
"@rspress/core": "2.0.13",
|
|
32
32
|
"@rspress/plugin-llms": "2.0.2",
|
|
33
33
|
"@rspress/shared": "2.0.2",
|
|
34
34
|
"@shikijs/transformers": "^3.23.0",
|