@modern-js/main-doc 2.21.1 → 2.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (253) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/docs/en/apis/app/commands.mdx +5 -5
  3. package/docs/en/apis/app/hooks/api/api.mdx +80 -0
  4. package/docs/en/apis/app/hooks/api/app.mdx +12 -0
  5. package/docs/en/apis/app/hooks/api/lambda.mdx +57 -0
  6. package/docs/en/apis/app/hooks/api/test.mdx +1 -1
  7. package/docs/en/apis/app/hooks/config/html.mdx +2 -2
  8. package/docs/en/apis/app/hooks/config/icon.mdx +19 -19
  9. package/docs/en/apis/app/hooks/config/mock.mdx +1 -1
  10. package/docs/en/apis/app/hooks/config/public.mdx +10 -10
  11. package/docs/en/apis/app/hooks/config/storybook.mdx +3 -3
  12. package/docs/en/apis/app/hooks/config/upload.mdx +13 -13
  13. package/docs/en/apis/app/hooks/modern-config.mdx +4 -4
  14. package/docs/en/apis/app/hooks/server/index_.mdx +2 -9
  15. package/docs/en/apis/app/hooks/server/test.mdx +5 -2
  16. package/docs/en/apis/app/hooks/shared.mdx +1 -1
  17. package/docs/en/apis/app/hooks/src/app.mdx +17 -27
  18. package/docs/en/apis/app/hooks/src/index_.mdx +6 -6
  19. package/docs/en/apis/app/hooks/src/pages.mdx +41 -37
  20. package/docs/en/apis/app/hooks/src/routes.mdx +16 -36
  21. package/docs/en/apis/app/hooks/src/server.mdx +1 -1
  22. package/docs/en/apis/app/hooks/src/stories.mdx +6 -3
  23. package/docs/en/apis/app/hooks/src/test.mdx +4 -3
  24. package/docs/en/apis/app/runtime/core/use-runtime-context.mdx +5 -1
  25. package/docs/en/apis/app/runtime/web-server/hook.mdx +2 -2
  26. package/docs/en/apis/app/runtime/web-server/middleware.mdx +2 -2
  27. package/docs/en/components/init-app.mdx +3 -3
  28. package/docs/en/components/init-rspack-app.mdx +4 -4
  29. package/docs/en/components/language-config.mdx +9 -0
  30. package/docs/en/components/package-manager.mdx +11 -0
  31. package/docs/en/components/ua-polyfill.mdx +2 -2
  32. package/docs/en/configure/app/source/config-dir.mdx +1 -1
  33. package/docs/en/configure/app/source/design-system.mdx +67 -67
  34. package/docs/en/configure/app/source/disable-default-entries.mdx +6 -5
  35. package/docs/en/configure/app/source/disable-entry-dirs.mdx +5 -5
  36. package/docs/en/configure/app/source/enable-async-entry.mdx +9 -9
  37. package/docs/en/configure/app/source/entries-dir.mdx +3 -3
  38. package/docs/en/configure/app/source/entries.mdx +21 -19
  39. package/docs/en/configure/app/tools/swc.mdx +2 -2
  40. package/docs/en/guides/advanced-features/bff/frameworks.mdx +2 -2
  41. package/docs/en/guides/advanced-features/bff/function.mdx +4 -4
  42. package/docs/en/guides/advanced-features/bff/type.mdx +5 -5
  43. package/docs/en/guides/advanced-features/rspack-start.mdx +6 -6
  44. package/docs/en/guides/advanced-features/ssg.mdx +2 -2
  45. package/docs/en/guides/advanced-features/testing.mdx +2 -2
  46. package/docs/en/guides/advanced-features/web-server.mdx +2 -2
  47. package/docs/en/guides/basic-features/css.mdx +2 -2
  48. package/docs/en/guides/basic-features/mock.mdx +1 -1
  49. package/docs/en/guides/basic-features/routes.mdx +11 -7
  50. package/docs/en/guides/concept/entries.mdx +3 -3
  51. package/docs/en/guides/topic-detail/generator/create/_category_.json +4 -0
  52. package/docs/en/guides/topic-detail/generator/create/config.mdx +75 -0
  53. package/docs/en/guides/topic-detail/generator/create/option.md +151 -0
  54. package/docs/en/guides/topic-detail/generator/create/use.mdx +66 -0
  55. package/docs/en/guides/topic-detail/generator/new/_category_.json +4 -0
  56. package/docs/en/guides/topic-detail/generator/new/config.md +155 -0
  57. package/docs/en/guides/topic-detail/generator/new/option.md +67 -0
  58. package/docs/en/guides/topic-detail/generator/new/use.md +95 -0
  59. package/docs/en/guides/topic-detail/generator/plugin/_category_.json +2 -2
  60. package/docs/en/guides/topic-detail/generator/plugin/api/_category_.json +1 -1
  61. package/docs/en/guides/topic-detail/generator/plugin/api/afterForged.md +49 -0
  62. package/docs/en/guides/topic-detail/generator/plugin/api/context.md +184 -0
  63. package/docs/en/guides/topic-detail/generator/plugin/api/input.md +124 -0
  64. package/docs/en/guides/topic-detail/generator/plugin/api/onForged.md +310 -0
  65. package/docs/en/guides/topic-detail/generator/plugin/category.md +88 -0
  66. package/docs/en/guides/topic-detail/generator/plugin/context.md +104 -0
  67. package/docs/en/guides/topic-detail/generator/plugin/structure.md +106 -0
  68. package/docs/en/guides/topic-detail/generator/plugin/use.md +33 -0
  69. package/docs/en/guides/topic-detail/micro-frontend/c02-development.mdx +8 -8
  70. package/docs/en/tutorials/first-app/c03-css.mdx +2 -2
  71. package/docs/en/tutorials/first-app/c08-entries.mdx +3 -3
  72. package/docs/zh/apis/app/commands.mdx +3 -3
  73. package/docs/zh/apis/app/hooks/api/{functions/api.mdx → api.mdx} +4 -4
  74. package/docs/zh/apis/app/hooks/api/app.mdx +12 -0
  75. package/docs/zh/apis/app/hooks/api/{framework/lambda.mdx → lambda.mdx} +5 -5
  76. package/docs/zh/apis/app/hooks/api/test.mdx +3 -3
  77. package/docs/zh/apis/app/hooks/config/icon.mdx +15 -15
  78. package/docs/zh/apis/app/hooks/config/mock.mdx +1 -1
  79. package/docs/zh/apis/app/hooks/config/public.mdx +3 -3
  80. package/docs/zh/apis/app/hooks/config/upload.mdx +1 -1
  81. package/docs/zh/apis/app/hooks/modern-config.mdx +3 -3
  82. package/docs/zh/apis/app/hooks/server/index_.mdx +1 -6
  83. package/docs/zh/apis/app/hooks/shared.mdx +1 -1
  84. package/docs/zh/apis/app/hooks/src/app.mdx +15 -25
  85. package/docs/zh/apis/app/hooks/src/index_.mdx +6 -6
  86. package/docs/zh/apis/app/hooks/src/pages.mdx +7 -3
  87. package/docs/zh/apis/app/hooks/src/routes.mdx +4 -4
  88. package/docs/zh/apis/app/hooks/src/stories.mdx +1 -1
  89. package/docs/zh/apis/app/runtime/core/use-runtime-context.mdx +5 -1
  90. package/docs/zh/components/language-config.mdx +9 -0
  91. package/docs/zh/components/package-manager.mdx +11 -0
  92. package/docs/zh/components/ua-polyfill.mdx +1 -1
  93. package/docs/zh/configure/app/source/design-system.mdx +3 -4
  94. package/docs/zh/configure/app/source/enable-async-entry.mdx +2 -5
  95. package/docs/zh/configure/app/source/entries.mdx +2 -2
  96. package/docs/zh/configure/app/tools/swc.mdx +2 -2
  97. package/docs/zh/guides/advanced-features/rspack-start.mdx +6 -6
  98. package/docs/zh/guides/advanced-features/ssg.mdx +1 -1
  99. package/docs/zh/guides/advanced-features/testing.mdx +2 -2
  100. package/docs/zh/guides/advanced-features/web-server.mdx +1 -1
  101. package/docs/zh/guides/basic-features/css.mdx +1 -1
  102. package/docs/zh/guides/basic-features/mock.mdx +1 -1
  103. package/docs/zh/guides/basic-features/routes.mdx +7 -4
  104. package/docs/zh/guides/concept/entries.mdx +3 -3
  105. package/docs/zh/guides/topic-detail/generator/create/_category_.json +4 -0
  106. package/docs/zh/guides/topic-detail/generator/create/config.mdx +76 -0
  107. package/docs/zh/guides/topic-detail/generator/create/option.md +151 -0
  108. package/docs/zh/guides/topic-detail/generator/create/use.mdx +66 -0
  109. package/docs/zh/guides/topic-detail/generator/new/_category_.json +4 -0
  110. package/docs/zh/guides/topic-detail/generator/new/config.md +153 -0
  111. package/docs/zh/guides/topic-detail/generator/new/option.md +67 -0
  112. package/docs/zh/guides/topic-detail/generator/new/use.md +94 -0
  113. package/docs/zh/guides/topic-detail/generator/plugin/_category_.json +2 -2
  114. package/docs/zh/guides/topic-detail/generator/plugin/api/_category_.json +1 -1
  115. package/docs/zh/guides/topic-detail/generator/plugin/api/afterForged.md +50 -0
  116. package/docs/zh/guides/topic-detail/generator/plugin/api/context.md +184 -0
  117. package/docs/zh/guides/topic-detail/generator/plugin/api/input.md +124 -0
  118. package/docs/zh/guides/topic-detail/generator/plugin/api/onForged.md +310 -0
  119. package/docs/zh/guides/topic-detail/generator/plugin/category.md +93 -0
  120. package/docs/zh/guides/topic-detail/generator/plugin/context.md +105 -0
  121. package/docs/zh/guides/topic-detail/generator/plugin/structure.md +106 -0
  122. package/docs/zh/guides/topic-detail/generator/plugin/use.md +33 -0
  123. package/docs/zh/guides/topic-detail/micro-frontend/c02-development.mdx +4 -4
  124. package/docs/zh/guides/topic-detail/model/test-model.mdx +1 -1
  125. package/docs/zh/tutorials/first-app/c03-css.mdx +1 -1
  126. package/docs/zh/tutorials/first-app/c08-entries.mdx +1 -1
  127. package/package.json +5 -5
  128. package/docs/en/apis/app/hooks/api/framework/_category_.json +0 -4
  129. package/docs/en/apis/app/hooks/api/framework/lambda.mdx +0 -57
  130. package/docs/en/apis/app/hooks/api/functions/_category_.json +0 -4
  131. package/docs/en/apis/app/hooks/api/functions/api.mdx +0 -81
  132. package/docs/en/apis/app/hooks/api/functions/app.mdx +0 -12
  133. package/docs/en/apis/app/hooks/api/functions/common.mdx +0 -9
  134. package/docs/en/guides/topic-detail/generator/codesmith/_category_.json +0 -4
  135. package/docs/en/guides/topic-detail/generator/codesmith/api/_category_.json +0 -4
  136. package/docs/en/guides/topic-detail/generator/codesmith/api/app.mdx +0 -152
  137. package/docs/en/guides/topic-detail/generator/codesmith/api/ejs.mdx +0 -56
  138. package/docs/en/guides/topic-detail/generator/codesmith/api/fs.mdx +0 -54
  139. package/docs/en/guides/topic-detail/generator/codesmith/api/git.mdx +0 -50
  140. package/docs/en/guides/topic-detail/generator/codesmith/api/handlebars.mdx +0 -57
  141. package/docs/en/guides/topic-detail/generator/codesmith/api/json.mdx +0 -56
  142. package/docs/en/guides/topic-detail/generator/codesmith/api/npm.mdx +0 -48
  143. package/docs/en/guides/topic-detail/generator/codesmith/develop.mdx +0 -53
  144. package/docs/en/guides/topic-detail/generator/codesmith/introduce.mdx +0 -47
  145. package/docs/en/guides/topic-detail/generator/codesmith/run-in-js.mdx +0 -47
  146. package/docs/en/guides/topic-detail/generator/codesmith/structure.mdx +0 -89
  147. package/docs/en/guides/topic-detail/generator/config/_category_.json +0 -4
  148. package/docs/en/guides/topic-detail/generator/config/app.mdx +0 -82
  149. package/docs/en/guides/topic-detail/generator/config/common.mdx +0 -100
  150. package/docs/en/guides/topic-detail/generator/config/module.mdx +0 -42
  151. package/docs/en/guides/topic-detail/generator/config/monorepo.mdx +0 -28
  152. package/docs/en/guides/topic-detail/generator/plugin/abstract.mdx +0 -23
  153. package/docs/en/guides/topic-detail/generator/plugin/api/file/_category_.json +0 -4
  154. package/docs/en/guides/topic-detail/generator/plugin/api/file/addFile.mdx +0 -52
  155. package/docs/en/guides/topic-detail/generator/plugin/api/file/addHelper.mdx +0 -26
  156. package/docs/en/guides/topic-detail/generator/plugin/api/file/addManyFile.mdx +0 -58
  157. package/docs/en/guides/topic-detail/generator/plugin/api/file/addPartial.mdx +0 -26
  158. package/docs/en/guides/topic-detail/generator/plugin/api/file/introduce.mdx +0 -39
  159. package/docs/en/guides/topic-detail/generator/plugin/api/file/rmDir.mdx +0 -24
  160. package/docs/en/guides/topic-detail/generator/plugin/api/file/rmFile.mdx +0 -24
  161. package/docs/en/guides/topic-detail/generator/plugin/api/file/updateJSONFile.mdx +0 -54
  162. package/docs/en/guides/topic-detail/generator/plugin/api/file/updateModernConfig.mdx +0 -27
  163. package/docs/en/guides/topic-detail/generator/plugin/api/file/updateTextRawFile.mdx +0 -33
  164. package/docs/en/guides/topic-detail/generator/plugin/api/git/_category_.json +0 -4
  165. package/docs/en/guides/topic-detail/generator/plugin/api/git/gitAddAndCommit.mdx +0 -20
  166. package/docs/en/guides/topic-detail/generator/plugin/api/git/initGitRepo.mdx +0 -16
  167. package/docs/en/guides/topic-detail/generator/plugin/api/git/isInGitRepo.mdx +0 -16
  168. package/docs/en/guides/topic-detail/generator/plugin/api/hook/_category_.json +0 -4
  169. package/docs/en/guides/topic-detail/generator/plugin/api/hook/afterForged.mdx +0 -35
  170. package/docs/en/guides/topic-detail/generator/plugin/api/hook/onForged.mdx +0 -35
  171. package/docs/en/guides/topic-detail/generator/plugin/api/info/_category_.json +0 -4
  172. package/docs/en/guides/topic-detail/generator/plugin/api/info/isFileExit.mdx +0 -22
  173. package/docs/en/guides/topic-detail/generator/plugin/api/info/locale.mdx +0 -17
  174. package/docs/en/guides/topic-detail/generator/plugin/api/info/readDir.mdx +0 -22
  175. package/docs/en/guides/topic-detail/generator/plugin/api/input/_category_.json +0 -4
  176. package/docs/en/guides/topic-detail/generator/plugin/api/input/addInputAfter.mdx +0 -55
  177. package/docs/en/guides/topic-detail/generator/plugin/api/input/addInputBefore.mdx +0 -55
  178. package/docs/en/guides/topic-detail/generator/plugin/api/input/setInput.mdx +0 -43
  179. package/docs/en/guides/topic-detail/generator/plugin/api/input/setInputValue.mdx +0 -31
  180. package/docs/en/guides/topic-detail/generator/plugin/api/input/type.mdx +0 -65
  181. package/docs/en/guides/topic-detail/generator/plugin/api/introduce.mdx +0 -90
  182. package/docs/en/guides/topic-detail/generator/plugin/api/new/_category_.json +0 -4
  183. package/docs/en/guides/topic-detail/generator/plugin/api/new/createElement.mdx +0 -33
  184. package/docs/en/guides/topic-detail/generator/plugin/api/new/createSubProject.mdx +0 -35
  185. package/docs/en/guides/topic-detail/generator/plugin/api/new/enableFunc.mdx +0 -44
  186. package/docs/en/guides/topic-detail/generator/plugin/api/new/introduce.mdx +0 -15
  187. package/docs/en/guides/topic-detail/generator/plugin/api/npm/_category_.json +0 -4
  188. package/docs/en/guides/topic-detail/generator/plugin/api/npm/install.mdx +0 -18
  189. package/docs/en/guides/topic-detail/generator/plugin/develop.mdx +0 -125
  190. package/docs/en/guides/topic-detail/generator/plugin/use.mdx +0 -61
  191. package/docs/en/guides/topic-detail/generator/project.mdx +0 -118
  192. package/docs/zh/apis/app/hooks/api/framework/_category_.json +0 -4
  193. package/docs/zh/apis/app/hooks/api/functions/_category_.json +0 -4
  194. package/docs/zh/apis/app/hooks/api/functions/app.mdx +0 -12
  195. package/docs/zh/apis/app/hooks/api/functions/common.mdx +0 -9
  196. package/docs/zh/guides/topic-detail/generator/codesmith/_category_.json +0 -4
  197. package/docs/zh/guides/topic-detail/generator/codesmith/api/_category_.json +0 -4
  198. package/docs/zh/guides/topic-detail/generator/codesmith/api/app.mdx +0 -152
  199. package/docs/zh/guides/topic-detail/generator/codesmith/api/ejs.mdx +0 -56
  200. package/docs/zh/guides/topic-detail/generator/codesmith/api/fs.mdx +0 -54
  201. package/docs/zh/guides/topic-detail/generator/codesmith/api/git.mdx +0 -49
  202. package/docs/zh/guides/topic-detail/generator/codesmith/api/handlebars.mdx +0 -56
  203. package/docs/zh/guides/topic-detail/generator/codesmith/api/json.mdx +0 -56
  204. package/docs/zh/guides/topic-detail/generator/codesmith/api/npm.mdx +0 -47
  205. package/docs/zh/guides/topic-detail/generator/codesmith/develop.mdx +0 -53
  206. package/docs/zh/guides/topic-detail/generator/codesmith/introduce.mdx +0 -59
  207. package/docs/zh/guides/topic-detail/generator/codesmith/run-in-js.mdx +0 -47
  208. package/docs/zh/guides/topic-detail/generator/codesmith/structure.mdx +0 -89
  209. package/docs/zh/guides/topic-detail/generator/config/_category_.json +0 -4
  210. package/docs/zh/guides/topic-detail/generator/config/app.mdx +0 -82
  211. package/docs/zh/guides/topic-detail/generator/config/common.mdx +0 -100
  212. package/docs/zh/guides/topic-detail/generator/config/module.mdx +0 -42
  213. package/docs/zh/guides/topic-detail/generator/config/monorepo.mdx +0 -28
  214. package/docs/zh/guides/topic-detail/generator/plugin/abstract.mdx +0 -23
  215. package/docs/zh/guides/topic-detail/generator/plugin/api/file/_category_.json +0 -4
  216. package/docs/zh/guides/topic-detail/generator/plugin/api/file/addFile.mdx +0 -52
  217. package/docs/zh/guides/topic-detail/generator/plugin/api/file/addHelper.mdx +0 -26
  218. package/docs/zh/guides/topic-detail/generator/plugin/api/file/addManyFile.mdx +0 -55
  219. package/docs/zh/guides/topic-detail/generator/plugin/api/file/addPartial.mdx +0 -26
  220. package/docs/zh/guides/topic-detail/generator/plugin/api/file/introduce.mdx +0 -39
  221. package/docs/zh/guides/topic-detail/generator/plugin/api/file/rmDir.mdx +0 -24
  222. package/docs/zh/guides/topic-detail/generator/plugin/api/file/rmFile.mdx +0 -24
  223. package/docs/zh/guides/topic-detail/generator/plugin/api/file/updateJSONFile.mdx +0 -54
  224. package/docs/zh/guides/topic-detail/generator/plugin/api/file/updateModernConfig.mdx +0 -27
  225. package/docs/zh/guides/topic-detail/generator/plugin/api/file/updateTextRawFile.mdx +0 -33
  226. package/docs/zh/guides/topic-detail/generator/plugin/api/git/_category_.json +0 -4
  227. package/docs/zh/guides/topic-detail/generator/plugin/api/git/gitAddAndCommit.mdx +0 -20
  228. package/docs/zh/guides/topic-detail/generator/plugin/api/git/initGitRepo.mdx +0 -16
  229. package/docs/zh/guides/topic-detail/generator/plugin/api/git/isInGitRepo.mdx +0 -16
  230. package/docs/zh/guides/topic-detail/generator/plugin/api/hook/_category_.json +0 -4
  231. package/docs/zh/guides/topic-detail/generator/plugin/api/hook/afterForged.mdx +0 -35
  232. package/docs/zh/guides/topic-detail/generator/plugin/api/hook/onForged.mdx +0 -35
  233. package/docs/zh/guides/topic-detail/generator/plugin/api/info/_category_.json +0 -4
  234. package/docs/zh/guides/topic-detail/generator/plugin/api/info/isFileExit.mdx +0 -22
  235. package/docs/zh/guides/topic-detail/generator/plugin/api/info/locale.mdx +0 -17
  236. package/docs/zh/guides/topic-detail/generator/plugin/api/info/readDir.mdx +0 -22
  237. package/docs/zh/guides/topic-detail/generator/plugin/api/input/_category_.json +0 -4
  238. package/docs/zh/guides/topic-detail/generator/plugin/api/input/addInputAfter.mdx +0 -57
  239. package/docs/zh/guides/topic-detail/generator/plugin/api/input/addInputBefore.mdx +0 -56
  240. package/docs/zh/guides/topic-detail/generator/plugin/api/input/setInput.mdx +0 -43
  241. package/docs/zh/guides/topic-detail/generator/plugin/api/input/setInputValue.mdx +0 -29
  242. package/docs/zh/guides/topic-detail/generator/plugin/api/input/type.mdx +0 -65
  243. package/docs/zh/guides/topic-detail/generator/plugin/api/introduce.mdx +0 -92
  244. package/docs/zh/guides/topic-detail/generator/plugin/api/new/_category_.json +0 -4
  245. package/docs/zh/guides/topic-detail/generator/plugin/api/new/createElement.mdx +0 -33
  246. package/docs/zh/guides/topic-detail/generator/plugin/api/new/createSubProject.mdx +0 -35
  247. package/docs/zh/guides/topic-detail/generator/plugin/api/new/enableFunc.mdx +0 -44
  248. package/docs/zh/guides/topic-detail/generator/plugin/api/new/introduce.mdx +0 -15
  249. package/docs/zh/guides/topic-detail/generator/plugin/api/npm/_category_.json +0 -4
  250. package/docs/zh/guides/topic-detail/generator/plugin/api/npm/install.mdx +0 -16
  251. package/docs/zh/guides/topic-detail/generator/plugin/develop.mdx +0 -125
  252. package/docs/zh/guides/topic-detail/generator/plugin/use.mdx +0 -61
  253. package/docs/zh/guides/topic-detail/generator/project.mdx +0 -118
