@modern-js/main-doc 2.65.4 → 2.66.0
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/apis/app/hooks/config/_meta.json +1 -0
- package/docs/en/apis/app/hooks/config/favicon.mdx +29 -0
- package/docs/en/apis/app/hooks/config/icon.mdx +3 -30
- package/docs/en/community/blog/v2-release-note.mdx +1 -1
- package/docs/en/configure/app/plugins.mdx +2 -2
- package/docs/en/configure/app/tools/esbuild.mdx +1 -1
- package/docs/en/configure/app/tools/swc.mdx +1 -1
- package/docs/en/plugin/_meta.json +8 -7
- package/docs/en/plugin/cli-plugins/_meta.json +1 -1
- package/docs/en/plugin/cli-plugins/api.mdx +617 -0
- package/docs/en/plugin/cli-plugins/life-cycle.mdx +139 -0
- package/docs/en/plugin/cli-plugins/migration.mdx +98 -0
- package/docs/en/plugin/introduction.mdx +119 -47
- package/docs/en/plugin/official/_meta.json +12 -0
- package/docs/en/plugin/official/cli-plugins/_meta.json +1 -0
- package/docs/en/plugin/official/cli-plugins.mdx +6 -0
- package/docs/en/plugin/official/rsbuild-plugins.mdx +3 -0
- package/docs/en/plugin/plugin-system.mdx +237 -0
- package/docs/en/plugin/runtime-plugins/_meta.json +1 -0
- package/docs/en/plugin/runtime-plugins/api.mdx +165 -0
- package/docs/en/plugin/runtime-plugins/life-cycle.mdx +29 -0
- package/docs/en/plugin/runtime-plugins/migration.mdx +101 -0
- package/docs/en/plugin/server-plugins/api.mdx +3 -0
- package/docs/en/plugin/server-plugins/life-cycle.mdx +3 -0
- package/docs/zh/apis/app/hooks/config/_meta.json +1 -0
- package/docs/zh/apis/app/hooks/config/favicon.mdx +29 -0
- package/docs/zh/apis/app/hooks/config/icon.mdx +3 -30
- package/docs/zh/community/blog/v2-release-note.mdx +1 -1
- package/docs/zh/configure/app/plugins.mdx +2 -2
- package/docs/zh/configure/app/tools/esbuild.mdx +1 -1
- package/docs/zh/configure/app/tools/swc.mdx +1 -1
- package/docs/zh/plugin/_meta.json +8 -7
- package/docs/zh/plugin/cli-plugins/_meta.json +1 -1
- package/docs/zh/plugin/cli-plugins/api.mdx +617 -0
- package/docs/zh/plugin/cli-plugins/life-cycle.mdx +139 -0
- package/docs/zh/plugin/cli-plugins/migration.mdx +98 -0
- package/docs/zh/plugin/introduction.mdx +92 -20
- package/docs/zh/plugin/official/_meta.json +12 -0
- package/docs/zh/plugin/official/cli-plugins/_meta.json +1 -0
- package/docs/zh/plugin/official/cli-plugins.mdx +6 -0
- package/docs/zh/plugin/official/rsbuild-plugins.mdx +3 -0
- package/docs/zh/plugin/plugin-system.mdx +239 -0
- package/docs/zh/plugin/runtime-plugins/_meta.json +1 -0
- package/docs/zh/plugin/runtime-plugins/api.mdx +166 -0
- package/docs/zh/plugin/runtime-plugins/life-cycle.mdx +29 -0
- package/docs/zh/plugin/runtime-plugins/migration.mdx +101 -0
- package/docs/zh/plugin/server-plugins/api.mdx +3 -0
- package/docs/zh/plugin/server-plugins/life-cycle.mdx +3 -0
- package/i18n.json +4 -0
- package/package.json +4 -4
- package/src/components/Footer/index.tsx +1 -1
- package/src/components/Mermaid/index.tsx +60 -0
- package/src/components/Mermaid/style.scss +221 -0
- package/docs/en/plugin/cli-plugins.mdx +0 -6
- package/docs/en/plugin/plugin-system/_meta.json +0 -10
- package/docs/en/plugin/plugin-system/extend.mdx +0 -163
- package/docs/en/plugin/plugin-system/hook-list.mdx +0 -711
- package/docs/en/plugin/plugin-system/hook.mdx +0 -188
- package/docs/en/plugin/plugin-system/implement.mdx +0 -243
- package/docs/en/plugin/plugin-system/introduction.mdx +0 -95
- package/docs/en/plugin/plugin-system/lifecycle.mdx +0 -16
- package/docs/en/plugin/plugin-system/plugin-api.mdx +0 -138
- package/docs/en/plugin/plugin-system/relationship.mdx +0 -119
- package/docs/en/plugin/rsbuild-plugins.mdx +0 -3
- package/docs/zh/plugin/cli-plugins.mdx +0 -6
- package/docs/zh/plugin/plugin-system/_meta.json +0 -10
- package/docs/zh/plugin/plugin-system/extend.mdx +0 -163
- package/docs/zh/plugin/plugin-system/hook-list.mdx +0 -715
- package/docs/zh/plugin/plugin-system/hook.mdx +0 -173
- package/docs/zh/plugin/plugin-system/implement.mdx +0 -250
- package/docs/zh/plugin/plugin-system/introduction.mdx +0 -94
- package/docs/zh/plugin/plugin-system/lifecycle.mdx +0 -16
- package/docs/zh/plugin/plugin-system/plugin-api.mdx +0 -138
- package/docs/zh/plugin/plugin-system/relationship.mdx +0 -119
- package/docs/zh/plugin/rsbuild-plugins.mdx +0 -4
- /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-bff.mdx +0 -0
- /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-ssg.mdx +0 -0
- /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-swc.mdx +0 -0
- /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-tailwind.mdx +0 -0
- /package/docs/en/plugin/{rsbuild-plugins → official/rsbuild-plugins}/_meta.json +0 -0
- /package/docs/en/plugin/{rsbuild-plugins → official/rsbuild-plugins}/plugin-esbuild.mdx +0 -0
- /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-bff.mdx +0 -0
- /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-ssg.mdx +0 -0
- /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-swc.mdx +0 -0
- /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-tailwind.mdx +0 -0
- /package/docs/zh/plugin/{rsbuild-plugins → official/rsbuild-plugins}/_meta.json +0 -0
- /package/docs/zh/plugin/{rsbuild-plugins → official/rsbuild-plugins}/plugin-esbuild.mdx +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
["html", "favicon", "icon", "mock", "public", "upload"]
|
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
title: favicon.*
|
3
|
+
sidebar_position: 3
|
4
|
+
---
|
5
|
+
|
6
|
+
# Favicon
|
7
|
+
|
8
|
+
When there is a `favicon.*` file in the `config` directory at the root of the project, Modern.js will automatically set the file to the [html.favicon](/configure/app/html/favicon) configuration option for generating the favicon icon on the page:
|
9
|
+
|
10
|
+
```
|
11
|
+
./config
|
12
|
+
└── favicon.ico
|
13
|
+
```
|
14
|
+
|
15
|
+
After the build is completed, you can see the following tags automatically generated in HTML:
|
16
|
+
|
17
|
+
```html
|
18
|
+
<link rel="icon" href="/favicon.ico" />
|
19
|
+
```
|
20
|
+
|
21
|
+
## Order
|
22
|
+
|
23
|
+
When setting up the favicon, Modern.js looks for files in the following order:
|
24
|
+
|
25
|
+
- `favicon.png`
|
26
|
+
- `favicon.jpg`
|
27
|
+
- `favicon.jpeg`
|
28
|
+
- `favicon.svg`
|
29
|
+
- `favicon.ico`
|
@@ -1,36 +1,9 @@
|
|
1
1
|
---
|
2
|
-
title: icon
|
2
|
+
title: icon.*
|
3
3
|
sidebar_position: 2
|
4
4
|
---
|
5
5
|
|
6
|
-
#
|
7
|
-
|
8
|
-
## Favicon
|
9
|
-
|
10
|
-
When there is a `favicon.*` file in the `config` directory at the root of the project, Modern.js will automatically set the file to the [html.favicon](/configure/app/html/favicon) configuration option for generating the favicon icon on the page:
|
11
|
-
|
12
|
-
```
|
13
|
-
./config
|
14
|
-
└── favicon.ico
|
15
|
-
```
|
16
|
-
|
17
|
-
After the build is completed, you can see the following tags automatically generated in HTML:
|
18
|
-
|
19
|
-
```html
|
20
|
-
<link rel="icon" href="/favicon.ico" />
|
21
|
-
```
|
22
|
-
|
23
|
-
### Order
|
24
|
-
|
25
|
-
When setting up the favicon, Modern.js looks for files in the following order:
|
26
|
-
|
27
|
-
- `favicon.png`
|
28
|
-
- `favicon.jpg`
|
29
|
-
- `favicon.jpeg`
|
30
|
-
- `favicon.svg`
|
31
|
-
- `favicon.ico`
|
32
|
-
|
33
|
-
## Apple Touch Icon
|
6
|
+
# Apple Touch Icon
|
34
7
|
|
35
8
|
When there is an `icon.*` file in the `config` directory at the root of the project, Modern.js will automatically set the file to the [html.appIcon](/configure/app/html/app-icon) configuration option for generating the Apple Touch Icon icon under the iOS system.
|
36
9
|
|
@@ -45,7 +18,7 @@ After the build is completed, you can see the following tags automatically gener
|
|
45
18
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/image/icon.png" />
|
46
19
|
```
|
47
20
|
|
48
|
-
|
21
|
+
## Order
|
49
22
|
|
50
23
|
When setting up the app icon, Modern.js looks for files in the following order:
|
51
24
|
|
@@ -132,7 +132,7 @@ Modern.js 可以划分为三个核心部分:**CLI 工具、服务端和运行
|
|
132
132
|
|
133
133
|
在字节跳动内部,我们借助这些插件 API,结合公司内的基建和平台,封装出内部的企业级框架。如果你需要对 Modern.js 框架进行深度定制,也可以借助这些插件 API 来完成。
|
134
134
|
|
135
|
-
> 如果你对 Modern.js 的插件系统感兴趣,请阅读 [「Modern.js - 自定义插件」](https://modernjs.dev/plugin/plugin-system
|
135
|
+
> 如果你对 Modern.js 的插件系统感兴趣,请阅读 [「Modern.js - 自定义插件」](https://modernjs.dev/plugin/plugin-system.html)文档。
|
136
136
|
|
137
137
|
### 嵌套路由
|
138
138
|
|
@@ -9,7 +9,7 @@ sidebar_position: 9
|
|
9
9
|
|
10
10
|
Used to configure custom Modern.js framework plugins.
|
11
11
|
|
12
|
-
Refer to [How to Develop Plugins](/plugin/plugin-system
|
12
|
+
Refer to [How to Develop Plugins](/plugin/plugin-system) for how to write custom plugins.
|
13
13
|
|
14
14
|
## Note
|
15
15
|
|
@@ -33,7 +33,7 @@ Currently, Modern.js has opened up the ability to customize CLI plugins, and Ser
|
|
33
33
|
|
34
34
|
By default, custom plugins are executed in the order of the `plugins` array, and the execution time of built-in Modern.js plugins is earlier than that of custom plugins.
|
35
35
|
|
36
|
-
When the plugin sets options that control the order, such as `pre` and `post`, the execution order will be adjusted based on the declared fields. Refer to [
|
36
|
+
When the plugin sets options that control the order, such as `pre` and `post`, the execution order will be adjusted based on the declared fields. Refer to [Plugins Structure](/plugin/plugin-system) for more information.
|
37
37
|
|
38
38
|
## Example
|
39
39
|
|
@@ -41,4 +41,4 @@ export default defineConfig({
|
|
41
41
|
});
|
42
42
|
```
|
43
43
|
|
44
|
-
For config details, please refer to [Esbuild Plugin Configuration](/plugin/rsbuild-plugins/plugin-esbuild.html#config).
|
44
|
+
For config details, please refer to [Esbuild Plugin Configuration](/plugin/official/rsbuild-plugins/plugin-esbuild.html#config).
|
@@ -108,4 +108,4 @@ export default defineConfig({
|
|
108
108
|
});
|
109
109
|
```
|
110
110
|
|
111
|
-
For config details, please refer to [SWC Plugin Configuration](/plugin/cli-plugins/plugin-swc.html#config).
|
111
|
+
For config details, please refer to [SWC Plugin Configuration](/plugin/official/cli-plugins/plugin-swc.html#config).
|
@@ -1,19 +1,20 @@
|
|
1
1
|
[
|
2
2
|
"introduction",
|
3
|
+
"plugin-system",
|
3
4
|
{
|
4
5
|
"type": "dir",
|
5
|
-
"name": "
|
6
|
-
"label": "
|
7
|
-
"collapsed": true
|
6
|
+
"name": "cli-plugins",
|
7
|
+
"label": "cli-plugins"
|
8
8
|
},
|
9
9
|
{
|
10
10
|
"type": "dir",
|
11
|
-
"name": "
|
12
|
-
"label": "
|
11
|
+
"name": "runtime-plugins",
|
12
|
+
"label": "runtime-plugins"
|
13
13
|
},
|
14
14
|
{
|
15
15
|
"type": "dir",
|
16
|
-
"name": "
|
17
|
-
"label": "
|
16
|
+
"name": "official",
|
17
|
+
"label": "official-plugins",
|
18
|
+
"collapsed": true
|
18
19
|
}
|
19
20
|
]
|
@@ -1 +1 @@
|
|
1
|
-
["
|
1
|
+
["api", "life-cycle", "migration"]
|