@modern-js/main-doc 0.0.0-next-1686554685970 → 0.0.0-next-1686556718687
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @modern-js/main-doc
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1686556718687
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
docs(main): 更新 BFF 配置文档
|
|
30
30
|
|
|
31
31
|
- Updated dependencies [7e6fb5fc1]
|
|
32
|
-
- @modern-js/builder-doc@0.0.0-next-
|
|
32
|
+
- @modern-js/builder-doc@0.0.0-next-1686556718687
|
|
33
33
|
|
|
34
34
|
## 2.22.1
|
|
35
35
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
BFF Proxy uses the powerful [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware). For more advanced usage, please refer to its [documentation](https://github.com/chimurai/http-proxy-middleware#options).
|
|
@@ -13,8 +13,6 @@ import EnableBFFCaution from "@site-docs-en/components/enable-bff-caution";
|
|
|
13
13
|
|
|
14
14
|
With simple configuration, Modern.js can automatically proxy requests sent to the BFF server to the specified service.
|
|
15
15
|
|
|
16
|
-
BFF Proxy uses the powerful [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware). For more advanced usage, please refer to its [documentation](https://github.com/chimurai/http-proxy-middleware#options).
|
|
17
|
-
|
|
18
16
|
Add the following configuration to `modern.server-runtime.config.js` to enable proxy:
|
|
19
17
|
|
|
20
18
|
```ts title="modern.server-runtime.config.ts"
|
|
@@ -49,6 +47,10 @@ export default defineConfig({
|
|
|
49
47
|
|
|
50
48
|
Unlike [dev.proxy](/configure/app/dev/proxy), the proxy here only applies to requests entering the BFF/API service; at the same time, this configuration can not only be used in the development environment, but also proxies corresponding requests in the production environment.
|
|
51
49
|
|
|
50
|
+
import BFFProxyOtherConfig from "@site-docs-en/components/bff-proxy-other-config";
|
|
51
|
+
|
|
52
|
+
<BFFProxyOtherConfig />
|
|
53
|
+
|
|
52
54
|
## Common Usage
|
|
53
55
|
|
|
54
56
|
### Solving Cross-Domain Issues for APIs
|
|
@@ -72,3 +74,5 @@ export default defineServerConfig({
|
|
|
72
74
|
},
|
|
73
75
|
};
|
|
74
76
|
```
|
|
77
|
+
|
|
78
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
BFF Proxy 使用了强大的 [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware),如果需要更多高级的用法, 可以查看它的[文档](https://github.com/chimurai/http-proxy-middleware#options)。
|
|
@@ -12,7 +12,6 @@ import EnableBFFCaution from "@site-docs/components/enable-bff-caution";
|
|
|
12
12
|
<EnableBFFCaution />
|
|
13
13
|
|
|
14
14
|
通过简单配置,Modern.js 可以将发送给 BFF server 的请求,自动代理到指定的服务上。
|
|
15
|
-
BFF Proxy 使用了强大的 [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware),如果需要更多高级的用法, 可以查看它的[文档](https://github.com/chimurai/http-proxy-middleware#options)。
|
|
16
15
|
|
|
17
16
|
在 `modern.server-runtime.config.js` 中加入以下配置;即可开启代理:
|
|
18
17
|
|
|
@@ -48,6 +47,10 @@ export default defineConfig({
|
|
|
48
47
|
|
|
49
48
|
与 [dev.proxy](/configure/app/dev/proxy) 不同,本节所介绍的代理只作用于进入 BFF/API 服务的请求;同时,这一配置不但可以在开发环境中使用,在生产环境中也会代理相应的请求。
|
|
50
49
|
|
|
50
|
+
import BFFProxyOtherConfig from "@site-docs/components/bff-proxy-other-config";
|
|
51
|
+
|
|
52
|
+
<BFFProxyOtherConfig />
|
|
53
|
+
|
|
51
54
|
## 常见用法
|
|
52
55
|
|
|
53
56
|
### 解决接口跨域问题
|
|
@@ -71,3 +74,4 @@ export default defineServerConfig({
|
|
|
71
74
|
},
|
|
72
75
|
};
|
|
73
76
|
```
|
|
77
|
+
|
package/package.json
CHANGED
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-1686556718687",
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"registry": "https://registry.npmjs.org/",
|
|
21
21
|
"access": "public",
|
|
22
22
|
"provenance": true
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
|
25
|
+
"@modern-js/builder-doc": "0.0.0-next-1686556718687"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"classnames": "^2",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"fs-extra": "^10",
|
|
35
35
|
"@types/node": "^16",
|
|
36
36
|
"@types/fs-extra": "^9",
|
|
37
|
-
"@modern-js/
|
|
38
|
-
"@modern-js/doc-
|
|
39
|
-
"@modern-js/doc
|
|
37
|
+
"@modern-js/doc-tools": "0.0.0-next-1686556718687",
|
|
38
|
+
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1686556718687",
|
|
39
|
+
"@modern-js/builder-doc": "0.0.0-next-1686556718687"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"dev": "modern dev",
|