@@ -7,8 +7,8 @@ sidebar_label: designSystem
7
7
  - **Type:** `Object`
8
8
  - **Default:** See configuration details below.
9
9
 
10
- :::caution Caution
11
- You need to enable the Tailwind CSS feature through `pnpm run new` first.
10
+ :::caution
11
+ Tailwind CSS feature needs to be enabled first by running `pnpm run new`.
12
12
 
13
13
  :::
14
14
 
@@ -645,22 +645,22 @@ const designSystem = {
645
645
  };
646
646
  ```
647
647
 
648
+ </details>
649
+
648
650
  :::tip
649
- More about: <a href="https://tailwindcss.com/docs/configuration#theme" target="_blank">TailwindCSS configuration</a>.
651
+ For more information on TailwindCSS configuration, please refer to [here](https://tailwindcss.com/docs/configuration#theme).
650
652
 
651
653
  :::
652
654
 
653
- </details>
654
-
655
- `designSystem` is used to define the project's color palette, typographic scale (Typographic Scales or Type Scale), font list, breakpoints, border rounded values, and more. Because Modern.js borrowed the design method of Tailwind Theme, and also integrates Tailwind CSS internally, the `designSystem` is used in the same way as Tailwind CSS Theme.
655
+ The `designSystem` is used to define the project's color palette, typographic scales, font list, breakpoints, border radius values, and more. As Modern.js uses the design approach of Tailwind Theme and also integrates Tailwind CSS internally, the usage of `designSystem` is the same as that of Tailwind CSS Theme.
656
656
 
657
657
  ### Structure
658
658
 
659
- The `designSystem` object contains properties for `screens`, `colors`, and `spacing`, as well as each customizable core plugin.
659
+ The `designSystem` object contains properties for `screens`, `colors`, `spacing`, and each customizable core plugin.
660
660
 
661
661
  #### Screens
662
662
 
663
- Use `screens` to customize response breakpoints in your project:
663
+ Use `screens` to customize the responsive breakpoints in your project:
664
664
 
665
665
  ```js
