@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.
Files changed (87) hide show
  1. package/docs/en/apis/app/hooks/config/_meta.json +1 -0
  2. package/docs/en/apis/app/hooks/config/favicon.mdx +29 -0
  3. package/docs/en/apis/app/hooks/config/icon.mdx +3 -30
  4. package/docs/en/community/blog/v2-release-note.mdx +1 -1
  5. package/docs/en/configure/app/plugins.mdx +2 -2
  6. package/docs/en/configure/app/tools/esbuild.mdx +1 -1
  7. package/docs/en/configure/app/tools/swc.mdx +1 -1
  8. package/docs/en/plugin/_meta.json +8 -7
  9. package/docs/en/plugin/cli-plugins/_meta.json +1 -1
  10. package/docs/en/plugin/cli-plugins/api.mdx +617 -0
  11. package/docs/en/plugin/cli-plugins/life-cycle.mdx +139 -0
  12. package/docs/en/plugin/cli-plugins/migration.mdx +98 -0
  13. package/docs/en/plugin/introduction.mdx +119 -47
  14. package/docs/en/plugin/official/_meta.json +12 -0
  15. package/docs/en/plugin/official/cli-plugins/_meta.json +1 -0
  16. package/docs/en/plugin/official/cli-plugins.mdx +6 -0
  17. package/docs/en/plugin/official/rsbuild-plugins.mdx +3 -0
  18. package/docs/en/plugin/plugin-system.mdx +237 -0
  19. package/docs/en/plugin/runtime-plugins/_meta.json +1 -0
  20. package/docs/en/plugin/runtime-plugins/api.mdx +165 -0
  21. package/docs/en/plugin/runtime-plugins/life-cycle.mdx +29 -0
  22. package/docs/en/plugin/runtime-plugins/migration.mdx +101 -0
  23. package/docs/en/plugin/server-plugins/api.mdx +3 -0
  24. package/docs/en/plugin/server-plugins/life-cycle.mdx +3 -0
  25. package/docs/zh/apis/app/hooks/config/_meta.json +1 -0
  26. package/docs/zh/apis/app/hooks/config/favicon.mdx +29 -0
  27. package/docs/zh/apis/app/hooks/config/icon.mdx +3 -30
  28. package/docs/zh/community/blog/v2-release-note.mdx +1 -1
  29. package/docs/zh/configure/app/plugins.mdx +2 -2
  30. package/docs/zh/configure/app/tools/esbuild.mdx +1 -1
  31. package/docs/zh/configure/app/tools/swc.mdx +1 -1
  32. package/docs/zh/plugin/_meta.json +8 -7
  33. package/docs/zh/plugin/cli-plugins/_meta.json +1 -1
  34. package/docs/zh/plugin/cli-plugins/api.mdx +617 -0
  35. package/docs/zh/plugin/cli-plugins/life-cycle.mdx +139 -0
  36. package/docs/zh/plugin/cli-plugins/migration.mdx +98 -0
  37. package/docs/zh/plugin/introduction.mdx +92 -20
  38. package/docs/zh/plugin/official/_meta.json +12 -0
  39. package/docs/zh/plugin/official/cli-plugins/_meta.json +1 -0
  40. package/docs/zh/plugin/official/cli-plugins.mdx +6 -0
  41. package/docs/zh/plugin/official/rsbuild-plugins.mdx +3 -0
  42. package/docs/zh/plugin/plugin-system.mdx +239 -0
  43. package/docs/zh/plugin/runtime-plugins/_meta.json +1 -0
  44. package/docs/zh/plugin/runtime-plugins/api.mdx +166 -0
  45. package/docs/zh/plugin/runtime-plugins/life-cycle.mdx +29 -0
  46. package/docs/zh/plugin/runtime-plugins/migration.mdx +101 -0
  47. package/docs/zh/plugin/server-plugins/api.mdx +3 -0
  48. package/docs/zh/plugin/server-plugins/life-cycle.mdx +3 -0
  49. package/i18n.json +4 -0
  50. package/package.json +4 -4
  51. package/src/components/Footer/index.tsx +1 -1
  52. package/src/components/Mermaid/index.tsx +60 -0
  53. package/src/components/Mermaid/style.scss +221 -0
  54. package/docs/en/plugin/cli-plugins.mdx +0 -6
  55. package/docs/en/plugin/plugin-system/_meta.json +0 -10
  56. package/docs/en/plugin/plugin-system/extend.mdx +0 -163
  57. package/docs/en/plugin/plugin-system/hook-list.mdx +0 -711
  58. package/docs/en/plugin/plugin-system/hook.mdx +0 -188
  59. package/docs/en/plugin/plugin-system/implement.mdx +0 -243
  60. package/docs/en/plugin/plugin-system/introduction.mdx +0 -95
  61. package/docs/en/plugin/plugin-system/lifecycle.mdx +0 -16
  62. package/docs/en/plugin/plugin-system/plugin-api.mdx +0 -138
  63. package/docs/en/plugin/plugin-system/relationship.mdx +0 -119
  64. package/docs/en/plugin/rsbuild-plugins.mdx +0 -3
  65. package/docs/zh/plugin/cli-plugins.mdx +0 -6
  66. package/docs/zh/plugin/plugin-system/_meta.json +0 -10
  67. package/docs/zh/plugin/plugin-system/extend.mdx +0 -163
  68. package/docs/zh/plugin/plugin-system/hook-list.mdx +0 -715
  69. package/docs/zh/plugin/plugin-system/hook.mdx +0 -173
  70. package/docs/zh/plugin/plugin-system/implement.mdx +0 -250
  71. package/docs/zh/plugin/plugin-system/introduction.mdx +0 -94
  72. package/docs/zh/plugin/plugin-system/lifecycle.mdx +0 -16
  73. package/docs/zh/plugin/plugin-system/plugin-api.mdx +0 -138
  74. package/docs/zh/plugin/plugin-system/relationship.mdx +0 -119
  75. package/docs/zh/plugin/rsbuild-plugins.mdx +0 -4
  76. /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-bff.mdx +0 -0
  77. /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-ssg.mdx +0 -0
  78. /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-swc.mdx +0 -0
  79. /package/docs/en/plugin/{cli-plugins → official/cli-plugins}/plugin-tailwind.mdx +0 -0
  80. /package/docs/en/plugin/{rsbuild-plugins → official/rsbuild-plugins}/_meta.json +0 -0
  81. /package/docs/en/plugin/{rsbuild-plugins → official/rsbuild-plugins}/plugin-esbuild.mdx +0 -0
  82. /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-bff.mdx +0 -0
  83. /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-ssg.mdx +0 -0
  84. /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-swc.mdx +0 -0
  85. /package/docs/zh/plugin/{cli-plugins → official/cli-plugins}/plugin-tailwind.mdx +0 -0
  86. /package/docs/zh/plugin/{rsbuild-plugins → official/rsbuild-plugins}/_meta.json +0 -0
  87. /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
- # icon/
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
- ### Order
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/introduction.html)文档。
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/implement) for how to write custom plugins.
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 [Relationship between plugins](/plugin/plugin-system/relationship) for more information.
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": "plugin-system",
6
- "label": "plugin-system",
7
- "collapsed": true
6
+ "name": "cli-plugins",
7
+ "label": "cli-plugins"
8
8
  },
9
9
  {
10
10
  "type": "dir",
11
- "name": "cli-plugins",
12
- "label": "cli-plugins"
11
+ "name": "runtime-plugins",
12
+ "label": "runtime-plugins"
13
13
  },
14
14
  {
15
15
  "type": "dir",
16
- "name": "rsbuild-plugins",
17
- "label": "rsbuild-plugins"
16
+ "name": "official",
17
+ "label": "official-plugins",
18
+ "collapsed": true
18
19
  }
19
20
  ]
@@ -1 +1 @@
1
- ["plugin-tailwind", "plugin-bff", "plugin-ssg", "plugin-swc"]
1
+ ["api", "life-cycle", "migration"]