@modern-js/module-tools-docs 2.0.2 → 2.2.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 (313) hide show
  1. package/doc_build/api/config/build-config.html +332 -0
  2. package/doc_build/api/config/build-preset.html +43 -0
  3. package/doc_build/api/config/design-system.html +103 -0
  4. package/doc_build/api/config/plugins.html +7 -0
  5. package/doc_build/api/config/testing.html +21 -0
  6. package/doc_build/api/index.html +1 -0
  7. package/doc_build/api/plugin-api/plugin-hooks.html +113 -0
  8. package/doc_build/en/api/config/build-config.html +316 -0
  9. package/doc_build/en/api/config/build-preset.html +43 -0
  10. package/doc_build/en/api/config/design-system.html +117 -0
  11. package/doc_build/en/api/config/plugins.html +7 -0
  12. package/doc_build/en/api/config/testing.html +21 -0
  13. package/doc_build/en/api/index.html +1 -0
  14. package/doc_build/en/api/plugin-api/plugin-hooks.html +113 -0
  15. package/doc_build/en/guide/advance/asset.html +25 -0
  16. package/doc_build/en/guide/advance/build-umd.html +32 -0
  17. package/doc_build/en/guide/advance/copy.html +42 -0
  18. package/doc_build/en/guide/advance/external-dependency.html +31 -0
  19. package/doc_build/en/guide/advance/in-depth-about-build.html +112 -0
  20. package/doc_build/en/guide/advance/in-depth-about-dev-command.html +12 -0
  21. package/doc_build/en/guide/advance/theme-config.html +29 -0
  22. package/doc_build/en/guide/basic/before-getting-started.html +89 -0
  23. package/doc_build/en/guide/basic/command-preview.html +63 -0
  24. package/doc_build/en/guide/basic/modify-output-product.html +98 -0
  25. package/doc_build/en/guide/basic/publish-your-project.html +50 -0
  26. package/doc_build/en/guide/basic/test-your-project.html +31 -0
  27. package/doc_build/en/guide/basic/use-micro-generator.html +29 -0
  28. package/doc_build/en/guide/basic/using-storybook.html +66 -0
  29. package/doc_build/en/guide/best-practices/components.html +111 -0
  30. package/doc_build/en/guide/intro/getting-started.html +36 -0
  31. package/doc_build/en/guide/intro/welcome.html +13 -0
  32. package/doc_build/en/guide/intro/why-module-engineering-solution.html +9 -0
  33. package/doc_build/en/index.html +1 -0
  34. package/doc_build/en/plugins/guide/getting-started.html +15 -0
  35. package/doc_build/en/plugins/guide/plugin-object.html +14 -0
  36. package/doc_build/en/plugins/guide/setup-function.html +30 -0
  37. package/doc_build/en/plugins/official-list/overview.html +3 -0
  38. package/doc_build/guide/advance/asset.html +25 -0
  39. package/doc_build/guide/advance/build-umd.html +32 -0
  40. package/doc_build/guide/advance/copy.html +42 -0
  41. package/doc_build/guide/advance/external-dependency.html +31 -0
  42. package/doc_build/guide/advance/in-depth-about-build.html +112 -0
  43. package/doc_build/guide/advance/in-depth-about-dev-command.html +14 -0
  44. package/doc_build/guide/advance/theme-config.html +28 -0
  45. package/doc_build/guide/basic/before-getting-started.html +89 -0
  46. package/doc_build/guide/basic/command-preview.html +63 -0
  47. package/doc_build/guide/basic/modify-output-product.html +97 -0
  48. package/doc_build/guide/basic/publish-your-project.html +52 -0
  49. package/doc_build/guide/basic/test-your-project.html +32 -0
  50. package/doc_build/guide/basic/use-micro-generator.html +27 -0
  51. package/doc_build/guide/basic/using-storybook.html +67 -0
  52. package/doc_build/guide/best-practices/components.html +111 -0
  53. package/doc_build/guide/intro/getting-started.html +39 -0
  54. package/doc_build/guide/intro/welcome.html +13 -0
  55. package/doc_build/guide/intro/why-module-engineering-solution.html +9 -0
  56. package/doc_build/index.html +1 -0
  57. package/doc_build/plugins/guide/getting-started.html +15 -0
  58. package/doc_build/plugins/guide/plugin-object.html +14 -0
  59. package/doc_build/plugins/guide/setup-function.html +30 -0
  60. package/doc_build/plugins/official-list/overview.html +3 -0
  61. package/doc_build/static/css/main.edaad072.css +1 -0
  62. package/doc_build/static/js/1607.70af642a.js +2 -0
  63. package/doc_build/static/js/1607.70af642a.js.LICENSE.txt +23 -0
  64. package/doc_build/static/js/async/3799.e31e8293.js +1 -0
  65. package/doc_build/static/js/async/8652.6fbf1cb7.js +1 -0
  66. package/doc_build/static/js/async/en_api_config_build-config.367a5701.js +1 -0
  67. package/doc_build/static/js/async/en_api_config_build-preset.0d78b268.js +1 -0
  68. package/doc_build/static/js/async/en_api_config_design-system.b28d6723.js +1 -0
  69. package/doc_build/static/js/async/en_api_config_plugins.fc95fb77.js +1 -0
  70. package/doc_build/static/js/async/en_api_config_testing.8bc7f316.js +1 -0
  71. package/doc_build/static/js/async/en_api_index.669f0a56.js +1 -0
  72. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.60d0260c.js +1 -0
  73. package/doc_build/static/js/async/en_guide_advance_asset.5ff1d623.js +1 -0
  74. package/doc_build/static/js/async/en_guide_advance_build-umd.c254ed46.js +1 -0
  75. package/doc_build/static/js/async/en_guide_advance_copy.45c0a51d.js +1 -0
  76. package/doc_build/static/js/async/en_guide_advance_external-dependency.a52d3247.js +1 -0
  77. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.51bf3569.js +1 -0
  78. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.aec0b4e1.js +1 -0
  79. package/doc_build/static/js/async/en_guide_advance_theme-config.db0ad9fc.js +1 -0
  80. package/doc_build/static/js/async/en_guide_basic_before-getting-started.a22fc49a.js +1 -0
  81. package/doc_build/static/js/async/en_guide_basic_command-preview.1707ed29.js +1 -0
  82. package/doc_build/static/js/async/en_guide_basic_modify-output-product.ad453d13.js +1 -0
  83. package/doc_build/static/js/async/en_guide_basic_publish-your-project.08c5112f.js +1 -0
  84. package/doc_build/static/js/async/en_guide_basic_test-your-project.f5f6b204.js +1 -0
  85. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.56325139.js +1 -0
  86. package/doc_build/static/js/async/en_guide_basic_using-storybook.9d721554.js +1 -0
  87. package/doc_build/static/js/async/en_guide_best-practices_components.45155af9.js +1 -0
  88. package/doc_build/static/js/async/en_guide_intro_getting-started.f8682be3.js +1 -0
  89. package/doc_build/static/js/async/en_guide_intro_welcome.9cc45924.js +1 -0
  90. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.7f2dae5c.js +1 -0
  91. package/doc_build/static/js/async/en_index.7bd869c4.js +1 -0
  92. package/doc_build/static/js/async/en_plugins_guide_getting-started.b850249c.js +1 -0
  93. package/doc_build/static/js/async/en_plugins_guide_plugin-object.bf6c6221.js +1 -0
  94. package/doc_build/static/js/async/en_plugins_guide_setup-function.80a2bd97.js +1 -0
  95. package/doc_build/static/js/async/en_plugins_official-list_overview.84e5cea0.js +1 -0
  96. package/doc_build/static/js/async/zh_api_config_build-config.048fd5ec.js +1 -0
  97. package/doc_build/static/js/async/zh_api_config_build-preset.7c13584d.js +1 -0
  98. package/doc_build/static/js/async/zh_api_config_design-system.1eecd474.js +1 -0
  99. package/doc_build/static/js/async/zh_api_config_plugins.c22dc4be.js +1 -0
  100. package/doc_build/static/js/async/zh_api_config_testing.a9888eed.js +1 -0
  101. package/doc_build/static/js/async/zh_api_index.22957707.js +1 -0
  102. package/doc_build/static/js/async/zh_api_plugin-api_plugin-hooks.a4d81bf6.js +1 -0
  103. package/doc_build/static/js/async/zh_guide_advance_asset.5b936003.js +1 -0
  104. package/doc_build/static/js/async/zh_guide_advance_build-umd.b6d541ff.js +1 -0
  105. package/doc_build/static/js/async/zh_guide_advance_copy.21a1aea4.js +1 -0
  106. package/doc_build/static/js/async/zh_guide_advance_external-dependency.c7cf5d4b.js +1 -0
  107. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-build.64e795f3.js +1 -0
  108. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.168ce7dd.js +1 -0
  109. package/doc_build/static/js/async/zh_guide_advance_theme-config.b9570109.js +1 -0
  110. package/doc_build/static/js/async/zh_guide_basic_before-getting-started.6b06b54a.js +1 -0
  111. package/doc_build/static/js/async/zh_guide_basic_command-preview.1199124a.js +1 -0
  112. package/doc_build/static/js/async/zh_guide_basic_modify-output-product.8ccbc8d1.js +1 -0
  113. package/doc_build/static/js/async/zh_guide_basic_publish-your-project.bf11b1c4.js +1 -0
  114. package/doc_build/static/js/async/zh_guide_basic_test-your-project.ae52c47a.js +1 -0
  115. package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.a091d57d.js +1 -0
  116. package/doc_build/static/js/async/zh_guide_basic_using-storybook.27829e44.js +1 -0
  117. package/doc_build/static/js/async/zh_guide_best-practices_components.7454d916.js +1 -0
  118. package/doc_build/static/js/async/zh_guide_intro_getting-started.a4c00d9a.js +1 -0
  119. package/doc_build/static/js/async/zh_guide_intro_welcome.71c3fe16.js +1 -0
  120. package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.6f8b5ff6.js +1 -0
  121. package/doc_build/static/js/async/zh_index.c19f9dcf.js +1 -0
  122. package/doc_build/static/js/async/zh_plugins_guide_getting-started.099dfaea.js +1 -0
  123. package/doc_build/static/js/async/zh_plugins_guide_plugin-object.963289d5.js +1 -0
  124. package/doc_build/static/js/async/zh_plugins_guide_setup-function.67d07b91.js +1 -0
  125. package/doc_build/static/js/async/zh_plugins_official-list_overview.a7635714.js +1 -0
  126. package/doc_build/static/js/lib-lodash.c5845536.js +1 -0
  127. package/doc_build/static/js/lib-polyfill.b3038509.js +1 -0
  128. package/doc_build/static/js/lib-react.d41ace5e.js +2 -0
  129. package/doc_build/static/js/lib-react.d41ace5e.js.LICENSE.txt +29 -0
  130. package/doc_build/static/js/main.2d3257a4.js +1 -0
  131. package/doc_build/static/search_index.json +1 -0
  132. package/docs/en/api/config/build-config.md +15 -5
  133. package/docs/en/api/config/build-preset.md +3 -2
  134. package/docs/en/api/config/design-system.md +623 -615
  135. package/docs/en/api/config/plugins.md +2 -2
  136. package/docs/en/api/config/testing.md +2 -1
  137. package/docs/en/guide/advance/asset.mdx +0 -4
  138. package/docs/en/guide/advance/build-umd.mdx +3 -3
  139. package/docs/en/guide/advance/in-depth-about-build.md +14 -13
  140. package/docs/en/guide/advance/in-depth-about-dev-command.md +2 -1
  141. package/docs/en/guide/basic/before-getting-started.md +16 -9
  142. package/docs/en/guide/basic/command-preview.md +2 -2
  143. package/docs/en/guide/basic/modify-output-product.md +65 -69
  144. package/docs/en/guide/basic/test-your-project.mdx +1 -3
  145. package/docs/en/guide/basic/use-micro-generator.md +4 -0
  146. package/docs/en/guide/basic/using-storybook.mdx +1 -13
  147. package/docs/en/plugins/guide/getting-started.mdx +2 -2
  148. package/docs/en/plugins/guide/plugin-object.mdx +5 -5
  149. package/docs/zh/api/config/build-config.md +18 -6
  150. package/docs/zh/api/config/build-preset.md +3 -2
  151. package/docs/zh/api/config/design-system.md +2 -2
  152. package/docs/zh/api/config/plugins.md +2 -2
  153. package/docs/zh/api/config/testing.md +3 -2
  154. package/docs/zh/guide/advance/asset.mdx +0 -5
  155. package/docs/zh/guide/advance/build-umd.mdx +3 -3
  156. package/docs/zh/guide/advance/in-depth-about-build.md +14 -13
  157. package/docs/zh/guide/advance/in-depth-about-dev-command.md +2 -1
  158. package/docs/zh/guide/basic/before-getting-started.md +15 -8
  159. package/docs/zh/guide/basic/command-preview.md +2 -2
  160. package/docs/zh/guide/basic/modify-output-product.md +17 -19
  161. package/docs/zh/guide/basic/test-your-project.mdx +1 -3
  162. package/docs/zh/guide/basic/use-micro-generator.md +5 -1
  163. package/docs/zh/guide/basic/using-storybook.mdx +9 -19
  164. package/docs/zh/guide/intro/getting-started.md +1 -1
  165. package/docs/zh/plugins/guide/getting-started.mdx +2 -2
  166. package/docs/zh/plugins/guide/plugin-object.mdx +5 -5
  167. package/modern.config.ts +11 -5
  168. package/package.json +3 -3
  169. package/LICENSE +0 -144
  170. package/doc_build/html/main/index.html +0 -16
  171. package/doc_build/route.json +0 -10
  172. package/doc_build/static/css/main.css +0 -3370
  173. package/doc_build/static/css/main.css.map +0 -1
  174. package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css +0 -85
  175. package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css.map +0 -1
  176. package/doc_build/static/js/async/api_.js +0 -56
  177. package/doc_build/static/js/async/api_.js.map +0 -1
  178. package/doc_build/static/js/async/api_config_build-config.js +0 -11309
  179. package/doc_build/static/js/async/api_config_build-config.js.map +0 -1
  180. package/doc_build/static/js/async/api_config_build-preset.js +0 -7849
  181. package/doc_build/static/js/async/api_config_build-preset.js.map +0 -1
  182. package/doc_build/static/js/async/api_config_design-system.js +0 -48708
  183. package/doc_build/static/js/async/api_config_design-system.js.map +0 -1
  184. package/doc_build/static/js/async/api_config_plugins.js +0 -1492
  185. package/doc_build/static/js/async/api_config_plugins.js.map +0 -1
  186. package/doc_build/static/js/async/api_config_testing.js +0 -2130
  187. package/doc_build/static/js/async/api_config_testing.js.map +0 -1
  188. package/doc_build/static/js/async/api_plugin-api_plugin-hooks.js +0 -14394
  189. package/doc_build/static/js/async/api_plugin-api_plugin-hooks.js.map +0 -1
  190. package/doc_build/static/js/async/en_.js +0 -85
  191. package/doc_build/static/js/async/en_.js.map +0 -1
  192. package/doc_build/static/js/async/en_api_.js +0 -55
  193. package/doc_build/static/js/async/en_api_.js.map +0 -1
  194. package/doc_build/static/js/async/en_api_config_build-config.js +0 -8363
  195. package/doc_build/static/js/async/en_api_config_build-config.js.map +0 -1
  196. package/doc_build/static/js/async/en_api_config_build-preset.js +0 -7845
  197. package/doc_build/static/js/async/en_api_config_build-preset.js.map +0 -1
  198. package/doc_build/static/js/async/en_api_config_design-system.js +0 -16345
  199. package/doc_build/static/js/async/en_api_config_design-system.js.map +0 -1
  200. package/doc_build/static/js/async/en_api_config_plugins.js +0 -1492
  201. package/doc_build/static/js/async/en_api_config_plugins.js.map +0 -1
  202. package/doc_build/static/js/async/en_api_config_testing.js +0 -2137
  203. package/doc_build/static/js/async/en_api_config_testing.js.map +0 -1
  204. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +0 -14362
  205. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +0 -1
  206. package/doc_build/static/js/async/en_guide_advance_asset.js +0 -3997
  207. package/doc_build/static/js/async/en_guide_advance_asset.js.map +0 -1
  208. package/doc_build/static/js/async/en_guide_advance_build-umd.js +0 -9861
  209. package/doc_build/static/js/async/en_guide_advance_build-umd.js.map +0 -1
  210. package/doc_build/static/js/async/en_guide_advance_copy.js +0 -6539
  211. package/doc_build/static/js/async/en_guide_advance_copy.js.map +0 -1
  212. package/doc_build/static/js/async/en_guide_advance_external-dependency.js +0 -3810
  213. package/doc_build/static/js/async/en_guide_advance_external-dependency.js.map +0 -1
  214. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +0 -5046
  215. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +0 -1
  216. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +0 -150
  217. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +0 -1
  218. package/doc_build/static/js/async/en_guide_advance_theme-config.js +0 -2484
  219. package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +0 -1
  220. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +0 -3671
  221. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +0 -1
  222. package/doc_build/static/js/async/en_guide_basic_command-preview.js +0 -3961
  223. package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +0 -1
  224. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +0 -2970
  225. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +0 -1
  226. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +0 -2182
  227. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +0 -1
  228. package/doc_build/static/js/async/en_guide_basic_test-your-project.js +0 -3892
  229. package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +0 -1
  230. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +0 -168
  231. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +0 -1
  232. package/doc_build/static/js/async/en_guide_basic_using-storybook.js +0 -4762
  233. package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +0 -1
  234. package/doc_build/static/js/async/en_guide_best-practices_components.js +0 -21388
  235. package/doc_build/static/js/async/en_guide_best-practices_components.js.map +0 -1
  236. package/doc_build/static/js/async/en_guide_intro_getting-started.js +0 -1906
  237. package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +0 -1
  238. package/doc_build/static/js/async/en_guide_intro_welcome.js +0 -148
  239. package/doc_build/static/js/async/en_guide_intro_welcome.js.map +0 -1
  240. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +0 -92
  241. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +0 -1
  242. package/doc_build/static/js/async/en_plugins_guide_getting-started.js +0 -2560
  243. package/doc_build/static/js/async/en_plugins_guide_getting-started.js.map +0 -1
  244. package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +0 -4177
  245. package/doc_build/static/js/async/en_plugins_guide_plugin-object.js.map +0 -1
  246. package/doc_build/static/js/async/en_plugins_guide_setup-function.js +0 -3819
  247. package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +0 -1
  248. package/doc_build/static/js/async/en_plugins_official-list_overview.js +0 -70
  249. package/doc_build/static/js/async/en_plugins_official-list_overview.js.map +0 -1
  250. package/doc_build/static/js/async/guide_advance_asset.js +0 -3997
  251. package/doc_build/static/js/async/guide_advance_asset.js.map +0 -1
  252. package/doc_build/static/js/async/guide_advance_build-umd.js +0 -9863
  253. package/doc_build/static/js/async/guide_advance_build-umd.js.map +0 -1
  254. package/doc_build/static/js/async/guide_advance_copy.js +0 -6539
  255. package/doc_build/static/js/async/guide_advance_copy.js.map +0 -1
  256. package/doc_build/static/js/async/guide_advance_external-dependency.js +0 -3812
  257. package/doc_build/static/js/async/guide_advance_external-dependency.js.map +0 -1
  258. package/doc_build/static/js/async/guide_advance_in-depth-about-build.js +0 -5046
  259. package/doc_build/static/js/async/guide_advance_in-depth-about-build.js.map +0 -1
  260. package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js +0 -152
  261. package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js.map +0 -1
  262. package/doc_build/static/js/async/guide_advance_theme-config.js +0 -2475
  263. package/doc_build/static/js/async/guide_advance_theme-config.js.map +0 -1
  264. package/doc_build/static/js/async/guide_basic_before-getting-started.js +0 -3662
  265. package/doc_build/static/js/async/guide_basic_before-getting-started.js.map +0 -1
  266. package/doc_build/static/js/async/guide_basic_command-preview.js +0 -3793
  267. package/doc_build/static/js/async/guide_basic_command-preview.js.map +0 -1
  268. package/doc_build/static/js/async/guide_basic_modify-output-product.js +0 -2949
  269. package/doc_build/static/js/async/guide_basic_modify-output-product.js.map +0 -1
  270. package/doc_build/static/js/async/guide_basic_publish-your-project.js +0 -2243
  271. package/doc_build/static/js/async/guide_basic_publish-your-project.js.map +0 -1
  272. package/doc_build/static/js/async/guide_basic_test-your-project.js +0 -3892
  273. package/doc_build/static/js/async/guide_basic_test-your-project.js.map +0 -1
  274. package/doc_build/static/js/async/guide_basic_use-micro-generator.js +0 -172
  275. package/doc_build/static/js/async/guide_basic_use-micro-generator.js.map +0 -1
  276. package/doc_build/static/js/async/guide_basic_using-storybook.js +0 -4762
  277. package/doc_build/static/js/async/guide_basic_using-storybook.js.map +0 -1
  278. package/doc_build/static/js/async/guide_best-practices_components.js +0 -21088
  279. package/doc_build/static/js/async/guide_best-practices_components.js.map +0 -1
  280. package/doc_build/static/js/async/guide_intro_getting-started.js +0 -1782
  281. package/doc_build/static/js/async/guide_intro_getting-started.js.map +0 -1
  282. package/doc_build/static/js/async/guide_intro_welcome.js +0 -148
  283. package/doc_build/static/js/async/guide_intro_welcome.js.map +0 -1
  284. package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js +0 -92
  285. package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js.map +0 -1
  286. package/doc_build/static/js/async/index.js +0 -85
  287. package/doc_build/static/js/async/index.js.map +0 -1
  288. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +0 -447
  289. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +0 -1
  290. package/doc_build/static/js/async/plugins_guide_getting-started.js +0 -2608
  291. package/doc_build/static/js/async/plugins_guide_getting-started.js.map +0 -1
  292. package/doc_build/static/js/async/plugins_guide_plugin-object.js +0 -4173
  293. package/doc_build/static/js/async/plugins_guide_plugin-object.js.map +0 -1
  294. package/doc_build/static/js/async/plugins_guide_setup-function.js +0 -3819
  295. package/doc_build/static/js/async/plugins_guide_setup-function.js.map +0 -1
  296. package/doc_build/static/js/async/plugins_official-list_overview.js +0 -70
  297. package/doc_build/static/js/async/plugins_official-list_overview.js.map +0 -1
  298. package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js +0 -6656
  299. package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js.map +0 -1
  300. package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js +0 -54
  301. package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js.map +0 -1
  302. package/doc_build/static/js/builder-runtime.js +0 -1375
  303. package/doc_build/static/js/builder-runtime.js.map +0 -1
  304. package/doc_build/static/js/lib-lodash.js +0 -4907
  305. package/doc_build/static/js/lib-lodash.js.map +0 -1
  306. package/doc_build/static/js/lib-polyfill.js +0 -24769
  307. package/doc_build/static/js/lib-polyfill.js.map +0 -1
  308. package/doc_build/static/js/lib-react.js +0 -39510
  309. package/doc_build/static/js/lib-react.js.map +0 -1
  310. package/doc_build/static/js/main.js +0 -9237
  311. package/doc_build/static/js/main.js.map +0 -1
  312. package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js +0 -8532
  313. package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js.map +0 -1