666
666
  const designSystem = {
@@ -673,9 +673,9 @@ const designSystem = {
673
673
  };
674
674
  ```
675
675
 
676
- Where the property name in the `screens` object is the screen name (used as a prefix for adaptive utility variants generated by `Tailwind CSS`, such as `md:text-center`), and the value is the `min-width` at which the breakpoint should begin.
676
+ The property names in the `screens` object are screen names (used as prefixes for the responsive utility variants generated by TailwindCSS, such as `md:text-center`), and the values are the `min-width` at which the breakpoint should start.
677
677
 
678
- Default breakpoints are inspired by common device resolutions:
678
+ The default breakpoints are inspired by common device resolutions:
679
679
 
680
680
  ```js
681
681
  const designSystem = {
@@ -695,7 +695,7 @@ const designSystem = {
695
695
  };
696
696
  ```
697
697
 
698
- You can use any name you like as a breakpoint property in your project:
698
+ You can use any names you like as properties for your breakpoints in your project:
699
699
 
700
700
  ```js
701
701
  const designSystem = {
@@ -712,7 +712,7 @@ const designSystem = {
712
712
  };
713
713
  ```
714
714
 
715
- These screen names are reflected in `utilities`, so `text-center` now looks like this:
715
+ These screen names are reflected in `utilities`, so `text-center` would now look like this:
716
716
 
717
717
  ```css
718
718
  .text-center {
@@ -738,9 +738,9 @@ These screen names are reflected in `utilities`, so `text-center` now looks like
738
738
  }
739
739
  ```
740
740
 
741
- ##### Max-width breakpoint
741
+ ##### Max-width Breakpoint
742
742
 
743
- If you want to use a `max-width` breakpoint instead of a `min-width`, you can specify the screen as an object with a `max` property:
743
+ If you want to use `max-width` breakpoints instead of `min-width`, you can specify the screen as an object with a `max` property:
744
744
 
745
745
  ```js
746
746
  const designSystem = {
@@ -760,7 +760,7 @@ const designSystem = {
760
760
  };
761
761
  ```
762
762
 
763
- If necessary, to create breakpoints with `min-width` and `max-width` definitions, for example:
763
+ If necessary, you can create breakpoints with both `min-width` and `max-width` definitions, like so:
764
764
 
765
765
  ```js
766
766
  const designSystem = {
@@ -773,11 +773,11 @@ const designSystem = {
773
773
  };
774
774
  ```
775
775
 
776
- ##### Multiple ranges of breakpoints
776
+ ##### Breakpoints with Multiple Ranges
777
777
 
778
- Sometimes it is useful to apply a single breakpoint definition to multiple scopes.
778
+ Sometimes it can be useful to apply a single breakpoint definition to multiple ranges.
779
779
 
780
- For example, let's say you have a `sidebar` and want the breakpoint to be based on the width of the content area rather than the entire viewport. You can simulate this situation, using a smaller breakpoint style when the `sidebar` is visible and shrinks the content area:
780
+ For example, suppose you have a `sidebar` and want to base the breakpoints on the width of the content area rather than the entire viewport. You can simulate this by using a smaller breakpoint style when the `sidebar` is visible and the content area is reduced:
781
781
 
782
782
  ```js
783
783
  const designSystem = {
@@ -796,9 +796,9 @@ const designSystem = {
796
796
  };
797
797
  ```
798
798
 
799
- ##### Custom media queries
799
+ ##### Custom Media Queries
800
800
 
801
- If you need to provide a fully customized media query for the breakpoint, you can use an object with a `raw` attribute:
801
+ If you need to provide fully custom media queries for your breakpoints, you can use an object with a `raw` property:
802
802
 
803
803
  ```js
804
804
  const designSystem = {
@@ -813,9 +813,9 @@ const designSystem = {
813
813
 
814
814
  ##### Print Style
815
815
 
816
- The `raw` option can be especially useful if you need to apply a different style to the print.
816
+ The `raw` option may be especially useful if you need to apply different styles for printing.
817
817
 
818
- All you need to do is add a `print` in `designSystem.extend.screens`:
818
+ All you need to do is add a `print` under `designSystem.extend.screens`:
819
819
 
820
820
  ```js
821
821
  const designSystem = {
@@ -828,7 +828,7 @@ const designSystem = {
828
828
  };
829
829
  ```
830
830
 
831
- You can then use a class like `print:text-black` to specify styles that are only applied when someone tries to print a page:
831
+ Then, you can use classes like `print:text-black` to specify styles that should only be applied when someone tries to print the page:
832
832
 
833
833
  ```html
834
834
  <div class="text-gray-700 print:text-black">
@@ -838,7 +838,7 @@ You can then use a class like `print:text-black` to specify styles that are only
838
838
 
839
839
  ##### Dark Mode
840
840
 
841
- The `raw` option can be used to implement the "dark mode" screen:
841
+ The `raw` option can be used to implement "dark mode" screens:
842
842
 
843
843
  ```js
844
844
  const designSystem = {
@@ -851,7 +851,7 @@ const designSystem = {
851
851
  };
852
852
  ```
853
853
 
854
- You can then style the element differently in dark mode using the `dark:` prefix:
854
+ Then, you can use the `dark:` prefix to set different styles for elements in dark mode:
855
855
 
856
856
  ```html
857
857
  <div class="text-gray-700 dark:text-gray-200">
@@ -859,11 +859,11 @@ You can then style the element differently in dark mode using the `dark:` prefix
859
859
  </div>
860
860
  ```
861
861
 
862
- Note that since these `screen variants` are implemented in `Tailwind CSS`, ** you cannot use this method to combine breakpoints with dark modes **, for example `md:dark:text-gray-300` will not work.
862
+ Please note that since these screen variants are implemented in TailwindCSS, **it is not possible to use this method to combine breakpoints with dark mode**, e.g. `md:dark:text-gray-300` will not work.
863
863
 
864
864
  #### Colors
865
865
 
866
- The `colors` property allows you to customize the global palette of your project.
866
+ The `colors` property allows you to customize the global color palette for your project.
867
867
 
868
868
  ```js
869
869
  const designSystem = {
@@ -884,11 +884,11 @@ const designSystem = {
884
884
 
885
885
  By default, these colors are inherited by the `backgroundColor`, `textColor`, and `borderColor` core plugins.
886
886
 
887
- o learn more, see: [Customizing Colors](https://tailwindcss.com/docs/customizing-colors).
887
+ For more information, see [Customizing Colors](https://tailwindcss.com/docs/customizing-colors).
888
888
 
889
889
  #### Spacing
890
890
 
891
- Using the `space` property, you can customize the global spacing and scaling of items:
891
+ Use the `space` property to customize the global spacing and scale ratios for your project:
892
892
 
893
893
  ```js
894
894
  const designSystem = {
@@ -918,13 +918,13 @@ const designSystem = {
918
918
 
919
919
  By default, these values are inherited by the `padding`, `margin`, `negativeMargin`, `width`, and `height` core plugins.
920
920
 
921
- To learn more, see: [Customizing Spacing](https://tailwindcss.com/docs/customizing-spacing).
921
+ For more information, see [Customizing Spacing](https://tailwindcss.com/docs/customizing-spacing).
922
922
 
923
- #### Core plugins
923
+ #### Core Plugins
924
924
 
925
- The rest of the topic section is used to configure the values available for each core plugin.
925
+ The rest of the theme section is used to configure the values available for each core plugin.
926
926
 
927
- For example, the `borderRadius` property allows you to customize the `utilities` of the rounded corners that will be generated:
927
+ For example, the `borderRadius` property allows you to customize the `utilities` for the generated border radius:
928
928
 
929
929
  ```js
930
930
  const designSystem = {
@@ -938,7 +938,7 @@ const designSystem = {
938
938
  };
939
939
  ```
940
940
 
941
- ** The property name determines the suffix of the generated class, and the value determines the value of the actual CSS declaration. ** The example `borderRadius` configuration above will generate the following CSS class:
941
+ **The property name determines the suffix of the generated classes, and the value determines the value of the actual CSS declaration.** The `borderRadius` configuration example above will generate the following CSS classes:
942
942
 
943
943
  ```css
944
944
  .rounded-none {
@@ -958,17 +958,17 @@ const designSystem = {
958
958
  }
959
959
  ```
960
960
 
961
- You will notice that the `rounded` class is created without the suffix using the `default` property in the theme configuration. This is a common convention in Tailwind CSS supported by many, though not all, core plugins.
961
+ You may notice that the `rounded` class without a suffix is created using the `default` property in the theme configuration. This is a common convention in Tailwind CSS that many (although not all) core plugins support.
962
962
 
963
- To learn more about customizing a specific core plugin, visit the plugin's documentation.
963
+ For more information on customizing specific core plugins, see the documentation for that plugin.
964
964
 
965
- ### Custom default configuration
965
+ ### Customizing the Default Configuration
966
966
 
967
- Out of the box, your project will automatically inherit values from the default theme configuration. If you want to customize the default theme, you have several different options depending on the target.
967
+ Out of the box, your project will inherit values from the default theme configuration. If you want to customize the default theme, there are a few different options depending on your goals.
968
968
 
969
- #### Override default configuration
969
+ #### Overriding Default Configuration
970
970
 
971
- To override the options in the default configuration, add the properties to override in `designSystem`:
971
+ To override an option in the default configuration, add the property you want to override to `designSystem`:
972
972
 
973
973
  ```ts title="modern.config.ts"
974
974
  const designSystem = {
@@ -990,15 +990,15 @@ export default defineConfig({
990
990
  });
991
991
  ```
992
992
 
993
- This completely replaces the default property configuration, so in the example above, the default `opacity utilities` is not generated.
993
+ This will completely replace the default property configuration, so in the example above, the default `opacity utilities` will not be generated.
994
994
 
995
- Any properties you don't provide will be inherited from the default theme, so in the example above, the default theme configuration for color, spacing, border rounded corners, background position, and more will be preserved.
995
+ Any properties you don't provide will still inherit from the default theme, so in the example above, the default theme configuration for colors, spacing, border radius, background positions, etc. will be preserved.
996
996
 
997
- #### Extension default configuration
997
+ #### Extending Default Configuration
998
998
 
999
- If you want to keep the default value for the theme option, but want to add a new value, add the extended content in the `designSystem.extend` property.
999
+ If you want to keep the default values for a theme option but add new values, add the extension under the `designSystem.extend` property.
1000
1000
 
1001
- For example, if you want to add an additional breakpoint but keep the existing one, you can extend the `screens` property:
1001
+ For example, if you want to add an additional breakpoint but keep the existing ones, you can extend the `screens` property:
1002
1002
 
1003
1003
  ```ts title="modern.config.ts"
1004
1004
  const designSystem = {
@@ -1017,7 +1017,7 @@ export default defineConfig({
1017
1017
  });
1018
1018
  ```
1019
1019
 
1020
- You can of course override some parts of the default theme and extend other parts of the default theme in the same configuration:
1020
+ Of course, you can override some parts of the default theme and extend other parts of the default theme in the same configuration:
1021
1021
 
1022
1022
  ```ts title="modern.config.ts"
1023
1023
  const designSystem = {
@@ -1043,11 +1043,11 @@ export default defineConfig({
1043
1043
  });
1044
1044
  ```
1045
1045
 
1046
- #### Reference other values
1046
+ #### Referencing Other Values
1047
1047
 
1048
- If you need to reference another value in the configuration, you can do so by providing a closure function instead of a static value. The function will receive a `theme()` function as an argument, which you can use to look up other values in the configuration using dot notation.
1048
+ If you need to reference another value in your configuration, you can do so by providing a closure function instead of a static value. The function will receive the `theme()` function as an argument, which you can use to look up other values in the configuration using dot notation.
1049
1049
 
1050
- For example, you can generate a `fill` utility for each color in the palette by referencing `theme('colors')` on a `fill` configuration.
1050
+ For example, you can generate `fill` utilities for each color in your palette by referencing `theme('colors')` on the `fill` configuration:
1051
1051
 
1052
1052
  ```ts title="modern.config.ts"
1053
1053
  const designSystem = {
@@ -1064,11 +1064,11 @@ export default defineConfig({
1064
1064
  });
1065
1065
  ```
1066
1066
 
1067
- The `theme()` function tries to find the value you're looking for from a fully merged configuration object, so it can reference your own custom settings as well as default theme values. It also works recursively, so as long as there's a static value at the end of the chain, it can parse the value you're looking for.
1067
+ The `theme()` function attempts to find the value you're looking for from the fully merged configuration object, so it can reference your own custom settings as well as default theme values. It also works recursively, so as long as there's a static value at the end of the chain, it can resolve the value you're looking for.
1068
1068
 
1069
- **Reference default configuration**
1069
+ **Referencing Default Configuration**
1070
1070
 
1071
- If you want to reference a value in the default configuration for any reason, you can import it from `tailwindcss/defaultTheme`. A useful example is if you want to add one of the fonts provided by the default configuration:
1071
+ If you want to reference a value from the default configuration for any reason, you can import it from `tailwindcss/defaultTheme`. A useful example is if you want to add a font from the fonts provided by the default configuration:
1072
1072
 
1073
1073
  ```ts title="modern.config.ts"
1074
1074
  const defaultTheme = require('tailwindcss/defaultTheme');
@@ -1088,9 +1088,9 @@ export default defineConfig({
1088
1088
  });
1089
1089
  ```
1090
1090
 
1091
- #### Disable the entire core plugin
1091
+ #### Disabling Entire Core Plugins
1092
1092
 
1093
- If you don't want to generate any classes for a core plugin, it's better to set the plugin to `false` in the `corePlugins` configuration instead of providing an empty object for this property in the configuration:
1093
+ If you don't want to generate any classes for a particular core plugin, it's best to set that plugin to `false` in the `corePlugins` configuration rather than providing an empty object for that property in the configuration:
1094
1094
 
1095
1095
  ```js
1096
1096
  // Don't assign an empty object in your theme configuration
@@ -1107,13 +1107,13 @@ const designSyttem = {
1107
1107
  };
1108
1108
  ```
1109
1109
 
1110
- The end result is the same, but since many core plugins don't expose any configuration, they can only be disabled using `corePlugins` anyway, and it's best to keep them consistent.
1110
+ The end result is the same, but since many core plugins don't expose any configuration, they can only be disabled using `corePlugins`, so it's best to be consistent.
1111
1111
 
1112
- #### Add your own key
1112
+ #### Adding Your Own Keys
1113
1113
 
1114
- In many cases, it can be useful to add your own properties to the configuration object.
1114
+ In many cases, adding your own properties to the configuration object can be useful.
1115
1115
 
1116
- An example of this is adding new properties for reuse between multiple core plugins. For example, you can extract a `positions` object that both the `backgroundPosition` and `objectPosition` plugins can reference:
1116
+ One example of this is adding a new property for reuse between multiple core plugins. For example, you could extract a `positions` object that both the `backgroundPosition` and `objectPosition` plugins could reference:
1117
1117
 
1118
1118
  ```js
1119
1119
  const designSystem = {
@@ -1133,7 +1133,7 @@ const designSystem = {
1133
1133
  };
1134
1134
  ```
1135
1135
 
1136
- Another example is adding new attributes to a custom plugin for reference. For example, if you wrote a gradual change plugin for a project, you can add a gradual change attribute to the subject object referenced by the plugin:
1136
+ Another example is adding new properties for reference in custom plugins. For example, if you've written a gradient plugin for your project, you could add a `gradients` property to the theme object that the plugin references:
1137
1137
 
1138
1138
  ```ts title="modern.config.ts"
1139
1139
  const designSystem = {
@@ -1156,20 +1156,20 @@ export default defineConfig({
1156
1156
  });
1157
1157
  ```
1158
1158
 
1159
- ### Configure reference
1159
+ ### Configuration Reference
1160
1160
 
1161
- With the exception of `screens`, `colors`, and `spacing`, all properties in the configuration object map to the core plugin of `Tailwind CSS`. Since many plugins are responsible for accepting only CSS properties for static value sets (eg `float`), note that not every plugin has corresponding properties in the theme object.
1161
+ In addition to `screens`, `colors`, and `spacing`, all properties in the configuration object map to core plugins in TailwindCSS. Because many plugins are responsible for CSS properties that only accept a set of static values (e.g. `float`), not every plugin has a corresponding property in the theme object.
1162
1162
 
1163
- All of these properties can also be used in the `designSystem.extend` property to extend the default theme.
1163
+ All of these properties can also be extended from the default theme under the `designSystem.extend` property.
1164
1164
 
1165
- See this [link](https://tailwindcss.com/docs/theme#configuration-reference) for what all properties do.
1165
+ For a complete list of all properties and their effects, see this [link](https://tailwindcss.com/docs/theme#configuration-reference).
1166
1166
 
1167
- ### Additional configuration
1167
+ ### Additional Configuration
1168
1168
 
1169
- In addition to the same configuration as the Tailwind CSS Theme, there are additional configurations available Modern.js.
1169
+ In addition to the configuration that is the same as Tailwind CSS Theme, there is additional configuration provided by Modern.js.
1170
1170
 
1171
1171
  #### source.designSystem.supportStyledComponents
1172
1172
 
1173
- The configuration type is `boolean` and defaults to `false`.
1173
+ This configuration is of type `boolean` and defaults to `false`.
1174
1174
 
1175
- When the configuration value is `true`, the runtime provides the `styled-components` `ThemeProvider` component outside the application and will inject it through the `Theme Token` object generated by `designSystem`.
1175
+ When this configuration value is `true`, a `styled-components` `ThemeProvider` component is provided at the outermost layer of the application at runtime, and the `Theme Token` object generated through `designSystem` is injected.
@@ -7,13 +7,14 @@ sidebar_label: disableDefaultEntries
7
7
  - **Type:** `boolean`
8
8
  - **Default:** `false`
9
9
 
10
- Used to disable the function of automatically identifying the page entry according to the project directory structure.
10
+ Used to disable the functionality of automatically identifying page entry points based on directory structure.
11
11
 
12
12
  :::info
13
- By default, Modern.js will get the page entries according to the project directory structure. For details, please refer to [Entry](/guides/concept/entries).
13
+ By default, Modern.js automatically determines the entry points of pages based on directory conventions, as described in [Entries](/guides/concept/entries).
14
+
14
15
  :::
15
16
 
16
- Set the following to disable the default behavior:
17
+ To disable this default behavior, set the following:
17
18
 
18
19
  ```ts title="modern.config.ts"
19
20
  export default defineConfig({
@@ -23,9 +24,9 @@ export default defineConfig({
23
24
  });
24
25
  ```
25
26
 
26
- After turning off the default behavior, you need to use [`source.entries`](/configure/app/source/entries) to configure custom entries.
27
+ After disabling the default behavior, you will need to use the [`source.entries`](/configure/app/source/entries) configuration to define custom entry points.
27
28
 
28
29
  :::warning
29
- We recommend using the directory convention provided by Modern.js to organize the code, so as to better use the functions of the framework and avoid some redundant configurations.
30
+ We recommend organizing your code using the directory conventions provided by Modern.js to make better use of the framework's functionality and to avoid some redundant configurations.
30
31
 
31
32
  :::
@@ -7,9 +7,9 @@ sidebar_label: disableEntryDirs
7
7
  - **Type:** `string[]`
8
8
  - **Default:** `[]`
9
9
 
10
- By default, application entries are identified based on the `src` directory, you can disable some directories from being identified as application entries with this option.
10
+ By default, Modern.js identifies the application entry point based on the `src` directory. You can use this option to prevent some directories from being recognized as application entry points.
11
11
 
12
- For example, when the configuration and directory structure is as follows:
12
+ For example, with the following configuration and directory structure:
13
13
 
14
14
  ```ts title="modern.config.ts"
15
15
  export default defineConfig({
@@ -28,11 +28,11 @@ export default defineConfig({
28
28
  └── env.d.ts
29
29
  ```
30
30
 
31
- When this option is not set, Modern.js will generate two entries based on the project directory:
31
+ Without setting this configuration option, Modern.js will produce two entries based on the project directory:
32
32
 
33
33
  - one
34
34
  - two
35
35
 
36
- When this option is set, `src/one` will not be recognized as an entry directory.
36
+ After setting this configuration option, the `src/one` directory will not be recognized as an entry directory.
37
37
 
38
- A common usage is to configure the `src/common`, `src/components` directories to this option to avoid these directories being recognized as application entries.
38
+ A common use case is to configure the `src/common` and `src/components` directories in this option to prevent them from being recognized as application entry points.
@@ -7,17 +7,17 @@ sidebar_label: enableAsyncEntry
7
7
  - **Type:** `boolean`
8
8
  - **Default:** `false`
9
9
 
10
- This option is used in the webpack Module Federation scenario.
10
+ This option is used for webpack Module Federation scenario.
11
11
 
12
- When this option is turned on, the Modern.js wraps the automatically generated asynchronous boundary via Dynamic Import, allowing the page code to consume remote modules generated by the module federation.
12
+ When this option is enabled, Modern.js will wrap the automatically generated entry files with Dynamic Imports (Asynchronous Boundaries), allowing page code to consume remote modules generated by Module Federation.
13
13
 
14
- ## Background knowledge
14
+ ## Background
15
15
 
16
- If you don't know webpack module federation, please read the official [Module Federation documentation](https://webpack.js.org/concepts/module-federation) first.
16
+ If you are not familiar with webpack Module Federation, please read the [Module Federation documentation](https://webpack.js.org/concepts/module-federation/).
17
17
 
18
18
  ## Example
19
19
 
20
- First, turn this option on in the configuration file:
20
+ First, enable this option in the configuration file:
21
21
 
22
22
  ```ts title="modern.config.ts"
23
23
  export default defineConfig({
@@ -27,7 +27,7 @@ export default defineConfig({
27
27
  });
28
28
  ```
29
29
 
30
- Then execute the `dev` or `build` command, and you can see Modern.js automatically generated file becomes the following structure:
30
+ Then run the `dev` or `build` command, and you will see that the files automatically generated by Modern.js have the following structure:
31
31
 
32
32
  ```bash
33
33
  node_modules
@@ -38,15 +38,15 @@ node_modules
38
38
  └─ index.html
39
39
  ```
40
40
 
41
- The `index.js` reads as follows:
41
+ The contents of `index.js` are as follows:
42
42
 
43
43
  ```js
44
44
  import('./bootstrap.jsx');
45
45
  ```
46
46
 
47
- At this point, you can consume any remote modules in the current page.
47
+ At this point, you can consume any remote module in the current page.
48
48
 
49
49
  :::info
50
- Modern.js the ModuleFederationPlugin of webpack is not encapsulated, please configure the ModuleFederationPlugin yourself through [tools.webpack Chain](/configure/app/tools/webpack-chain).
50
+ Modern.js does not have webpack's ModuleFederationPlugin plugin built in. Please configure the ModuleFederationPlugin yourself via [tools.webpackChain](/configure/app/tools/webpack-chain).
51
51
 
52
52
  :::
@@ -7,9 +7,9 @@ sidebar_label: entriesDir
7
7
  - **Type:** `string`
8
8
  - **Default:** `./src`
9
9
 
10
- Modern.js will scan the `src` directory by default to identify the page entries, you can customize the identification directory of the page entries through this option.
10
+ By default, Modern.js scans the `src` directory to identify page entries. You can customize the directory used for identifying page entries with this option.
11
11
 
12
- For example, when the configuration and directory structure are as follows:
12
+ For example, with the following configuration and directory structure:
13
13
 
14
14
  ```ts title="modern.config.ts"
15
15
  export default defineConfig({
@@ -29,7 +29,7 @@ export default defineConfig({
29
29
  └── App.tsx
30
30
  ```
31
31
 
32
- Modern.js will generate the build entry `a` and `b` according to the `./src/pages` directory structure, the result is as follows:
32
+ Modern.js will generate the build entries `a` and `b` based on the `./src/pages` directory structure. The result is as follows:
33
33
 
34
34
  ```js
35
35
  const entry = {
@@ -18,20 +18,20 @@ type Entries = Record<
18
18
  >;
19
19
  ```
20
20
 
21
- - **Default:** An entry object calculated from the directory structure of the current project.
21
+ - **Default:** The entry object calculated based on the directory structure of the current project.
22
22
 
23
23
  Used to configure custom page entries.
24
24
 
25
25
  :::tip When to use
26
- For most scenarios, the entries automatically generated by Modern.js according to the directory structure can already meet the requirements. For details, please refer to [entries](/guides/concept/entries).
26
+ For most scenarios, the entry automatically generated by Modern.js based on the directory structure can meet the requirements. For details, please refer to [Entry](/guides/concept/entries).
27
27
 
28
- If you need to customize the page entry, you can set it through this option.
28
+ If you need to customize page entries, you can set them through this option.
29
29
 
30
30
  :::
31
31
 
32
32
  ## String
33
33
 
34
- When the value of `entries` object is `string` type, it means the file path of the entry module:
34
+ When the value of the `entries` object is of type `string`, it represents the file path of the entry module:
35
35
 
36
36
  ```ts title="modern.config.ts"
37
37
  import { defineConfig } from '@modern-js/app-tools';
@@ -47,9 +47,9 @@ export default defineConfig({
47
47
  });
48
48
  ```
49
49
 
50
- By default, the configured entry is equivalent to `App.[jt]sx`, that is, the specified entry file **only needs to export the root component of the application**.
50
+ By default, the configured entry is equivalent to `App.[jt]sx`, which means that the specified entry file **only needs to export the root component of the application**.
51
51
 
52
- For example the following directory structure:
52
+ For example, the following directory structure:
53
53
 
54
54
  ```bash
55
55
  .
@@ -60,9 +60,9 @@ For example the following directory structure:
60
60
  └── package.json
61
61
  ```
62
62
 
63
- The above directory does not conform to the directory structure convention of Modern.js, therefore, Modern.js will not get any default entry when analyzing the directory structure.
63
+ The above directory does not conform to the directory structure convention of Modern.js, so Modern.js will not get any default entries when analyzing the directory structure.
64
64
 
65
- In cases where you do not want to change the directory structure (such as project migration), you can customize the entry through `source.entries`:
65
+ If you do not want to change the directory structure (such as project migration), you can customize the entry through `source.entries`:
66
66
 
67
67
  ```ts title="modern.config.ts"
68
68
  export default defineConfig({
@@ -78,11 +78,11 @@ export default defineConfig({
78
78
 
79
79
  ## Object
80
80
 
81
- When the value is `Object`, the following properties can be configured:
81
+ When the value is `Object`, the following attributes can be configured:
82
82
 
83
- - `entry`: `string`, entry file path.
84
- - `disableMount`: `boolean = false`, turn off the entry-scanning behavior of Modern.js.
85
- - `customBootstrap`: `string = ''`, [Custom Bootstrap](/guides/concept/entries#custom-bootstrap) file path。
83
+ - `entry`: `string`, the entry file path.
84
+ - `disableMount`: `boolean = false`, disable Modern.js's behavior of automatically generating entry code.
85
+ - `customBootstrap`: `string = ''`, specify the file path of [custom Bootstrap](/guides/concept/entries#custom-bootstrap).
86
86
 
87
87
  ```ts title="modern.config.ts"
88
88
  import { defineConfig } from '@modern-js/app-tools';
@@ -95,6 +95,7 @@ export default defineConfig({
95
95
  entry: './src/home/test/App.tsx',
96
96
  },
97
97
  },
98
+ // Disable default entry scanning
98
99
  disableDefaultEntries: true,
99
100
  },
100
101
  });
@@ -102,9 +103,9 @@ export default defineConfig({
102
103
 
103
104
  ### Disable entry file generation
104
105
 
105
- By default, the configured entry is equivalent to `App.[jt]sx`, and Modern.js will automatically generate an entry file to reference your configured entry.
106
+ By default, the configured entry is equivalent to `App.[jt]sx`, and Modern.js will automatically generate an entry file to reference the entry you configured.
106
107
 
107
- If you want to disable the logic of Modern.js automatically generating the entry file, you can set the `disableMount` property to `true`.
108
+ If you want to disable the logic of Modern.js automatically generating entry files, you can set the `disableMount` property to `true`.
108
109
 
109
110
  ```ts title="modern.config.ts"
110
111
  export default defineConfig({
@@ -115,7 +116,7 @@ export default defineConfig({
115
116
  disableMount: true,
116
117
  },
117
118
  },
118
- // Disable default ingress scanning
119
+ // Disable default entry scanning
119
120
  disableDefaultEntries: true,
120
121
  },
121
122
  });
@@ -137,6 +138,7 @@ export default defineConfig({
137
138
  entry: './src/about',
138
139
  },
139
140
  },
141
+ // Disable default entry scanning
140
142
  disableDefaultEntries: true,
141
143
  },
142
144
  });
@@ -148,9 +150,9 @@ After setting `source.entries`, if `disableDefaultEntries: true` is not set, Mod
148
150
 
149
151
  The merge rule is:
150
152
 
151
- - Compare the entry path set by the custom entry with the default entry path. When the entry path is consistent, the custom entry will override the default entry.
153
+ - Compare the entry paths set by the custom entry setting and the default entry path. When the entry paths are the same, the custom entry will override the default entry.
152
154
 
153
- For example the following directory structure:
155
+ For example, the following directory structure:
154
156
 
155
157
  ```bash
156
158
  .
@@ -162,7 +164,7 @@ For example the following directory structure:
162
164
  └── package.json
163
165
  ```
164
166
 
165
- Modern.js will analyze the `src/` directory to get the default entries `chat` and `home`. When the user configures the following in the `modern.config.ts` file:
167
+ Modern.js will analyze the `src/` directory and get the default entries `chat` and `home`. When the user configures as follows in the `modern.config.ts` file:
166
168
 
167
169
  ```ts title="modern.config.ts"
168
170
  import { defineConfig } from '@modern-js/app-tools';
@@ -176,7 +178,7 @@ export default defineConfig({
176
178
  };
177
179
  ```
178
180
 
179
- You can see that the path of the custom entry `index` is the same as the path of the default entry `home`. During the merging process, `index` will override `home`, and the final entry is as follows:
181
+ It can be seen that the path of the custom entry `index` is the same as the path of the default entry `home`. During the merge process, `index` will override `home`, and the final entry is as follows:
180
182
 
181
183
  - `chat -> ./src/chat/App.tsx`
182
184
  - `index -> ./src/home/index.ts`
@@ -22,8 +22,8 @@ When using Rspack as the bundler, SWC will be used for transpiling and compressi
22
22
  First, you need to execute `pnpm run new` to enable the SWC compile:
23
23
 
24
24
  ```bash
25
- ? Action: Enable features
26
- ? Enable features: Enable SWC Compile
25
+ ? Please select the operation you want: Enable features
26
+ ? Please select the feature name: Enable SWC Compile
27
27
  ```
28
28
 
29
29
  After the installation, please register the SWC plugin in the `modern.config.ts` file, then the SWC compilation and compression will be enabled.