@modern-js/main-doc 0.0.0-next-1686651393235 → 0.0.0-next-1686654963103

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,41 +1,41 @@
1
1
  # @modern-js/main-doc
2
2
 
3
- ## 0.0.0-next-1686651393235
3
+ ## 0.0.0-next-1686654963103
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 8a932767f0: docs(main): update basic features alias doc
7
+ - 8a932767f: docs(main): update basic features alias doc
8
8
 
9
9
  docs(main): 更新基础功能 -- 别名文档
10
10
 
11
- - 7e6fb5fc16: chore: publishConfig add provenance config
11
+ - 7e6fb5fc1: chore: publishConfig add provenance config
12
12
 
13
13
  chore: publishConfig 增加 provenance 配置
14
14
 
15
- - 372b950c12: docs(main): update plugin config doc
15
+ - 372b950c1: docs(main): update plugin config doc
16
16
 
17
17
  docs(main): 更新插件配置文档
18
18
 
19
- - f28b4855c2: docs(main): update faq doc
19
+ - f28b4855c: docs(main): update faq doc
20
20
 
21
21
  docs(main): 更新 faq 文档
22
22
 
23
- - f264c4a7f8: docs(main): update html template doc
23
+ - f264c4a7f: docs(main): update html template doc
24
24
 
25
25
  docs(main): 更新 HTML 模板文档
26
26
 
27
- - 5cba7c46b7: docs(main): update bff config doc
27
+ - 5cba7c46b: docs(main): update bff config doc
28
28
 
29
29
  docs(main): 更新 BFF 配置文档
30
30
 
31
- - ef865f285b: docs(main): update config server doc
31
+ - ef865f285: docs(main): update config server doc
32
32
 
33
33
  docs(main): 更新 server 配置文档
34
34
 
35
- - 8bb0e146f2: chore: review code split docs
35
+ - 8bb0e146f: chore: review code split docs
36
36
  chore: 审查代码分割文档
37
- - Updated dependencies [7e6fb5fc16]
38
- - @modern-js/builder-doc@0.0.0-next-1686651393235
37
+ - Updated dependencies [7e6fb5fc1]
38
+ - @modern-js/builder-doc@0.0.0-next-1686654963103
39
39
 
40
40
  ## 2.22.1
41
41
 
@@ -5,7 +5,7 @@ sidebar_position: 1
5
5
 
6
6
  # Overview
7
7
 
8
- This section describes the configuration of the Runtime plugin.
8
+ This section describes configuration of the Runtime plugin.
9
9
 
10
10
  ## Configuration
11
11
 
@@ -32,13 +32,34 @@ export default defineConfig({
32
32
 
33
33
  #### DefineConfig
34
34
 
35
- Configure use [`defineConfig`](/apis/app/runtime/app/define-config) API:
35
+ Configure using [`defineConfig`](/apis/app/runtime/app/define-config) API:
36
36
 
37
37
  :::info
38
- When there is a function in the runtime configuration, it can only be configured in this way.
38
+ When there is a function in the runtime configuration, it can only be configured this way.
39
39
 
40
40
  :::
41
41
 
42
+ import { Tabs, Tab as TabItem } from "@theme";
43
+
44
+ <Tabs>
45
+ <TabItem value="layout" label="Conventional Routing" default>
46
+
47
+ ```tsx title="src/routes/layout.tsx"
48
+ import type { AppConfig } from '@modern-js/runtime';
49
+
50
+ export const config = (): AppConfig => {
51
+ return {
52
+ router: {
53
+ supportHtml5History: false
54
+ }
55
+ }
56
+ };
57
+ ```
58
+
59
+ </TabItem>
60
+
61
+ <TabItem value="app" label="Self-controlled Routing">
62
+
42
63
  ```ts title="src/App.tsx"
43
64
  import { defineConfig } from '@modern-js/runtime';
44
65
 
@@ -55,6 +76,9 @@ defineConfig(App, {
55
76
  export default App;
56
77
  ```
57
78
 
79
+ </TabItem>
80
+ </Tabs>
81
+
58
82
  :::info
59
83
  Using runtime configuration, you can solve the problem that runtime plugin configuration needs to be at runtime to get specific content.
60
84
 
@@ -63,7 +87,7 @@ Runtime plugin runtime configuration and configuration directly in `modern.confi
63
87
  :::
64
88
 
65
89
  :::warning
66
- defineConfig can only define the specific configuration content of the Runtime plugin. To confirm whether to enable the plugin, it needs to be determined through the configuration in `modernConfig` in `package.json` or `modern.config.ts`.
90
+ The `defineConfig` API only accepts the specific configuration of Runtime plugins. Enabling the plugin is determined through `modern.config.ts` configuration."
67
91
 
68
92
  :::
69
93
 
@@ -35,6 +35,6 @@ interface AppInfo {
35
35
 
36
36
  ### Other Config
37
37
 
38
- Under the `masterApp` configuration, developers can pass through the configuration items of Garfish.
38
+ In the `masterApp` configuration, developers can pass through options supported by Garfish
39
39
 
40
40
  All supported configuration items [see here](https://garfishjs.org/api/run/#%E5%8F%82%E6%95%B0).
@@ -11,14 +11,14 @@ import RouterLegacyTip from "@site-docs-en/components/router-legacy-tip"
11
11
  - **Type:** `boolean | Object`
12
12
  - **Default:** `false`
13
13
 
14
- When `router` is enabled, routing management of conventional routes provided by Modern.js is supported. Based on [React Router 6](https://reactrouter.com/).
14
+ When enabled, the router option provides routing management for Modern.js conventional routes. It is based on [React Router 6](https://reactrouter.com/).
15
15
 
16
16
  ## basename
17
17
 
18
18
  - **Type:** `string`
19
19
  - **Default:** ``
20
20
 
21
- The basename of the app for situations where you can't deploy to the root of the domain, but a sub directory.
21
+ The basename option specifies the subpath where the app is deployed, for situations where it cannot be deployed to the root domain.
22
22
 
23
23
  ## supportHtml5History
24
24
 
@@ -87,7 +87,7 @@ Runtime 插件运行时配置和直接在 `modern.config.ts` 中的配置默认
87
87
  :::
88
88
 
89
89
  :::warning
90
- defineConfig 中只能定义 Runtime 插件的具体配置内容,确认是否开启插件还需要通过 `package.json` 中的 `modernConfig` 或者 `modern.config.ts` 中的配置决定。
90
+ defineConfig 中只能定义 Runtime 插件的具体配置内容,确认是否开启插件还需要通过 `modern.config.ts` 中的配置决定。
91
91
 
92
92
  :::
93
93
 
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-1686651393235",
18
+ "version": "0.0.0-next-1686654963103",
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-1686651393235"
25
+ "@modern-js/builder-doc": "0.0.0-next-1686654963103"
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/builder-doc": "0.0.0-next-1686651393235",
38
- "@modern-js/doc-tools": "0.0.0-next-1686651393235",
39
- "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1686651393235"
37
+ "@modern-js/builder-doc": "0.0.0-next-1686654963103",
38
+ "@modern-js/doc-tools": "0.0.0-next-1686654963103",
39
+ "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1686654963103"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "modern dev",