@@ -9,9 +9,9 @@ This chapter describes the configuration of the registered module-tools plugin.
9
9
  - type: `Array<ModuleToolsPlugin>`
10
10
 
11
11
  ```js modern.config.ts
12
- import { ExamplePlugin } from '. /plugins/example';
12
+ import { examplePlugin } from '. /plugins/example';
13
13
  export default defineConfig({
14
- plugins: [ExamplePlugin()],
14
+ plugins: [examplePlugin()],
15
15
  });
16
16
  ```
17
17
 
@@ -5,7 +5,8 @@ sidebar_position: 5
5
5
  # Testing
6
6
 
7
7
  This chapter describes the test-related configuration
8
- :::tips
8
+
9
+ :::tip
9
10
  You need to enable the unit testing feature with `pnpm run new` first.
10
11
  :::
11
12
 
@@ -18,7 +18,6 @@ For the handling of static files, the module project currently supports the foll
18
18
 
19
19
  - Set the static resource path to `. /assets`.
20
20
  - For files over **10kb** they are inlined into the code.
21
- - Use [SVGR](https://react-svgr.com/) for files with the `.svg` suffix.
22
21
 
23
22
  Let us look at the following example:
24
23
 
@@ -144,6 +143,3 @@ If the size of `bg.png` is larger than 10 kb, then the product content will be.
144
143
 
145
144
  </CH.Spotlight>
146
145
 
147
- ## SVGR
148
-
149
- WIP
@@ -164,7 +164,7 @@ console.info(React);
164
164
 
165
165
  At this point we will see the product code like this.
166
166
 
167
- ```js dist/index.js focus=7:12
167
+ ```js dist/index.js focus=12:18
168
168
  (function (global, factory) {
169
169
  if (typeof module === 'object' && typeof module.exports === 'object')
170
170
  factory();
@@ -203,7 +203,7 @@ export default () => {
203
203
 
204
204
  ** By default, the name of the source file is used as the name of the module's global variable in the browser. **For the above example, the product would read as follows:
205
205
 
206
- ```js ./dist/index.js focus=6:6
206
+ ```js ./dist/index.js focus=9:9
207
207
  (function (global, factory) {
208
208
  if (typeof module === 'object' && typeof module.exports === 'object')
209
209
  factory(exports);
@@ -233,7 +233,7 @@ export default defineConfig({
233
233
 
234
234
  The construction products at this point are:
235
235
 
236
- ```js ./dist/index.js focus=6:6
236
+ ```js ./dist/index.js focus=9:9
237
237
  (function (global, factory) {
238
238
  if (typeof module === 'object' && typeof module.exports === 'object')
239
239
  factory(exports);
@@ -10,7 +10,8 @@ In the [Basic Usage] section, we already knew that you can modify the output pro
10
10
  If you are not sure what `buildConfig` is, it is recommended to take some time to understand it by following this link.
11
11
 
12
12
  - [[modify-output-product](/en/guide/basic/modify-output-product)]
13
- :::
13
+
14
+ :::
14
15
 
15
16
  In this chapter we'll dive into the use of certain build configurations and understand what happens when the `modern build` command is executed.
16
17
 
@@ -34,7 +35,7 @@ In `buildConfig` you can specify whether the current build task is Bundle or Bun
34
35
  - When `buildType: 'bundleless'`, `input` defaults to `['src']`
35
36
  > In fact, at `buildType: 'bundle'`, the build tool detects the existence of a file matching the name rule `src/index.(j|t)sx?` and uses it as an entry file.
36
37
 
37
- :::warn{title=notes}
38
+ :::warning{title=notes}
38
39
  It is recommended that you do not specify multiple source file directories during a Bundleless build, as unintended results may occur. Bundleless builds with multiple source directories are currently in an unstable stage.
39
40
  :::
40
41
 
@@ -44,7 +45,7 @@ We know from the defaults: **Bundle builds can generally specify a file path as
44
45
 
45
46
  In addition to setting `input` to an array, you can also set it to an object during the Bundle build process. **By using the object form, we can modify the name of the file that the build product outputs**. So for the following example, `. /src/index.ts` corresponds to the path of the build product file as `. /dist/main.js`.
46
47
 
47
- ```tsx modern.config.ts
48
+ ```js modern.config.ts
48
49
  import { defineConfig } from '@modern-js/module-tools';
49
50
 
50
51
  export default defineConfig({
@@ -79,7 +80,7 @@ The [`buildConfig.dts`](/en/api/config/build-config#dts) configuration is mainly
79
80
 
80
81
  Type generation is turned on by default, if you need to turn it off, you can configure it as follows:
81
82
 
82
- ```ts ./modern.config.ts
83
+ ```js modern.config.ts
83
84
  import { defineConfig } from '@modern-js/module-tools';
84
85
 
85
86
  export default defineConfig({
@@ -106,7 +107,7 @@ The **module engineering solution also supports packaging of type files**, altho
106
107
 
107
108
  During the Bundleless build process, if an alias appears in the source code, e.g.
108
109
 
109
- ```ts ./src/index.ts
110
+ ```js ./src/index.ts
110
111
  import utils from '@common/utils';
111
112
  ```
112
113
 
@@ -123,7 +124,7 @@ However, there are some cases that cannot be handled at this time.
123
124
 
124
125
  General usage:
125
126
 
126
- ```ts
127
+ ```js
127
128
  import { defineConfig } from '@modern-js/module-tools';
128
129
 
129
130
  export default defineConfig({
@@ -141,7 +142,7 @@ export default defineConfig({
141
142
 
142
143
  For the use of `dts.only`:
143
144
 
144
- ```ts
145
+ ```js
145
146
  import { defineConfig } from '@modern-js/module-tools';
146
147
 
147
148
  export default defineConfig({
@@ -169,7 +170,7 @@ export default defineConfig({
169
170
 
170
171
  #### Environment variable replacement
171
172
 
172
- ```ts
173
+ ```js
173
174
  import { defineConfig } from '@modern-js/module-tools';
174
175
  export default defineConfig({
175
176
  buildConfig: {
@@ -182,21 +183,21 @@ export default defineConfig({
182
183
 
183
184
  With the above configuration, we can put the following code.
184
185
 
185
- ```
186
+ ```js
186
187
  // pre-compiler code
187
188
  console.log(process.env.VERSION);
188
189
  ```
189
190
 
190
191
  When executing `VERSION=1.0.0 modern build`, the conversion is:
191
192
 
192
- ```
193
+ ```js
193
194
  // compiled code
194
195
  console.log('1.0.0');
195
196
  ```
196
197
 
197
198
  #### Global variable replacement
198
199
 
199
- ```ts
200
+ ```js
200
201
  import { defineConfig } from '@modern-js/module-tools';
201
202
  export default defineConfig({
202
203
  buildConfig: {
@@ -209,14 +210,14 @@ export default defineConfig({
209
210
 
210
211
  With the above configuration, we can put the following code.
211
212
 
212
- ```
213
+ ```js
213
214
  // pre-compile code
214
215
  console.log(VERSION);
215
216
  ```
216
217
 
217
218
  Convert to:
218
219
 
219
- ```
220
+ ```js
220
221
  // post-compile code
221
222
  console.log('1.0.0');
222
223
  ```
@@ -10,7 +10,8 @@ sidebar_position: 2
10
10
  如果你还不清楚 `buildConfig` 是什么,建议花一些时间通过下面的链接了解一下:
11
11
 
12
12
  - 【[修改输出产物](/guide/basic/modify-output-product)】
13
- :::
13
+
14
+ :::
14
15
 
15
16
  而在本章里我们将要深入理解某些构建配置的使用以及了解执行 `modern build` 命令的时候发生了什么。
16
17
 
@@ -6,7 +6,7 @@ sidebar_position: 1
6
6
 
7
7
  ## Environment preparation
8
8
 
9
- In order to use the Modern.js module engineering solution, you first need [NodeJS](https://nodejs.org/zh/) engine, we recommend the latest [LTS version](https://github.com/nodejs/Release), and make sure the Node version is **>=14.17.6**. because non-stable NodeJS releases frequently have bugs. You might consider installing via [nvm-windows](https://github.com/coreybutler/nvm-windows) and [nvm](https://github.com/nvm-sh/nvm) (Mac/linux), so you can easily switch to different NodeJS versions that might be required for different projects that you work on.
9
+ In order to use the Modern.js module engineering solution, you first need [NodeJS](https://nodejs.org/zh/) engine, we recommend the latest [LTS version](https://github.com/nodejs/Release), and make sure the Node version is **>=14.18.0**. because non-stable NodeJS releases frequently have bugs. You might consider installing via [nvm-windows](https://github.com/coreybutler/nvm-windows) and [nvm](https://github.com/nvm-sh/nvm) (Mac/linux), so you can easily switch to different NodeJS versions that might be required for different projects that you work on.
10
10
 
11
11
  ## Getting Started with npm
12
12
 
@@ -71,6 +71,7 @@ Similarly, you can install **only packages needed for local development and test
71
71
  ```
72
72
 
73
73
  **When installing or using third-party npm packages be sure to determine what they are for and whether they should be placed in `"dependencies"` or `"devDependencies"` by distinguishing between their types.**
74
+
74
75
  :::tip
75
76
  In general, packages that need to be used in source code are `dependencies` dependencies. Unless you are exporting dependent code locally via packaging, in which case it can be treated as a `devDependencies` dependency.
76
77
  :::
@@ -161,25 +162,31 @@ npm install -g pnpm
161
162
 
162
163
  ## Module Tools configuration file
163
164
 
164
- A configuration file for Module Tools is provided in the initial module project directory -- `modern.config.(j|t)s`. By default, no configuration is required, so the `modern.config` configuration file is not required to exist.
165
+ The Module Tools configuration file - `modern.config.(j|t)s` - is provided in the project directory of the module project created with `@modern-js/create`. However, the `modern.config` configuration file is not required to exist.
165
166
 
166
- The contents of the initial configuration file are as follows.
167
+ By default, the contents of the generated configuration file are as follows.
167
168
 
168
169
  ```typescript
169
170
  // modern.config.ts
170
- import { defineConfig } from '@modern-js/module-tools';
171
+ import moduleTools, { defineConfig } from '@modern-js/module-tools';
171
172
 
172
- export default defineConfig({});
173
+ export default defineConfig({
174
+ plugins: [moduleTools()],
175
+ buildPreset: 'npm-library',
176
+ });
173
177
  ```
174
178
 
175
179
  ```js
176
180
  // modern.config.js
177
- const { defineConfig } = require('@modern-js/module-tools');
181
+ import moduleTools from '@modern-js/module-tools';
178
182
 
179
- module.exports = defineConfig({});
183
+ export default {
184
+ plugins: [moduleTools()],
185
+ buildPreset: 'npm-library',
186
+ };
180
187
  ```
181
188
 
182
- **We recommend using the `defineConfig` function**, but it is not mandatory to use it. So you can also return an object directly in the configuration file: the:
189
+ **We recommend using the `defineConfig` function**, but it is not mandatory to use it. So you can also return an object directly in the config file: the
183
190
 
184
191
  ```typescript
185
192
  // modern.config.ts
@@ -188,5 +195,5 @@ export default {};
188
195
 
189
196
  ```js
190
197
  // modern.config.js
191
- module.exports = {};
198
+ export default {};
192
199
  ```
@@ -55,6 +55,7 @@ The `modern new` command is used to start the microgenerator functionality, whic
55
55
 
56
56
  The following features can currently be enabled.
57
57
 
58
+ - Testing support
58
59
  - Storybook debugging
59
60
  - Tailwind CSS support
60
61
  - Modern.js Runtime API
@@ -88,6 +89,7 @@ Options:
88
89
  -h, --help display help for command
89
90
  ```
90
91
 
92
+ You need to execute `modern new` to turn on the test function before you can execute the `modern test` command.
91
93
  The `modern test` command will automatically run the `src/tests/*.test.(js|ts|jsx|tsx)` file as a test case.
92
94
 
93
95
  ## `modern lint`
@@ -204,5 +206,3 @@ Options:
204
206
  The `modern upgrade` command is used to upgrade the project Modern.js related dependencies to the latest version.
205
207
 
206
208
  Executing the command `npx modern upgrade` in the project root directory will update the Modern.js dependencies in `package.json` of the currently executing project to the latest version by default.
207
-
208
- command is provided in `@modern-js/module-tools` version **>= 1.17.0**, previous versions can be upgraded using `npx @modern-js/upgrade`.
@@ -2,143 +2,139 @@
2
2
  sidebar_position: 3
3
3
  ---
4
4
 
5
- # modify-output-product
6
-
7
- ## Modify output product
5
+ ## Modify the output product
8
6
 
9
7
  ## Default output products
10
8
 
11
- When the `modern build` command is used in an initialized project, the products are generated according to the default configuration supported by Module Tools. The default supported configurations are as follows.
9
+ When the `modern build` command is used in an initialized project, the products are generated according to the default configuration supported by Module Tools. The default supported configurations are specified as follows.
12
10
 
13
11
  ```typescript
14
- import { defineConfig } from '@modern-js/module-tools';
12
+ import moduleTools, { defineConfig } from '@modern-js/module-tools';
15
13
 
16
14
  export default defineConfig({
17
- buildPreset: 'base-config',
15
+ plugins: [moduleTools()],
16
+ buildPreset: 'npm-library',
18
17
  });
19
18
  ```
20
19
 
21
- **The default generated product has the following characteristics**:
22
-
23
- - The code format is [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules), or simply `cjs`.
24
- - Code syntax is supported up to `ES6`.
25
- - All code is packaged into a single file, i.e. **bundle** processing is performed.
26
- - The output root directory is the `dist` directory under the project, and the output directory for type files is `dist/types`.
20
+ **The default generation product has the following characteristics**.
27
21
 
28
- :::tip
22
+ - will generate [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules) and [ESM](https://nodejs.org/api/esm.html#modules- ecmascript-modules).
23
+ - The code syntax is supported up to `ES6` , and more advanced syntax will be converted.
24
+ - All code is packaged into one file, i.e. **bundle** processing is performed.
25
+ - The output root directory is the `dist` directory under the project, and the type file output directory is `dist/types`.
29
26
 
30
- 1. By "code syntax support up to ES6", we mean that the syntax supported by the product code will not exceed `ES6`. If the source code uses syntax above `ES6` (e.g. `ES2017`), it will be converted.
31
- :::
32
-
33
- You may have the following questions when you see this:
27
+ You may have the following questions when you see this.
34
28
 
35
29
  1. what is `buildPreset`?
36
- 2. what determines these characteristics of the output?
30
+ 2. what determines these characteristics of the product?
37
31
 
38
32
  Then the next step is to first explain `buildPreset`.
39
33
 
40
34
  ## buildPreset
41
35
 
42
- `buildPreset` represents one or more sets of build-related configurations prepared in advance. By using the corresponding preset values of `buildPreset`, you can eliminate the troublesome and complicated configuration work and get the expected product.
36
+ The `buildPreset` represents one or more sets of build-related configurations prepared in advance. By using the corresponding preset values of the `buildPreset`, you can eliminate the troublesome and complicated configuration work and get the expected product.
43
37
 
44
- ### String form of `buildPreset`
38
+ ### String form of build preset
45
39
 
46
40
  The value of a **build preset can be in the form of a string**, so a build preset of this form is called a preset string.
47
41
 
48
- The module engineering solution provides generic build preset strings and corresponding variants, depending on the generic scenario in which the npm package is used. All currently supported preset strings can be viewed via the [BuildPreset API](/en/api/config/build-config). The relationship between **generic preset strings and variants** is explained here.
42
+ The module engineering solution provides generic build preset strings and corresponding variants, depending on the generic scenario in which the npm package is used. All currently supported preset strings can be viewed via the [BuildPreset API](/api/config/build-preset). Here is an explanation about the relationship between **generic preset strings and variants**.
49
43
 
50
- Among the generic preset strings, `"npm-library"` can be used in the scenario of developing npm packages of the library type, which is suitable for most common module type projects. When `"npm-library"` is set, the output product of the project will have the following characteristics:
44
+ Among the generic preset strings, `"npm-library"` can be used in the scenario of developing npm packages of the library type, which is suitable for most common module type projects. When `"npm-library"` is set, the output product of the project will have the following characteristics.
51
45
 
52
- - In the `dist/lib` directory you will get the product in the code format `cjs`, with syntax support up to `es6` and after packaging.
53
- - In the `dist/es` directory, you get code in the format `esm`, with syntax support up to `es6` and packaged.
46
+ - In the `dist/lib` directory you will get code formatted as `cjs`, syntax supported up to `es6` and packaged.
47
+ - In the `dist/es` directory, you get code in the format `esm`, with syntax support up to `es6` and after packaging.
54
48
  - In the `dist/types` directory, you get the type files. If it is not a TypeScript project, there is no such directory.
55
49
 
56
- The default string `"npm-library"` is a variant of the original product with modified **code-syntax support** and a string naming change to `"npm-library-[es5 | es2016.... . es2020 | esnext]"`.
50
+ The default string `"npm-library"` is a variant of the original product with a modified **code syntax support** feature and a string naming change to `"npm-library-[es5 | es2016.... . es2020 | esnext]"`.
57
51
 
58
- For example, if the output product is based on the preset string `"npm-library"` and the syntax supported by the product code is changed to `es2017`, then simply changing `"npm-library"` to `"npm-library-es2017"` would be sufficient.
52
+ For example, if the output product is based on the preset string `"npm-library"` and the syntax supported by the product code is changed to `es5`, then simply changing `"npm-library"` to `"npm-library-es5"` would be sufficient.
59
53
 
60
- ### Function form of `buildPreset`
54
+ ### Build pre-defined function forms
61
55
 
62
56
  **In addition to the string form, the value of a build preset can also be in the form of a function, where the specific configuration corresponding to a preset value can be printed or modified**.
63
57
 
64
- For example, if the same effect as the preset string `"npm-library-es2017"` is achieved using the preset function form, it can be done as follows:
58
+ For example, to achieve the same effect as the preset string ``npm-library-es5"` using the form of a preset function, you can do the following.
65
59
 
66
60
  ```typescript
67
- import { defineConfig } from "@modern-js/module-tools";
61
+ import { defineConfig } from '@modern-js/module-tools';
68
62
 
69
63
  export default defineConfig({
70
64
  buildPreset({ preset }) {
71
65
  return preset.NPM_LIBRARY.map(config => {
72
- return { ... .config, target: 'es2017' }
66
+ return { ... .config, target: 'es5' }
73
67
  });
74
68
  },
75
69
  });
76
70
  ```
77
71
 
78
- In the above code implementation, `preset.NPM_LIBRARY` corresponds to the preset string `"npm-library"`, which represents the `"npm-library"` equivalent of a multi-group build-related configuration. We traverse the `NPM_LIBRARY` array, which contains multiple `buildConfig` objects, with the `map` method. We make a shallow copy of the original `buildConfig` object and modify the shallow copy to get `buildConfig.target`, specifying it as `es2017`.
72
+ In the above code implementation, `preset.NPM_LIBRARY` corresponds to the preset string `"npm-library"`, which represents the `"npm-library"` equivalent of a multi-group build-related configuration. We traverse the `NPM_LIBRARY` array, which contains multiple `buildConfig` objects, with the `map` method. We make a shallow copy of the original `buildConfig` object and modify the shallow copy to get `buildConfig.target`, specifying it as `es5`.
79
73
 
80
- > The specific value of `preset.NPM_LIBRARY` can be viewed via the [BuildPreset API](/en/api/config/build-config). The `preset` object contains not only `NPM_LIBRARY`, but also other similar constants.
74
+ > NPM_LIBRARY`, you can check it with [BuildPreset API](/api/config/build-preset). The`preset`object contains not only`NPM_LIBRARY`, but also other similar constants.
81
75
 
82
- So what is the `buildConfig` object here? And what are the previously mentioned build product features based on?
76
+ So what is the `buildConfig` object here? What is the basis for the build product feature mentioned before?
83
77
 
84
- We explain it next.
78
+ Let's explain next.
85
79
 
86
80
  ## Build configuration (object)
87
81
 
88
- **`buildConfig` is a configuration object that describes how to compile and generate build products**. What was mentioned at the beginning about "_features of build products_" are actually properties supported by `buildConfig`. The currently supported properties cover the needs of most module type projects when building products. `buildConfig` not only contains some of the properties that products have, but also some of the features needed to build products. The following is a brief list from a classification point of view:
82
+ **`buildConfig` is a configuration object that describes how to compile and generate build products**. What was mentioned at the beginning about "_features of build products_" are actually properties supported by `buildConfig`. The currently supported properties cover the needs of most module type projects when building products. `buildConfig` not only contains some properties that products have, but also contains some features needed to build products. The following is a brief list from a classification point of view.
89
83
 
90
84
  **The basic attributes of a build product include:**
91
85
 
92
- - Whether the product is packaged or not: the corresponding API is [`buildConfig.buildType`](/en/api/config/build-config#buildtype).
93
- - Product support for syntax: the corresponding API is [`buildConfig.target`](/en/api/config/build-config#target).
94
- - Output format: The corresponding API is [`buildConfig.format`](/en/api/config/build-config#format).
95
- - How to handle the output type file: the corresponding API is [`buildConfig.dts`](/en/api/config/build-config#dts).
96
- - How the sourceMap of the product is handled: the corresponding API is [`buildConfig.sourceMap`](/en/api/config/build-config#sourcemap).
97
- - The input (or source file) corresponding to the output: the corresponding API is [`buildConfig.input`](/en/api/config/build-config#input).
98
- - The directory of the output of the product: the corresponding API is [`buildConfig.outDir`](/en/api/config/build-config#outDir).
99
- - The source directory of the build: the corresponding API is [`buildConfig.sourceDir`](/en/api/config/build-config#sourcedir).
86
+ - Whether the product is packaged or not: the corresponding API is [`buildConfig.buildType`](/api/config/build-config#buildtype).
87
+ - Product support for syntax: the corresponding API is [`buildConfig.target`](/api/config/build-config#target).
88
+ - Output format: the corresponding API is [`buildConfig.format`](/api/config/build-config#format).
89
+ - How the output type file is handled: the corresponding API is [`buildConfig.dts`](/api/config/build-config#dts).
90
+ - How the sourceMap of the product is handled: the corresponding API is [`buildConfig.sourceMap`](/api/config/build-config#sourcemap).
91
+ - The input (or source file) corresponding to the output: the corresponding API is [`buildConfig.input`](/api/config/build-config#input).
92
+ - The directory of the output of the product: the corresponding API is [`buildConfig.outDir`](/api/config/build-config#outDir).
93
+ - Build source directory: the corresponding API is [`buildConfig.sourceDir`](/api/config/build-config#sourcedir).
100
94
 
101
- **Common functions needed to build products include:**
95
+ **Common functions required for build products include:**
102
96
 
103
- - Alias: The corresponding API is [`buildConfig.alias`](/en/api/config/build-config#alias).
104
- - Static resource handling: The corresponding API is [`buildConfig.asset`](/en/api/config/build-config#asset).
97
+ - Alias: The corresponding API is [`buildConfig.alias`](/api/config/build-config#alias).
98
+ - Static resource handling: the corresponding API is [`buildConfig.asset`](/api/config/build-config#asset).
105
99
  - Third-party dependency handling: The corresponding APIs are
106
- - [`buildConfig.autoExternal`](/en/api/config/build-config#autoexternal).
107
- - [`buildConfig.externals`](/en/api/config/build-config#externals).
108
- - Copy: The corresponding API is [`buildConfig.copy`](/en/api/config/build-config#copy).
109
- - Global variable substitution: the corresponding API is [`buildConfig.define`](/en/api/config/build-config#define).
110
- - Specify [JSX](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) compilation method, the corresponding API is [`buildConfig.jsx`](/en/api/config/build-config#jsx).
100
+ - [`buildConfig.autoExternal`](/api/config/build-config#autoexternal).
101
+ - [`buildConfig.externals`](/api/config/build-config#externals).
102
+ - Copy: The corresponding API is [`buildConfig.copy`](/api/config/build-config#copy).
103
+ - Global variable substitution: the corresponding API is [`buildConfig.define`](/api/config/build-config#define).
104
+ - Specify [JSX](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) compilation method, the corresponding API is [`buildConfig.jsx`](/api/config/ build-config#jsx).
111
105
 
112
106
  **Some advanced properties or less frequently used functions:**
113
107
 
114
- - Product code compression: The corresponding API is [`buildConfig.minify`](/en/api/config/build-config#minify).
115
- - Code splitting: [`buildConfig.splitting`](/en/api/config/build-config#splitting)
116
- - Specify whether the build product is for the NodeJS environment or the browser environment: the corresponding API is [`buildConfig.platform`](/en/api/config/build-config#platform).
108
+ - Product code compression: The corresponding API is [`buildConfig.minify`](/api/config/build-config#minify).
109
+ - Code splitting: [`buildConfig.splitting`](/api/config/build-config#splitting)
110
+ - Specify whether the build product is for the NodeJS environment or the browser environment: the corresponding API is [`buildConfig.platform`](/api/config/build-config#platform).
117
111
  - umd product-related.
118
- - Specifies the global variables imported externally to the umd product: the corresponding API is [`buildConfig.umdGlobals`](/en/api/config/build-config#umdglobals).
119
- - Specify the module name of the umd product: the corresponding API is [`buildConfig.umdModuleName`](/en/api/config/build-config#umdmodulename).
112
+ - Specifies the global variables imported externally to the umd product: the corresponding API is [`buildConfig.umdGlobals`](/api/config/build-config#umdglobals).
113
+ - Specify the module name of the umd product: the corresponding API is [`buildConfig.umdModuleName`](/api/config/build-config#umdmodulename).
120
114
 
121
- In addition to the above categories, frequently asked questions and best practices about these APIs can be found at the following links.
115
+ In addition to the above categories, frequently asked questions and best practices about these APIs can be found at the following links
122
116
 
123
- - [What are `bundle` and `bundleless`?](/en/guide/advance/in-depth-about-build#bundle-and-bundleless)
124
- - [The relationship between `input` and `sourceDir`](/en/guide/advance/in-depth-about-build#relationship-between-input-and-sourcedir)
125
- - [The multiple ways of generating type files in products](/en/guide/advance/in-depth-about-build#declaration-type-files)
126
- - [The use of `buildConfig.define` for different scenarios.](/en/guide/advance/in-depth-about-build#buildconfigdefine-usage-for-different-scenarios)
127
- - [How to handle third-party dependencies?](/en/guide/advance/external-dependency)
128
- - [How to use copy?](/en/guide/advance/copy)
129
- - [How to build umd products?](/en/guide/advance/build-umd)
130
- - [The capabilities currently supported by static resources.](/en/guide/advance/asset)
117
+ - [What are `bundle` and `bundleless`?](/guide/advance/in-depth-about-build#bundle- and-bundleless)
118
+ - [Relationship of `input` to `sourceDir`](/guide/advance/in-depth-about-build#input- to -sourcedir-)
119
+ - [Multiple ways to generate type files in product](/guide/advance/in-depth-about-build#type-files).
120
+ - [`buildConfig.define` Different ways to use it for different scenarios.](/guide/advance/in-depth-about-build#buildconfigdefine - How to use it for different scenarios)
121
+ - [How to handle third-party dependencies?](/guide/advance/external-dependency)
122
+ - [How to use copy?](/guide/advance/copy)
123
+ - How do I build umd products? (/guide/advance/build-umd# sets the global variable name of the project)
124
+ - [The capabilities currently supported by static resources.](/guide/advance/asset)
131
125
 
132
126
  ## When to use `buildConfig`
133
127
 
134
- `buildConfig` is one of the ways used to modify the product, **and only `buildConfig` will take effect when configured in conjunction with `buildPreset`**. So if configured as follows.
128
+ `buildConfig` is one of the methods used to modify the product, **only `buildConfig` will take effect when configured in conjunction with `buildPreset`**. So if configured as follows.
135
129
 
136
130
  ```typescript
137
131
  import { defineConfig } from '@modern-js/module-tools';
138
132
 
139
133
  export default defineConfig({
140
- buildConfig: [{}],
141
- buildPreset: 'base-config',
134
+ buildConfig: {
135
+ format: 'umd',
136
+ },
137
+ buildPreset: 'npm-library',
142
138
  });
143
139
  ```
144
140
 
@@ -150,4 +146,4 @@ Since both 'buildConfig' and 'buildPreset' are present, only the 'buildConfig' c
150
146
 
151
147
  The set or sets of build-related configurations represented by `buildPreset` are composed of `buildConfig`, **which can be used to customize output products** when the current project needs cannot be met using `buildPreset`.
152
148
 
153
- The process of using `buildConfig` is the process of thinking about "_what kind of build product to get_".
149
+ The process of using `buildConfig` is the process of thinking about **what kind of build product to get**.
@@ -8,9 +8,7 @@ This chapter will describe how to test modules.
8
8
 
9
9
  ## Prerequisites and conventions
10
10
 
11
- To use the testing functionality of the project, you need to make sure that the project contains the following dependencies:
12
-
13
- - `"@modern-js/plugin-testing"`
11
+ To use the testing features of the project, you need to make sure that the project contains the dependency: `"@modern-js/plugin-testing"` , which can be done with [modern new](/guide/basic/command-preview#modern-new).
14
12
 
15
13
  In the module engineering scheme, the following conventions are in place for test cases, or files for writing tests:
16
14
 
@@ -14,6 +14,10 @@ Thus with these capabilities, **Microgenerator can enable additional feature fun
14
14
 
15
15
  The microgenerator can be started via [`modern new`](/guide/basic/command-preview). The current Microgenerator features supported by the Module Engineering program are:
16
16
 
17
+ ## Test
18
+
19
+ When we want to test some modules, we can enable the test test feature. When this feature is enabled, **a `tests` directory and related files will be created in the project directory, and a new `"@modern-js/plugin-testing"` dependency will be added to package.json**.
20
+
17
21
  ## Storybook
18
22
 
19
23
  The **Storybook feature** can be enabled when we want to debug a component or a common module. When this feature is enabled, **the `stories` directory and related files are created in the project directory, and a new `"@modern-js/plugin-storybook"` dependency is added to package.json**.
@@ -150,8 +150,6 @@ Not only is it impossible to verify that the component product is correct using
150
150
 
151
151
  ## Configure Storybook
152
152
 
153
- ### Configuration file
154
-
155
153
  Storybook is officially configured for projects through a folder called `.storybook`, which contains various configuration files. **In a module project scenario, Storybook configuration files can be added to the `config/storybook` directory of the project.**
156
154
 
157
155
  For more information on how to use the various Storybook configuration files, see the following links:
@@ -165,17 +163,7 @@ For more information on how to use the various Storybook configuration files, se
165
163
 
166
164
  In the future we will consider whether these configurations can be allowed to be modified, but for now we are limiting their use to reduce unpredictable issues.
167
165
 
168
- ### `dev.storybook`
169
-
170
- In addition to the configuration file, the module engineering solution also provides a `dev.storybook` configuration item in the `modern.config.(j|t)s` project configuration file.
171
-
172
- The webpack configuration of Storybook can be modified via this configuration.
173
-
174
- {/* 链接待补充 */}
175
-
176
- - `dev.storybook.webpack`
177
-
178
- ### Building Storybook Products
166
+ ## Building Storybook Products
179
167
 
180
168
  In addition to Storybook debugging of components or common modules, you can also perform Storybook build tasks with the following commands.
181
169
 
@@ -54,9 +54,9 @@ export const ExamplePlugin = (): CliPlugin<ModuleTools> => {
54
54
  Then we register the plugin we just wrote via the [`plugins`](/en/api/config/plugins) API.
55
55
 
56
56
  ```ts . /modern.config.ts
57
- import { ExamplePlugin } from '. /plugins/example';
57
+ import { examplePlugin } from '. /plugins/example';
58
58
  export default defineConfig({
59
- plugins: [ExamplePlugin()],
59
+ plugins: [examplePlugin()],
60
60
  });
61
61
  ```
62
62
 
@@ -16,7 +16,7 @@ For example, in the following plugin code example, the `beforeBuild` function is
16
16
  ```ts . /plugins/demo.tsx
17
17
  import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
18
18
 
19
- const MyPlugin: CliPlugin<ModuleTools> = {
19
+ const myPlugin: CliPlugin<ModuleTools> = {
20
20
  name: 'my-plugin',
21
21
 
22
22
  setup() {
@@ -33,9 +33,9 @@ const MyPlugin: CliPlugin<ModuleTools> = {
33
33
  ---
34
34
 
35
35
  ```ts . /modern.config.ts
36
- import { MyPlugin } from '. /plugins/demo';
36
+ import { myPlugin } from '. /plugins/demo';
37
37
  export default {
38
- plugins: [MyPlugin()],
38
+ plugins: [myPlugin()],
39
39
  };
40
40
  ```
41
41
 
@@ -48,7 +48,7 @@ When using TypeScript, you can introduce the built-in `CliPlugin` and `ModuleToo
48
48
  ```ts
49
49
  import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
50
50
 
51
- const MyPlugin: CliPlugin<ModuleTools> = {
51
+ const myPlugin: CliPlugin<ModuleTools> = {
52
52
  name: 'my-plugin',
53
53
 
54
54
  setup() {
@@ -75,7 +75,7 @@ type MyPluginOptions = {
75
75
  foo: string;
76
76
  };
77
77
 
78
- const MyPlugin = (options: MyPluginOptions): CliPlugin<ModuleTools> => ({
78
+ const myPlugin = (options: MyPluginOptions): CliPlugin<ModuleTools> => ({
79
79
  name: 'my-plugin',
80
80
 
81
81
  setup() {