@modern-js/module-tools-docs 2.0.2 → 2.2.0-beta.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 (308) hide show
  1. package/doc_build/html/main/index.html +1 -1
  2. package/doc_build/static/css/main.css +267 -660
  3. package/doc_build/static/css/main.css.map +1 -1
  4. 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 +6 -23
  5. 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 +1 -1
  6. package/doc_build/static/js/async/en_api_config_build-config.js +79 -36
  7. package/doc_build/static/js/async/en_api_config_build-config.js.map +1 -1
  8. package/doc_build/static/js/async/en_api_config_build-preset.js +40 -20
  9. package/doc_build/static/js/async/en_api_config_build-preset.js.map +1 -1
  10. package/doc_build/static/js/async/en_api_config_design-system.js +33800 -2340
  11. package/doc_build/static/js/async/en_api_config_design-system.js.map +1 -1
  12. package/doc_build/static/js/async/en_api_config_plugins.js +15 -19
  13. package/doc_build/static/js/async/en_api_config_testing.js +26 -24
  14. package/doc_build/static/js/async/en_api_config_testing.js.map +1 -1
  15. package/doc_build/static/js/async/{en_api_.js → en_api_index.js} +10 -14
  16. package/doc_build/static/js/async/en_api_index.js.map +1 -0
  17. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +24 -26
  18. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +1 -1
  19. package/doc_build/static/js/async/en_guide_advance_asset.js +16 -41
  20. package/doc_build/static/js/async/en_guide_advance_asset.js.map +1 -1
  21. package/doc_build/static/js/async/en_guide_advance_build-umd.js +20 -24
  22. package/doc_build/static/js/async/en_guide_advance_copy.js +25 -23
  23. package/doc_build/static/js/async/en_guide_advance_copy.js.map +1 -1
  24. package/doc_build/static/js/async/en_guide_advance_external-dependency.js +15 -19
  25. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +352 -94
  26. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +1 -1
  27. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +11 -15
  28. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +1 -1
  29. package/doc_build/static/js/async/en_guide_advance_theme-config.js +26 -24
  30. package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +1 -1
  31. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +275 -88
  32. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +1 -1
  33. package/doc_build/static/js/async/en_guide_basic_command-preview.js +45 -33
  34. package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +1 -1
  35. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +274 -196
  36. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +1 -1
  37. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +18 -20
  38. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +1 -1
  39. package/doc_build/static/js/async/en_guide_basic_test-your-project.js +27 -32
  40. package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +1 -1
  41. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +33 -15
  42. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +1 -1
  43. package/doc_build/static/js/async/en_guide_basic_using-storybook.js +24 -63
  44. package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +1 -1
  45. package/doc_build/static/js/async/en_guide_best-practices_components.js +39 -27
  46. package/doc_build/static/js/async/en_guide_best-practices_components.js.map +1 -1
  47. package/doc_build/static/js/async/en_guide_intro_getting-started.js +288 -45
  48. package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +1 -1
  49. package/doc_build/static/js/async/en_guide_intro_welcome.js +27 -13
  50. package/doc_build/static/js/async/en_guide_intro_welcome.js.map +1 -1
  51. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +16 -12
  52. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +1 -1
  53. package/doc_build/static/js/async/{en_.js → en_index.js} +12 -16
  54. package/doc_build/static/js/async/en_index.js.map +1 -0
  55. package/doc_build/static/js/async/en_plugins_guide_getting-started.js +17 -21
  56. package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +20 -24
  57. package/doc_build/static/js/async/en_plugins_guide_setup-function.js +19 -23
  58. package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +1 -1
  59. package/doc_build/static/js/async/en_plugins_official-list_overview.js +8 -12
  60. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +166 -367
  61. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +1 -1
  62. package/doc_build/static/js/async/{api_config_build-config.js → zh_api_config_build-config.js} +80 -35
  63. package/doc_build/static/js/async/{api_config_build-config.js.map → zh_api_config_build-config.js.map} +1 -1
  64. package/doc_build/static/js/async/{api_config_build-preset.js → zh_api_config_build-preset.js} +39 -21
  65. package/doc_build/static/js/async/{api_config_build-preset.js.map → zh_api_config_build-preset.js.map} +1 -1
  66. package/doc_build/static/js/async/{api_config_design-system.js → zh_api_config_design-system.js} +27 -23
  67. package/doc_build/static/js/async/{api_config_design-system.js.map → zh_api_config_design-system.js.map} +1 -1
  68. package/doc_build/static/js/async/{api_config_plugins.js → zh_api_config_plugins.js} +17 -21
  69. package/doc_build/static/js/async/{api_config_plugins.js.map → zh_api_config_plugins.js.map} +1 -1
  70. package/doc_build/static/js/async/{api_config_testing.js → zh_api_config_testing.js} +28 -26
  71. package/doc_build/static/js/async/{api_config_testing.js.map → zh_api_config_testing.js.map} +1 -1
  72. package/doc_build/static/js/async/{api_.js → zh_api_index.js} +10 -14
  73. package/doc_build/static/js/async/zh_api_index.js.map +1 -0
  74. package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js → zh_api_plugin-api_plugin-hooks.js} +25 -27
  75. package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js.map → zh_api_plugin-api_plugin-hooks.js.map} +1 -1
  76. package/doc_build/static/js/async/{guide_advance_asset.js → zh_guide_advance_asset.js} +18 -43
  77. package/doc_build/static/js/async/{guide_advance_asset.js.map → zh_guide_advance_asset.js.map} +1 -1
  78. package/doc_build/static/js/async/{guide_advance_build-umd.js → zh_guide_advance_build-umd.js} +22 -26
  79. package/doc_build/static/js/async/{guide_advance_build-umd.js.map → zh_guide_advance_build-umd.js.map} +1 -1
  80. package/doc_build/static/js/async/{guide_advance_copy.js → zh_guide_advance_copy.js} +26 -24
  81. package/doc_build/static/js/async/{guide_advance_copy.js.map → zh_guide_advance_copy.js.map} +1 -1
  82. package/doc_build/static/js/async/{guide_advance_external-dependency.js → zh_guide_advance_external-dependency.js} +17 -21
  83. package/doc_build/static/js/async/{guide_advance_external-dependency.js.map → zh_guide_advance_external-dependency.js.map} +1 -1
  84. package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js → zh_guide_advance_in-depth-about-build.js} +353 -95
  85. package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js.map → zh_guide_advance_in-depth-about-build.js.map} +1 -1
  86. package/doc_build/static/js/async/{guide_advance_in-depth-about-dev-command.js → zh_guide_advance_in-depth-about-dev-command.js} +16 -18
  87. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.js.map +1 -0
  88. package/doc_build/static/js/async/{guide_advance_theme-config.js → zh_guide_advance_theme-config.js} +24 -22
  89. package/doc_build/static/js/async/{guide_advance_theme-config.js.map → zh_guide_advance_theme-config.js.map} +1 -1
  90. package/doc_build/static/js/async/{guide_basic_before-getting-started.js → zh_guide_basic_before-getting-started.js} +272 -85
  91. package/doc_build/static/js/async/zh_guide_basic_before-getting-started.js.map +1 -0
  92. package/doc_build/static/js/async/{guide_basic_command-preview.js → zh_guide_basic_command-preview.js} +47 -35
  93. package/doc_build/static/js/async/zh_guide_basic_command-preview.js.map +1 -0
  94. package/doc_build/static/js/async/{guide_basic_modify-output-product.js → zh_guide_basic_modify-output-product.js} +203 -88
  95. package/doc_build/static/js/async/zh_guide_basic_modify-output-product.js.map +1 -0
  96. package/doc_build/static/js/async/{guide_basic_publish-your-project.js → zh_guide_basic_publish-your-project.js} +20 -22
  97. package/doc_build/static/js/async/{guide_basic_publish-your-project.js.map → zh_guide_basic_publish-your-project.js.map} +1 -1
  98. package/doc_build/static/js/async/{guide_basic_test-your-project.js → zh_guide_basic_test-your-project.js} +30 -35
  99. package/doc_build/static/js/async/{guide_basic_test-your-project.js.map → zh_guide_basic_test-your-project.js.map} +1 -1
  100. package/doc_build/static/js/async/{guide_basic_use-micro-generator.js → zh_guide_basic_use-micro-generator.js} +40 -20
  101. package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.js.map +1 -0
  102. package/doc_build/static/js/async/{guide_basic_using-storybook.js → zh_guide_basic_using-storybook.js} +78 -171
  103. package/doc_build/static/js/async/{guide_basic_using-storybook.js.map → zh_guide_basic_using-storybook.js.map} +1 -1
  104. package/doc_build/static/js/async/{guide_best-practices_components.js → zh_guide_best-practices_components.js} +41 -29
  105. package/doc_build/static/js/async/{guide_best-practices_components.js.map → zh_guide_best-practices_components.js.map} +1 -1
  106. package/doc_build/static/js/async/{guide_intro_getting-started.js → zh_guide_intro_getting-started.js} +291 -42
  107. package/doc_build/static/js/async/{guide_intro_getting-started.js.map → zh_guide_intro_getting-started.js.map} +1 -1
  108. package/doc_build/static/js/async/{guide_intro_welcome.js → zh_guide_intro_welcome.js} +28 -14
  109. package/doc_build/static/js/async/zh_guide_intro_welcome.js.map +1 -0
  110. package/doc_build/static/js/async/{guide_intro_why-module-engineering-solution.js → zh_guide_intro_why-module-engineering-solution.js} +18 -14
  111. package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.js.map +1 -0
  112. package/doc_build/static/js/async/{index.js → zh_index.js} +11 -15
  113. package/doc_build/static/js/async/zh_index.js.map +1 -0
  114. package/doc_build/static/js/async/{plugins_guide_getting-started.js → zh_plugins_guide_getting-started.js} +19 -23
  115. package/doc_build/static/js/async/{plugins_guide_getting-started.js.map → zh_plugins_guide_getting-started.js.map} +1 -1
  116. package/doc_build/static/js/async/{plugins_guide_plugin-object.js → zh_plugins_guide_plugin-object.js} +22 -26
  117. package/doc_build/static/js/async/{plugins_guide_plugin-object.js.map → zh_plugins_guide_plugin-object.js.map} +1 -1
  118. package/doc_build/static/js/async/{plugins_guide_setup-function.js → zh_plugins_guide_setup-function.js} +21 -25
  119. package/doc_build/static/js/async/{plugins_guide_setup-function.js.map → zh_plugins_guide_setup-function.js.map} +1 -1
  120. package/doc_build/static/js/async/{plugins_official-list_overview.js → zh_plugins_official-list_overview.js} +10 -14
  121. package/doc_build/static/js/async/zh_plugins_official-list_overview.js.map +1 -0
  122. package/doc_build/static/js/builder-runtime.js +1 -1
  123. package/doc_build/static/js/builder-runtime.js.map +1 -1
  124. package/doc_build/static/js/lib-polyfill.js +3433 -16355
  125. package/doc_build/static/js/lib-polyfill.js.map +1 -1
  126. package/doc_build/static/js/main.js +2073 -2700
  127. package/doc_build/static/js/main.js.map +1 -1
  128. 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 +485 -1689
  129. 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 +1 -1
  130. package/doc_build/static/search_index.json +1 -0
  131. package/docs/.island/dist/404.html +41 -0
  132. package/docs/.island/dist/assets/asset.26aea654.js +160 -0
  133. package/docs/.island/dist/assets/asset.36e3d3c9.js +160 -0
  134. package/docs/.island/dist/assets/before-getting-started.0e863740.js +87 -0
  135. package/docs/.island/dist/assets/before-getting-started.2c6e6b8a.js +87 -0
  136. package/docs/.island/dist/assets/build-config.460d11d9.js +804 -0
  137. package/docs/.island/dist/assets/build-config.e155e534.js +854 -0
  138. package/docs/.island/dist/assets/build-preset.6c2c6c62.js +256 -0
  139. package/docs/.island/dist/assets/build-preset.d3da921d.js +256 -0
  140. package/docs/.island/dist/assets/build-umd.ba00f028.js +264 -0
  141. package/docs/.island/dist/assets/build-umd.edb9d163.js +273 -0
  142. package/docs/.island/dist/assets/command-preview.1dc93921.js +264 -0
  143. package/docs/.island/dist/assets/command-preview.ef7a9d01.js +264 -0
  144. package/docs/.island/dist/assets/components.esm.03560353.js +9 -0
  145. package/docs/.island/dist/assets/copy.28dc4d5f.js +277 -0
  146. package/docs/.island/dist/assets/copy.f4625565.js +277 -0
  147. package/docs/.island/dist/assets/design-system.8993234c.js +1254 -0
  148. package/docs/.island/dist/assets/design-system.b0ba163f.js +639 -0
  149. package/docs/.island/dist/assets/dev.b373b152.js +37 -0
  150. package/docs/.island/dist/assets/dev.b39fd42a.js +37 -0
  151. package/docs/.island/dist/assets/down.f35427d3.svg +1 -0
  152. package/docs/.island/dist/assets/extension.4bf3526b.js +1 -0
  153. package/docs/.island/dist/assets/extension.d64ed0b8.js +469 -0
  154. package/docs/.island/dist/assets/external-dependency.2ede7532.js +156 -0
  155. package/docs/.island/dist/assets/external-dependency.92ca89e0.js +156 -0
  156. package/docs/.island/dist/assets/getting-started.822cf0b2.js +117 -0
  157. package/docs/.island/dist/assets/getting-started.e2764829.js +114 -0
  158. package/docs/.island/dist/assets/github.3bf8ccee.svg +1 -0
  159. package/docs/.island/dist/assets/in-depth-about-build.94cc902d.js +375 -0
  160. package/docs/.island/dist/assets/in-depth-about-build.aa74de10.js +374 -0
  161. package/docs/.island/dist/assets/in-depth-about-dev-command.877bdb83.js +33 -0
  162. package/docs/.island/dist/assets/in-depth-about-dev-command.9736befd.js +39 -0
  163. package/docs/.island/dist/assets/index.01786ba7.js +30 -0
  164. package/docs/.island/dist/assets/index.6cef6f5f.js +4 -0
  165. package/docs/.island/dist/assets/index.cb118238.js +36 -0
  166. package/docs/.island/dist/assets/index.ccb6ce27.js +4 -0
  167. package/docs/.island/dist/assets/island_inject.69495876.js +1 -0
  168. package/docs/.island/dist/assets/island_inject.cdfb22d9.js +1 -0
  169. package/docs/.island/dist/assets/loading.8c9bb911.svg +1 -0
  170. package/docs/.island/dist/assets/modify-output-product.9e2394d7.js +100 -0
  171. package/docs/.island/dist/assets/modify-output-product.f363845a.js +100 -0
  172. package/docs/.island/dist/assets/moon.6b705924.svg +3 -0
  173. package/docs/.island/dist/assets/plugin.70a61997.js +42 -0
  174. package/docs/.island/dist/assets/plugin.80b12ee2.js +42 -0
  175. package/docs/.island/dist/assets/publish-your-project.7321c10e.js +164 -0
  176. package/docs/.island/dist/assets/publish-your-project.7326359f.js +166 -0
  177. package/docs/.island/dist/assets/right.89674cd7.svg +1 -0
  178. package/docs/.island/dist/assets/search.0aea6901.svg +1 -0
  179. package/docs/.island/dist/assets/search.11353245.js +222 -0
  180. package/docs/.island/dist/assets/search.a1b1cff3.js +3 -0
  181. package/docs/.island/dist/assets/search.f9025ced.js +3 -0
  182. package/docs/.island/dist/assets/style.09015a4b.css +1 -0
  183. package/docs/.island/dist/assets/style.2e5f7bc2.css +1970 -0
  184. package/docs/.island/dist/assets/sun.841dac10.svg +11 -0
  185. package/docs/.island/dist/assets/test-your-project.8ab2809e.js +190 -0
  186. package/docs/.island/dist/assets/test-your-project.9ae2a49e.js +190 -0
  187. package/docs/.island/dist/assets/test.2bfe276b.js +66 -0
  188. package/docs/.island/dist/assets/test.a2c00a3f.js +67 -0
  189. package/docs/.island/dist/assets/translator.b1077c44.svg +1 -0
  190. package/docs/.island/dist/assets/use-micro-generator.13c1a09f.js +60 -0
  191. package/docs/.island/dist/assets/use-micro-generator.dfe877f6.js +60 -0
  192. package/docs/.island/dist/assets/using-storybook.adb88cb8.js +260 -0
  193. package/docs/.island/dist/assets/using-storybook.b8e7dd04.js +260 -0
  194. package/docs/.island/dist/assets/welcome.94880043.js +13 -0
  195. package/docs/.island/dist/assets/welcome.b2140e7e.js +13 -0
  196. package/docs/.island/dist/assets/why-module-engineering-solution.bfe7981a.js +26 -0
  197. package/docs/.island/dist/assets/why-module-engineering-solution.e31cd19f.js +26 -0
  198. package/docs/.island/dist/chunk-COLCRJ2V.js +1 -0
  199. package/docs/.island/dist/chunk-K5FMOYDC.js +10 -0
  200. package/docs/.island/dist/chunk-WE42KMYS.js +26 -0
  201. package/docs/.island/dist/client-entry.js +3 -0
  202. package/docs/.island/dist/en/api/build-config.html +344 -0
  203. package/docs/.island/dist/en/api/build-preset.html +82 -0
  204. package/docs/.island/dist/en/api/design-system.html +155 -0
  205. package/docs/.island/dist/en/api/dev.html +45 -0
  206. package/docs/.island/dist/en/api/index.html +41 -0
  207. package/docs/.island/dist/en/api/plugin.html +48 -0
  208. package/docs/.island/dist/en/api/test.html +58 -0
  209. package/docs/.island/dist/en/guide/advance/asset.html +68 -0
  210. package/docs/.island/dist/en/guide/advance/build-umd.html +72 -0
  211. package/docs/.island/dist/en/guide/advance/copy.html +82 -0
  212. package/docs/.island/dist/en/guide/advance/extension.html +41 -0
  213. package/docs/.island/dist/en/guide/advance/external-dependency.html +71 -0
  214. package/docs/.island/dist/en/guide/advance/in-depth-about-build.html +148 -0
  215. package/docs/.island/dist/en/guide/advance/in-depth-about-dev-command.html +51 -0
  216. package/docs/.island/dist/en/guide/basic/before-getting-started.html +127 -0
  217. package/docs/.island/dist/en/guide/basic/command-preview.html +100 -0
  218. package/docs/.island/dist/en/guide/basic/modify-output-product.html +140 -0
  219. package/docs/.island/dist/en/guide/basic/publish-your-project.html +91 -0
  220. package/docs/.island/dist/en/guide/basic/test-your-project.html +72 -0
  221. package/docs/.island/dist/en/guide/basic/use-micro-generator.html +65 -0
  222. package/docs/.island/dist/en/guide/basic/using-storybook.html +113 -0
  223. package/docs/.island/dist/en/guide/intro/getting-started.html +76 -0
  224. package/docs/.island/dist/en/guide/intro/welcome.html +53 -0
  225. package/docs/.island/dist/en/guide/intro/why-module-engineering-solution.html +49 -0
  226. package/docs/.island/dist/en/index.html +42 -0
  227. package/docs/.island/dist/react-dom.js +1 -0
  228. package/docs/.island/dist/react-dom_client.js +1 -0
  229. package/docs/.island/dist/react.js +1 -0
  230. package/docs/.island/dist/react_jsx-runtime.js +10 -0
  231. package/docs/.island/dist/ssr-manifest.json +57 -0
  232. package/docs/.island/dist/test-result.png +0 -0
  233. package/docs/.island/dist/why-module-solution.png +0 -0
  234. package/docs/.island/dist/zh/api/build-config.html +361 -0
  235. package/docs/.island/dist/zh/api/build-preset.html +82 -0
  236. package/docs/.island/dist/zh/api/design-system.html +149 -0
  237. package/docs/.island/dist/zh/api/dev.html +46 -0
  238. package/docs/.island/dist/zh/api/index.html +41 -0
  239. package/docs/.island/dist/zh/api/plugin.html +48 -0
  240. package/docs/.island/dist/zh/api/test.html +59 -0
  241. package/docs/.island/dist/zh/guide/advance/asset.html +68 -0
  242. package/docs/.island/dist/zh/guide/advance/build-umd.html +72 -0
  243. package/docs/.island/dist/zh/guide/advance/copy.html +82 -0
  244. package/docs/.island/dist/zh/guide/advance/extension.html +127 -0
  245. package/docs/.island/dist/zh/guide/advance/external-dependency.html +71 -0
  246. package/docs/.island/dist/zh/guide/advance/in-depth-about-build.html +148 -0
  247. package/docs/.island/dist/zh/guide/advance/in-depth-about-dev-command.html +53 -0
  248. package/docs/.island/dist/zh/guide/basic/before-getting-started.html +127 -0
  249. package/docs/.island/dist/zh/guide/basic/command-preview.html +100 -0
  250. package/docs/.island/dist/zh/guide/basic/modify-output-product.html +140 -0
  251. package/docs/.island/dist/zh/guide/basic/publish-your-project.html +92 -0
  252. package/docs/.island/dist/zh/guide/basic/test-your-project.html +72 -0
  253. package/docs/.island/dist/zh/guide/basic/use-micro-generator.html +65 -0
  254. package/docs/.island/dist/zh/guide/basic/using-storybook.html +114 -0
  255. package/docs/.island/dist/zh/guide/intro/getting-started.html +79 -0
  256. package/docs/.island/dist/zh/guide/intro/welcome.html +53 -0
  257. package/docs/.island/dist/zh/guide/intro/why-module-engineering-solution.html +49 -0
  258. package/docs/.island/dist/zh/index.html +42 -0
  259. package/docs/en/api/config/build-config.md +15 -5
  260. package/docs/en/api/config/build-preset.md +3 -2
  261. package/docs/en/api/config/design-system.md +623 -615
  262. package/docs/en/api/config/plugins.md +2 -2
  263. package/docs/en/api/config/testing.md +2 -1
  264. package/docs/en/guide/advance/asset.mdx +0 -4
  265. package/docs/en/guide/advance/build-umd.mdx +3 -3
  266. package/docs/en/guide/advance/in-depth-about-build.md +14 -13
  267. package/docs/en/guide/advance/in-depth-about-dev-command.md +2 -1
  268. package/docs/en/guide/basic/before-getting-started.md +16 -9
  269. package/docs/en/guide/basic/command-preview.md +2 -2
  270. package/docs/en/guide/basic/modify-output-product.md +65 -69
  271. package/docs/en/guide/basic/test-your-project.mdx +1 -3
  272. package/docs/en/guide/basic/use-micro-generator.md +4 -0
  273. package/docs/en/guide/basic/using-storybook.mdx +1 -13
  274. package/docs/en/guide/intro/getting-started.md +16 -7
  275. package/docs/en/plugins/guide/getting-started.mdx +2 -2
  276. package/docs/en/plugins/guide/plugin-object.mdx +5 -5
  277. package/docs/zh/api/config/build-config.md +18 -6
  278. package/docs/zh/api/config/build-preset.md +3 -2
  279. package/docs/zh/api/config/design-system.md +2 -2
  280. package/docs/zh/api/config/plugins.md +2 -2
  281. package/docs/zh/api/config/testing.md +3 -2
  282. package/docs/zh/guide/advance/asset.mdx +0 -5
  283. package/docs/zh/guide/advance/build-umd.mdx +3 -3
  284. package/docs/zh/guide/advance/in-depth-about-build.md +14 -13
  285. package/docs/zh/guide/advance/in-depth-about-dev-command.md +2 -1
  286. package/docs/zh/guide/basic/before-getting-started.md +15 -8
  287. package/docs/zh/guide/basic/command-preview.md +2 -2
  288. package/docs/zh/guide/basic/modify-output-product.md +17 -19
  289. package/docs/zh/guide/basic/test-your-project.mdx +1 -3
  290. package/docs/zh/guide/basic/use-micro-generator.md +5 -1
  291. package/docs/zh/guide/basic/using-storybook.mdx +9 -19
  292. package/docs/zh/guide/intro/getting-started.md +17 -11
  293. package/docs/zh/plugins/guide/getting-started.mdx +2 -2
  294. package/docs/zh/plugins/guide/plugin-object.mdx +5 -5
  295. package/modern.config.ts +11 -5
  296. package/package.json +4 -4
  297. package/doc_build/static/js/async/api_.js.map +0 -1
  298. package/doc_build/static/js/async/en_.js.map +0 -1
  299. package/doc_build/static/js/async/en_api_.js.map +0 -1
  300. package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js.map +0 -1
  301. package/doc_build/static/js/async/guide_basic_before-getting-started.js.map +0 -1
  302. package/doc_build/static/js/async/guide_basic_command-preview.js.map +0 -1
  303. package/doc_build/static/js/async/guide_basic_modify-output-product.js.map +0 -1
  304. package/doc_build/static/js/async/guide_basic_use-micro-generator.js.map +0 -1
  305. package/doc_build/static/js/async/guide_intro_welcome.js.map +0 -1
  306. package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js.map +0 -1
  307. package/doc_build/static/js/async/index.js.map +0 -1
  308. package/doc_build/static/js/async/plugins_official-list_overview.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["guide_advance_in-depth-about-build"],{
2
+ (self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_guide_advance_in-depth-about-build"],{
3
3
 
4
4
  /***/ "./docs/zh/guide/advance/in-depth-about-build.md":
5
5
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@@ -18,11 +18,11 @@ __webpack_require__.r(__webpack_exports__);
18
18
  /*@jsxRuntime automatic @jsxImportSource react*/
19
19
 
20
20
 
21
- var CH = {
21
+ const CH = {
22
22
  annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
23
23
  Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code
24
24
  };
25
- var chCodeConfig = {
25
+ const chCodeConfig = {
26
26
  "staticMediaQuery": "not screen, (max-width: 768px)",
27
27
  "theme": {
28
28
  "name": "nord",
@@ -1185,12 +1185,12 @@ var chCodeConfig = {
1185
1185
  "autoImport": true,
1186
1186
  "showCopyButton": true,
1187
1187
  "skipLanguages": [],
1188
- "filepath": "/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/advance/in-depth-about-build.md"
1188
+ "filepath": "/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/guide/advance/in-depth-about-build.md"
1189
1189
  };
1190
- var frontmatter = {
1190
+ const frontmatter = {
1191
1191
  "sidebar_position": 1
1192
1192
  };
1193
- var toc = [{
1193
+ const toc = [{
1194
1194
  "id": "深入理解-buildconfig",
1195
1195
  "text": "深入理解 buildConfig",
1196
1196
  "depth": 2
@@ -1251,10 +1251,10 @@ var toc = [{
1251
1251
  "text": "构建报错",
1252
1252
  "depth": 2
1253
1253
  }];
1254
- var title = "\u6DF1\u5165\u7406\u89E3\u6784\u5EFA";
1255
- var content = "\"---\\nsidebar_position: 1\\n---\\n\\n# 深入理解构建\\n\\n在【基础使用】的部分,我们已经知道可以通过 `buildConfig` 配置对项目的输出产物进行修改。`buildConfig` 不仅描述了产物的一些特性,同时还为构建产物提供了一些功能。\\n\\n:::tip{title=注意}\\n如果你还不清楚 `buildConfig` 是什么,建议花一些时间通过下面的链接了解一下:\\n\\n- 【[修改输出产物](/guide/basic/modify-output-product)】\\n :::\\n\\n而在本章里我们将要深入理解某些构建配置的使用以及了解执行 `modern build` 命令的时候发生了什么。\\n\\n## 深入理解 `buildConfig`\\n\\n### Bundle 和 Bundleless\\n\\n那么首先我们来了解一下 Bundle 和 Bundleless。\\n\\n所谓 Bundle 是指对构建产物进行打包,构建产物可能是一个文件,也有可能是基于一定的[代码拆分策略](https://esbuild.github.io/api/#splitting)得到的多个文件。\\n\\n而 Bundleless 则是指对每个源文件单独进行编译构建,但是并不将它们打包在一起。每一个产物文件都可以找到与之相对应的源码文件。**Bundleless 构建的过程,也可以理解为仅对源文件进行代码转换的过程**。\\n\\n在 `buildConfig` 中可以通过 [`buildConfig.buildType`](/api/config/build-config#buildtype) 来指定当前构建任务是 Bundle 还是 Bundleless。\\n\\n### `input` 与 `sourceDir` 的关系\\n\\n[`buildConfig.input`](/api/config/build-config#input) 用于指定读取源码的文件路径或者目录路径,其默认值在 Bundle 和 Bundleless 构建过程中有所不同:\\n\\n- 当 `buildType: 'bundle'` 的时候,`input` 默认值为 `['src/index.ts']`\\n- 当 `buildType: 'bundleless'` 的时候,`input` 默认值为 `['src']`\\n > 实际上,在 `buildType: 'bundle'` 的时候,构建工具会检测是否存在符合 `src/index.(j|t)sx?` 这个名称规则的文件,并将其作为入口文件。\\n\\n:::warn{title=注意}\\n建议不要在 Bundleless 构建过程中指定多个源码文件目录,可能出现不符合预期的结果。目前多个源码目录的 Bundleless 构建还处于不稳定阶段。\\n:::\\n\\n从默认值上我们可以知道:**Bundle 构建一般可以指定文件路径作为构建的入口,而 Bundleless 构建则更期望使用目录路径寻找源文件**。\\n\\n#### `input` 的对象模式\\n\\n在 Bundle 构建过程中,除了将 `input` 设置为一个数组,也可以将它设置为一个对象。**通过使用对象的形式,我们可以修改构建产物输出的文件名称**。那么对于下面的例子,`./src/index.ts` 对应的构建产物文件路径为 `./dist/main.js`。\\n\\n```tsx modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildConfig: {\\n input: {\\n main: ['./src/index.ts'],\\n },\\n outDir: './dist',\\n },\\n});\\n```\\n\\n而在 Bundleless 构建过程中,虽然同样支持这样的使用方式,但是并不推荐。\\n\\n#### `sourceDir`\\n\\n[`sourceDir`](/api/config/build-config#sourcedir) 用于指定源码目录,它主要与以下两个内容有关系:\\n\\n- 类型文件生成\\n- 指定构建过程中的 [`outbase`](https://esbuild.github.io/api/#outbase)\\n\\n一般来说:\\n\\n- **在 Bundleless 构建过程中,`sourceDir` 与 `input` 的值要保持一致,它们的默认值都是 `src`**。\\n- 在 Bundle 构建过程中,很少需要使用 `sourceDir`。\\n\\n### 类型文件\\n\\n[`buildConfig.dts`](/api/config/build-config#dts) 配置主要用于类型文件的生成。\\n\\n#### 关闭类型生成\\n\\n默认情况下类型生成功能是开启的,如果需要关闭的话,可以按照如下配置:\\n\\n```ts ./modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildConfig: {\\n dts: false,\\n },\\n});\\n```\\n\\n:::tip\\n关闭类型文件后,一般来说构建速度会有所提升。\\n:::\\n\\n#### 打包类型文件\\n\\n在 `buildType: 'bundleless'` 的时候,类型文件的生成是使用项目的 `tsc` 命令来完成生产。\\n\\n**模块工程解决方案同时还支持对类型文件进行打包**,不过使用该功能的时候需要注意:\\n\\n- 一些第三方依赖存在错误的语法会导致打包过程失败。因此对于这种情况,需要手动通过 [`buildConfig.externals`](/api/config/build-config#externals) 将这类第三方包排除。\\n- 对于第三方依赖的类型文件指向的是一个 `.ts` 文件的情况,目前无法处理。比如第三方依赖的 `package.json` 中存在这样的内容: `{\\\"types\\\": \\\"./src/index.ts\\\"}`。\\n\\n#### 别名转换\\n\\n在 Bundleless 构建过程中,如果源代码中出现了别名,例如:\\n\\n```ts ./src/index.ts\\nimport utils from '@common/utils';\\n```\\n\\n正常来说,使用 `tsc` 生成的产物类型文件也会包含这些别名。不过 Module Tools 会对 `tsc` 生成的类型文件里的别名进行转换处理:\\n\\n- 对于类似 `import '@common/utils'` 或者 `import utils from '@common/utils'` 这样形式的代码可以进行别名转换。\\n- 对于类似 `export { utils } from '@common/utils'` 这样形式的代码可以进行别名转换。\\n\\n然而也存在一些情况,目前还无法处理:\\n\\n- 对于类似 `Promise<import('@common/utils')>` 这样形式的输出类型目前无法进行转换。\\n\\n#### 一些 `dts` 的使用示例\\n\\n一般使用方式:\\n\\n```ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n // 此时打包的类型文件输出路径为 `./dist/types`\\n buildConfig: {\\n buildType: 'bundle',\\n dts: {\\n tsconfigPath: './other-tsconfig.json',\\n distPath: './types',\\n },\\n outDir: './dist',\\n },\\n});\\n```\\n\\n使用 `dts.only` 的情况:\\n\\n```ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n // 此时类型文件没有进行打包,输出路径为 `./dist/types`\\n buildConfig: [\\n {\\n buildType: 'bundle',\\n dts: false,\\n outDir: './dist',\\n },\\n {\\n buildType: 'bundleless',\\n dts: {\\n only: true,\\n },\\n outDir: './dist/types',\\n },\\n ],\\n});\\n```\\n\\n### `buildConfig.define` 不同场景的使用方式\\n\\n[`buildConfig.define`](/api/config/build-config#define) 功能有些类似 [`webpack.DefinePlugin`](https://webpack.js.org/plugins/define-plugin/)。这里介绍几个使用场景:\\n\\n#### 环境变量替换\\n\\n```ts\\nimport { defineConfig } from '@modern-js/module-tools';\\nexport default defineConfig({\\n buildConfig: {\\n define: {\\n 'process.env.VERSION': JSON.stringify(process.env.VERSION || '0.0.0'),\\n },\\n },\\n});\\n```\\n\\n通过上面的配置,我们就可以将下面这段代码:\\n\\n```\\n// 编译前代码\\nconsole.log(process.env.VERSION);\\n```\\n\\n在执行 `VERSION=1.0.0 modern build` 的时候,转换为:\\n\\n```\\n// 编译后代码\\nconsole.log('1.0.0');\\n```\\n\\n#### 全局变量替换\\n\\n```ts\\nimport { defineConfig } from '@modern-js/module-tools';\\nexport default defineConfig({\\n buildConfig: {\\n define: {\\n VERSION: JSON.stringify(require('./package.json').version || '0.0.0'),\\n },\\n },\\n});\\n```\\n\\n通过上面的配置,我们就可以将下面这段代码:\\n\\n```\\n// 编译前代码\\nconsole.log(VERSION);\\n```\\n\\n转换为:\\n\\n```\\n// 编译后代码\\nconsole.log('1.0.0');\\n```\\n\\n不过要注意:如果项目是一个 TypeScript 项目,那么你可能需要在项目源代码目录下的 `.d.ts` 文件里增加以下内容:\\n\\n> 如果不存在 `d.ts` 文件,则可以手动创建。\\n\\n```ts env.d.ts\\ndeclare const YOUR_ADD_GLOBAL_VAR;\\n```\\n\\n## 构建过程\\n\\n当执行 `modern build` 命令的时候,会发生\\n\\n- 根据 `buildConfig.outDir` 清理产物目录。\\n- 编译 `js/ts` 源代码生成 Bundle/Bundleless 的 JS 构建产物。\\n- 使用 `tsc` 生成 Bundle/Bundleless 的类型文件。\\n- 处理 Copy 任务。\\n\\n## 构建报错\\n\\n当发生构建报错的时候,基于以上了解到的信息,可以很容易的明白在终端出现的报错内容:\\n\\n**js 或者 ts 构建的报错:**\\n\\n```bash\\nerror ModuleBuildError:\\n\\n╭───────────────────────╮\\n│ bundle failed: │\\n│ - format is \\\"cjs\\\" │\\n│ - target is \\\"esnext\\\" │\\n╰───────────────────────╯\\n\\nDetailed Information:\\n```\\n\\n**类型文件生成过程的报错:**\\n\\n```bash\\nerror ModuleBuildError:\\n\\nbundle DTS failed:\\n```\\n\\n对于 `js/ts` 构建错误,我们可以从报错信息中知道:\\n\\n- 通过 `'bundle failed:'` 来判断报错的是 Bundle 构建还是 Bundleless 构建?\\n- 构建过程的 `format` 是什么?\\n- 构建过程的 `target` 是什么?\\n- 具体的报错信息。\\n\"";
1254
+ const title = `深入理解构建`;
1255
+ const content = "\"---\\nsidebar_position: 1\\n---\\n\\n# 深入理解构建\\n\\n在【基础使用】的部分,我们已经知道可以通过 `buildConfig` 配置对项目的输出产物进行修改。`buildConfig` 不仅描述了产物的一些特性,同时还为构建产物提供了一些功能。\\n\\n:::tip{title=注意}\\n如果你还不清楚 `buildConfig` 是什么,建议花一些时间通过下面的链接了解一下:\\n\\n- 【[修改输出产物](/guide/basic/modify-output-product)】\\n\\n:::\\n\\n而在本章里我们将要深入理解某些构建配置的使用以及了解执行 `modern build` 命令的时候发生了什么。\\n\\n## 深入理解 `buildConfig`\\n\\n### Bundle 和 Bundleless\\n\\n那么首先我们来了解一下 Bundle 和 Bundleless。\\n\\n所谓 Bundle 是指对构建产物进行打包,构建产物可能是一个文件,也有可能是基于一定的[代码拆分策略](https://esbuild.github.io/api/#splitting)得到的多个文件。\\n\\n而 Bundleless 则是指对每个源文件单独进行编译构建,但是并不将它们打包在一起。每一个产物文件都可以找到与之相对应的源码文件。**Bundleless 构建的过程,也可以理解为仅对源文件进行代码转换的过程**。\\n\\n在 `buildConfig` 中可以通过 [`buildConfig.buildType`](/api/config/build-config#buildtype) 来指定当前构建任务是 Bundle 还是 Bundleless。\\n\\n### `input` 与 `sourceDir` 的关系\\n\\n[`buildConfig.input`](/api/config/build-config#input) 用于指定读取源码的文件路径或者目录路径,其默认值在 Bundle 和 Bundleless 构建过程中有所不同:\\n\\n- 当 `buildType: 'bundle'` 的时候,`input` 默认值为 `['src/index.ts']`\\n- 当 `buildType: 'bundleless'` 的时候,`input` 默认值为 `['src']`\\n > 实际上,在 `buildType: 'bundle'` 的时候,构建工具会检测是否存在符合 `src/index.(j|t)sx?` 这个名称规则的文件,并将其作为入口文件。\\n\\n:::warning {title=注意}\\n建议不要在 Bundleless 构建过程中指定多个源码文件目录,可能出现不符合预期的结果。目前多个源码目录的 Bundleless 构建还处于不稳定阶段。\\n:::\\n\\n从默认值上我们可以知道:**Bundle 构建一般可以指定文件路径作为构建的入口,而 Bundleless 构建则更期望使用目录路径寻找源文件**。\\n\\n#### `input` 的对象模式\\n\\n在 Bundle 构建过程中,除了将 `input` 设置为一个数组,也可以将它设置为一个对象。**通过使用对象的形式,我们可以修改构建产物输出的文件名称**。那么对于下面的例子,`./src/index.ts` 对应的构建产物文件路径为 `./dist/main.js`。\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildConfig: {\\n input: {\\n main: ['./src/index.ts'],\\n },\\n outDir: './dist',\\n },\\n});\\n```\\n\\n而在 Bundleless 构建过程中,虽然同样支持这样的使用方式,但是并不推荐。\\n\\n#### `sourceDir`\\n\\n[`sourceDir`](/api/config/build-config#sourcedir) 用于指定源码目录,它主要与以下两个内容有关系:\\n\\n- 类型文件生成\\n- 指定构建过程中的 [`outbase`](https://esbuild.github.io/api/#outbase)\\n\\n一般来说:\\n\\n- **在 Bundleless 构建过程中,`sourceDir` 与 `input` 的值要保持一致,它们的默认值都是 `src`**。\\n- 在 Bundle 构建过程中,很少需要使用 `sourceDir`。\\n\\n### 类型文件\\n\\n[`buildConfig.dts`](/api/config/build-config#dts) 配置主要用于类型文件的生成。\\n\\n#### 关闭类型生成\\n\\n默认情况下类型生成功能是开启的,如果需要关闭的话,可以按照如下配置:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildConfig: {\\n dts: false,\\n },\\n});\\n```\\n\\n:::tip\\n关闭类型文件后,一般来说构建速度会有所提升。\\n:::\\n\\n#### 打包类型文件\\n\\n在 `buildType: 'bundleless'` 的时候,类型文件的生成是使用项目的 `tsc` 命令来完成生产。\\n\\n**模块工程解决方案同时还支持对类型文件进行打包**,不过使用该功能的时候需要注意:\\n\\n- 一些第三方依赖存在错误的语法会导致打包过程失败。因此对于这种情况,需要手动通过 [`buildConfig.externals`](/api/config/build-config#externals) 将这类第三方包排除。\\n- 对于第三方依赖的类型文件指向的是一个 `.ts` 文件的情况,目前无法处理。比如第三方依赖的 `package.json` 中存在这样的内容: `{\\\"types\\\": \\\"./src/index.ts\\\"}`。\\n\\n#### 别名转换\\n\\n在 Bundleless 构建过程中,如果源代码中出现了别名,例如:\\n\\n```js ./src/index.ts\\nimport utils from '@common/utils';\\n```\\n\\n正常来说,使用 `tsc` 生成的产物类型文件也会包含这些别名。不过 Module Tools 会对 `tsc` 生成的类型文件里的别名进行转换处理:\\n\\n- 对于类似 `import '@common/utils'` 或者 `import utils from '@common/utils'` 这样形式的代码可以进行别名转换。\\n- 对于类似 `export { utils } from '@common/utils'` 这样形式的代码可以进行别名转换。\\n\\n然而也存在一些情况,目前还无法处理:\\n\\n- 对于类似 `Promise<import('@common/utils')>` 这样形式的输出类型目前无法进行转换。\\n\\n#### 一些 `dts` 的使用示例\\n\\n一般使用方式:\\n\\n```js\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n // 此时打包的类型文件输出路径为 `./dist/types`\\n buildConfig: {\\n buildType: 'bundle',\\n dts: {\\n tsconfigPath: './other-tsconfig.json',\\n distPath: './types',\\n },\\n outDir: './dist',\\n },\\n});\\n```\\n\\n使用 `dts.only` 的情况:\\n\\n```js\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n // 此时类型文件没有进行打包,输出路径为 `./dist/types`\\n buildConfig: [\\n {\\n buildType: 'bundle',\\n dts: false,\\n outDir: './dist',\\n },\\n {\\n buildType: 'bundleless',\\n dts: {\\n only: true,\\n },\\n outDir: './dist/types',\\n },\\n ],\\n});\\n```\\n\\n### `buildConfig.define` 不同场景的使用方式\\n\\n[`buildConfig.define`](/api/config/build-config#define) 功能有些类似 [`webpack.DefinePlugin`](https://webpack.js.org/plugins/define-plugin/)。这里介绍几个使用场景:\\n\\n#### 环境变量替换\\n\\n```js\\nimport { defineConfig } from '@modern-js/module-tools';\\nexport default defineConfig({\\n buildConfig: {\\n define: {\\n 'process.env.VERSION': JSON.stringify(process.env.VERSION || '0.0.0'),\\n },\\n },\\n});\\n```\\n\\n通过上面的配置,我们就可以将下面这段代码:\\n\\n```js\\n// 编译前代码\\nconsole.log(process.env.VERSION);\\n```\\n\\n在执行 `VERSION=1.0.0 modern build` 的时候,转换为:\\n\\n```js\\n// 编译后代码\\nconsole.log('1.0.0');\\n```\\n\\n#### 全局变量替换\\n\\n```js\\nimport { defineConfig } from '@modern-js/module-tools';\\nexport default defineConfig({\\n buildConfig: {\\n define: {\\n VERSION: JSON.stringify(require('./package.json').version || '0.0.0'),\\n },\\n },\\n});\\n```\\n\\n通过上面的配置,我们就可以将下面这段代码:\\n\\n```js\\n// 编译前代码\\nconsole.log(VERSION);\\n```\\n\\n转换为:\\n\\n```js\\n// 编译后代码\\nconsole.log('1.0.0');\\n```\\n\\n不过要注意:如果项目是一个 TypeScript 项目,那么你可能需要在项目源代码目录下的 `.d.ts` 文件里增加以下内容:\\n\\n> 如果不存在 `d.ts` 文件,则可以手动创建。\\n\\n```ts env.d.ts\\ndeclare const YOUR_ADD_GLOBAL_VAR;\\n```\\n\\n## 构建过程\\n\\n当执行 `modern build` 命令的时候,会发生\\n\\n- 根据 `buildConfig.outDir` 清理产物目录。\\n- 编译 `js/ts` 源代码生成 Bundle/Bundleless 的 JS 构建产物。\\n- 使用 `tsc` 生成 Bundle/Bundleless 的类型文件。\\n- 处理 Copy 任务。\\n\\n## 构建报错\\n\\n当发生构建报错的时候,基于以上了解到的信息,可以很容易的明白在终端出现的报错内容:\\n\\n**js 或者 ts 构建的报错:**\\n\\n```bash\\nerror ModuleBuildError:\\n\\n╭───────────────────────╮\\n│ bundle failed: │\\n│ - format is \\\"cjs\\\" │\\n│ - target is \\\"esnext\\\" │\\n╰───────────────────────╯\\n\\nDetailed Information:\\n```\\n\\n**类型文件生成过程的报错:**\\n\\n```bash\\nerror ModuleBuildError:\\n\\nbundle DTS failed:\\n```\\n\\n对于 `js/ts` 构建错误,我们可以从报错信息中知道:\\n\\n- 通过 `'bundle failed:'` 来判断报错的是 Bundle 构建还是 Bundleless 构建?\\n- 构建过程的 `format` 是什么?\\n- 构建过程的 `target` 是什么?\\n- 具体的报错信息。\\n\"";
1256
1256
  function _createMdxContent(props) {
1257
- var _components = Object.assign({
1257
+ const _components = Object.assign({
1258
1258
  h1: "h1",
1259
1259
  a: "a",
1260
1260
  p: "p",
@@ -1268,8 +1268,8 @@ function _createMdxContent(props) {
1268
1268
  blockquote: "blockquote",
1269
1269
  h4: "h4"
1270
1270
  }, props.components);
1271
- if (!CH) _missingMdxReference("CH", false, "47:1-58:4");
1272
- if (!CH.Code) _missingMdxReference("CH.Code", true, "47:1-58:4");
1271
+ if (!CH) _missingMdxReference("CH", false, "48:1-59:4");
1272
+ if (!CH.Code) _missingMdxReference("CH.Code", true, "48:1-59:4");
1273
1273
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
1274
1274
  children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h1, {
1275
1275
  id: "深入理解构建",
@@ -1291,15 +1291,15 @@ function _createMdxContent(props) {
1291
1291
  className: "modern-directive-title",
1292
1292
  children: "注意"
1293
1293
  }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.div, {
1294
- className: "island-directive-content",
1294
+ className: "modern-directive-content",
1295
1295
  children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1296
- children: ["如果你还不清楚 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1296
+ children: ["\n如果你还不清楚 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1297
1297
  children: "buildConfig"
1298
1298
  }), " 是什么,建议花一些时间通过下面的链接了解一下:"]
1299
1299
  }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
1300
1300
  children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
1301
1301
  children: ["【", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1302
- href: "/guide/basic/modify-output-product.html",
1302
+ href: "/module-tools/guide/basic/modify-output-product.html",
1303
1303
  children: "修改输出产物"
1304
1304
  }), "】"]
1305
1305
  }), "\n"]
@@ -1331,7 +1331,9 @@ function _createMdxContent(props) {
1331
1331
  children: "那么首先我们来了解一下 Bundle 和 Bundleless。"
1332
1332
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1333
1333
  children: ["所谓 Bundle 是指对构建产物进行打包,构建产物可能是一个文件,也有可能是基于一定的", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1334
- href: "https://esbuild.github.io/api/#splitting",
1334
+ href: "https://esbuild.github.io/api/#splitting-2",
1335
+ target: "_blank",
1336
+ rel: "nofollow",
1335
1337
  children: "代码拆分策略"
1336
1338
  }), "得到的多个文件。"]
1337
1339
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
@@ -1342,7 +1344,7 @@ function _createMdxContent(props) {
1342
1344
  children: ["在 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1343
1345
  children: "buildConfig"
1344
1346
  }), " 中可以通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1345
- href: "/api/config/build-config#buildtype.html",
1347
+ href: "/module-tools/api/config/build-config.html#buildtype-1",
1346
1348
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1347
1349
  children: "buildConfig.buildType"
1348
1350
  })
@@ -1361,7 +1363,7 @@ function _createMdxContent(props) {
1361
1363
  }), " 的关系"]
1362
1364
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1363
1365
  children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1364
- href: "/api/config/build-config#input.html",
1366
+ href: "/module-tools/api/config/build-config.html#input-1",
1365
1367
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1366
1368
  children: "buildConfig.input"
1367
1369
  })
@@ -1393,14 +1395,14 @@ function _createMdxContent(props) {
1393
1395
  }), "\n"]
1394
1396
  }), "\n"]
1395
1397
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.div, {
1396
- className: "modern-directive tip",
1398
+ className: "modern-directive warning",
1397
1399
  children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1398
1400
  className: "modern-directive-title",
1399
1401
  children: "注意"
1400
1402
  }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.div, {
1401
- className: "island-directive-content",
1403
+ className: "modern-directive-content",
1402
1404
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1403
- children: "建议不要在 Bundleless 构建过程中指定多个源码文件目录,可能出现不符合预期的结果。目前多个源码目录的 Bundleless 构建还处于不稳定阶段。"
1405
+ children: "\n建议不要在 Bundleless 构建过程中指定多个源码文件目录,可能出现不符合预期的结果。目前多个源码目录的 Bundleless 构建还处于不稳定阶段。"
1404
1406
  })
1405
1407
  })]
1406
1408
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
@@ -1471,7 +1473,7 @@ function _createMdxContent(props) {
1471
1473
  "content": "defineConfig",
1472
1474
  "props": {
1473
1475
  "style": {
1474
- "color": "#D8DEE9"
1476
+ "color": "#8FBCBB"
1475
1477
  }
1476
1478
  }
1477
1479
  }, {
@@ -1603,7 +1605,7 @@ function _createMdxContent(props) {
1603
1605
  "content": "buildConfig",
1604
1606
  "props": {
1605
1607
  "style": {
1606
- "color": "#D8DEE9"
1608
+ "color": "#88C0D0"
1607
1609
  }
1608
1610
  }
1609
1611
  }, {
@@ -1640,7 +1642,7 @@ function _createMdxContent(props) {
1640
1642
  "content": "input",
1641
1643
  "props": {
1642
1644
  "style": {
1643
- "color": "#D8DEE9"
1645
+ "color": "#88C0D0"
1644
1646
  }
1645
1647
  }
1646
1648
  }, {
@@ -1677,7 +1679,7 @@ function _createMdxContent(props) {
1677
1679
  "content": "main",
1678
1680
  "props": {
1679
1681
  "style": {
1680
- "color": "#D8DEE9"
1682
+ "color": "#88C0D0"
1681
1683
  }
1682
1684
  }
1683
1685
  }, {
@@ -1758,7 +1760,7 @@ function _createMdxContent(props) {
1758
1760
  "content": "outDir",
1759
1761
  "props": {
1760
1762
  "style": {
1761
- "color": "#D8DEE9"
1763
+ "color": "#88C0D0"
1762
1764
  }
1763
1765
  }
1764
1766
  }, {
@@ -1844,7 +1846,7 @@ function _createMdxContent(props) {
1844
1846
  }
1845
1847
  }]
1846
1848
  }],
1847
- "lang": "tsx"
1849
+ "lang": "js"
1848
1850
  },
1849
1851
  "annotations": []
1850
1852
  }]
@@ -1862,7 +1864,7 @@ function _createMdxContent(props) {
1862
1864
  })]
1863
1865
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1864
1866
  children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1865
- href: "/api/config/build-config#sourcedir.html",
1867
+ href: "/module-tools/api/config/build-config.html#sourcedir-2",
1866
1868
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1867
1869
  children: "sourceDir"
1868
1870
  })
@@ -1873,6 +1875,8 @@ function _createMdxContent(props) {
1873
1875
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
1874
1876
  children: ["指定构建过程中的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1875
1877
  href: "https://esbuild.github.io/api/#outbase",
1878
+ target: "_blank",
1879
+ rel: "nofollow",
1876
1880
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1877
1881
  children: "outbase"
1878
1882
  })
@@ -1906,7 +1910,7 @@ function _createMdxContent(props) {
1906
1910
  }), "类型文件"]
1907
1911
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1908
1912
  children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1909
- href: "/api/config/build-config#dts.html",
1913
+ href: "/module-tools/api/config/build-config.html#dts-1",
1910
1914
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1911
1915
  children: "buildConfig.dts"
1912
1916
  })
@@ -1924,12 +1928,12 @@ function _createMdxContent(props) {
1924
1928
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.Code, {
1925
1929
  codeConfig: chCodeConfig,
1926
1930
  northPanel: {
1927
- "tabs": ["./modern.config.ts"],
1928
- "active": "./modern.config.ts",
1931
+ "tabs": ["modern.config.ts"],
1932
+ "active": "modern.config.ts",
1929
1933
  "heightRatio": 1
1930
1934
  },
1931
1935
  files: [{
1932
- "name": "./modern.config.ts",
1936
+ "name": "modern.config.ts",
1933
1937
  "focus": "",
1934
1938
  "code": {
1935
1939
  "lines": [{
@@ -1965,7 +1969,7 @@ function _createMdxContent(props) {
1965
1969
  "content": "defineConfig",
1966
1970
  "props": {
1967
1971
  "style": {
1968
- "color": "#D8DEE9"
1972
+ "color": "#8FBCBB"
1969
1973
  }
1970
1974
  }
1971
1975
  }, {
@@ -2097,7 +2101,7 @@ function _createMdxContent(props) {
2097
2101
  "content": "buildConfig",
2098
2102
  "props": {
2099
2103
  "style": {
2100
- "color": "#D8DEE9"
2104
+ "color": "#88C0D0"
2101
2105
  }
2102
2106
  }
2103
2107
  }, {
@@ -2134,7 +2138,7 @@ function _createMdxContent(props) {
2134
2138
  "content": "dts",
2135
2139
  "props": {
2136
2140
  "style": {
2137
- "color": "#D8DEE9"
2141
+ "color": "#88C0D0"
2138
2142
  }
2139
2143
  }
2140
2144
  }, {
@@ -2206,7 +2210,7 @@ function _createMdxContent(props) {
2206
2210
  }
2207
2211
  }]
2208
2212
  }],
2209
- "lang": "ts"
2213
+ "lang": "js"
2210
2214
  },
2211
2215
  "annotations": []
2212
2216
  }]
@@ -2216,9 +2220,9 @@ function _createMdxContent(props) {
2216
2220
  className: "modern-directive-title",
2217
2221
  children: "TIP"
2218
2222
  }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.div, {
2219
- className: "island-directive-content",
2223
+ className: "modern-directive-content",
2220
2224
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
2221
- children: "关闭类型文件后,一般来说构建速度会有所提升。"
2225
+ children: "\n关闭类型文件后,一般来说构建速度会有所提升。"
2222
2226
  })
2223
2227
  })]
2224
2228
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h4, {
@@ -2242,7 +2246,7 @@ function _createMdxContent(props) {
2242
2246
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
2243
2247
  children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
2244
2248
  children: ["一些第三方依赖存在错误的语法会导致打包过程失败。因此对于这种情况,需要手动通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
2245
- href: "/api/config/build-config#externals.html",
2249
+ href: "/module-tools/api/config/build-config.html#externals-2",
2246
2250
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
2247
2251
  children: "buildConfig.externals"
2248
2252
  })
@@ -2296,7 +2300,7 @@ function _createMdxContent(props) {
2296
2300
  "content": "utils",
2297
2301
  "props": {
2298
2302
  "style": {
2299
- "color": "#D8DEE9"
2303
+ "color": "#8FBCBB"
2300
2304
  }
2301
2305
  }
2302
2306
  }, {
@@ -2350,7 +2354,7 @@ function _createMdxContent(props) {
2350
2354
  }
2351
2355
  }]
2352
2356
  }],
2353
- "lang": "ts"
2357
+ "lang": "js"
2354
2358
  },
2355
2359
  "annotations": []
2356
2360
  }]
@@ -2436,7 +2440,7 @@ function _createMdxContent(props) {
2436
2440
  "content": "defineConfig",
2437
2441
  "props": {
2438
2442
  "style": {
2439
- "color": "#D8DEE9"
2443
+ "color": "#8FBCBB"
2440
2444
  }
2441
2445
  }
2442
2446
  }, {
@@ -2584,7 +2588,7 @@ function _createMdxContent(props) {
2584
2588
  "content": "buildConfig",
2585
2589
  "props": {
2586
2590
  "style": {
2587
- "color": "#D8DEE9"
2591
+ "color": "#88C0D0"
2588
2592
  }
2589
2593
  }
2590
2594
  }, {
@@ -2621,7 +2625,7 @@ function _createMdxContent(props) {
2621
2625
  "content": "buildType",
2622
2626
  "props": {
2623
2627
  "style": {
2624
- "color": "#D8DEE9"
2628
+ "color": "#88C0D0"
2625
2629
  }
2626
2630
  }
2627
2631
  }, {
@@ -2679,7 +2683,7 @@ function _createMdxContent(props) {
2679
2683
  "content": "dts",
2680
2684
  "props": {
2681
2685
  "style": {
2682
- "color": "#D8DEE9"
2686
+ "color": "#88C0D0"
2683
2687
  }
2684
2688
  }
2685
2689
  }, {
@@ -2716,7 +2720,7 @@ function _createMdxContent(props) {
2716
2720
  "content": "tsconfigPath",
2717
2721
  "props": {
2718
2722
  "style": {
2719
- "color": "#D8DEE9"
2723
+ "color": "#88C0D0"
2720
2724
  }
2721
2725
  }
2722
2726
  }, {
@@ -2774,7 +2778,7 @@ function _createMdxContent(props) {
2774
2778
  "content": "distPath",
2775
2779
  "props": {
2776
2780
  "style": {
2777
- "color": "#D8DEE9"
2781
+ "color": "#88C0D0"
2778
2782
  }
2779
2783
  }
2780
2784
  }, {
@@ -2848,7 +2852,7 @@ function _createMdxContent(props) {
2848
2852
  "content": "outDir",
2849
2853
  "props": {
2850
2854
  "style": {
2851
- "color": "#D8DEE9"
2855
+ "color": "#88C0D0"
2852
2856
  }
2853
2857
  }
2854
2858
  }, {
@@ -2934,7 +2938,7 @@ function _createMdxContent(props) {
2934
2938
  }
2935
2939
  }]
2936
2940
  }],
2937
- "lang": "ts"
2941
+ "lang": "js"
2938
2942
  },
2939
2943
  "annotations": []
2940
2944
  }]
@@ -2986,7 +2990,7 @@ function _createMdxContent(props) {
2986
2990
  "content": "defineConfig",
2987
2991
  "props": {
2988
2992
  "style": {
2989
- "color": "#D8DEE9"
2993
+ "color": "#8FBCBB"
2990
2994
  }
2991
2995
  }
2992
2996
  }, {
@@ -3134,7 +3138,7 @@ function _createMdxContent(props) {
3134
3138
  "content": "buildConfig",
3135
3139
  "props": {
3136
3140
  "style": {
3137
- "color": "#D8DEE9"
3141
+ "color": "#88C0D0"
3138
3142
  }
3139
3143
  }
3140
3144
  }, {
@@ -3180,7 +3184,7 @@ function _createMdxContent(props) {
3180
3184
  "content": "buildType",
3181
3185
  "props": {
3182
3186
  "style": {
3183
- "color": "#D8DEE9"
3187
+ "color": "#88C0D0"
3184
3188
  }
3185
3189
  }
3186
3190
  }, {
@@ -3238,7 +3242,7 @@ function _createMdxContent(props) {
3238
3242
  "content": "dts",
3239
3243
  "props": {
3240
3244
  "style": {
3241
- "color": "#D8DEE9"
3245
+ "color": "#88C0D0"
3242
3246
  }
3243
3247
  }
3244
3248
  }, {
@@ -3282,7 +3286,7 @@ function _createMdxContent(props) {
3282
3286
  "content": "outDir",
3283
3287
  "props": {
3284
3288
  "style": {
3285
- "color": "#D8DEE9"
3289
+ "color": "#88C0D0"
3286
3290
  }
3287
3291
  }
3288
3292
  }, {
@@ -3372,7 +3376,7 @@ function _createMdxContent(props) {
3372
3376
  "content": "buildType",
3373
3377
  "props": {
3374
3378
  "style": {
3375
- "color": "#D8DEE9"
3379
+ "color": "#88C0D0"
3376
3380
  }
3377
3381
  }
3378
3382
  }, {
@@ -3430,7 +3434,7 @@ function _createMdxContent(props) {
3430
3434
  "content": "dts",
3431
3435
  "props": {
3432
3436
  "style": {
3433
- "color": "#D8DEE9"
3437
+ "color": "#88C0D0"
3434
3438
  }
3435
3439
  }
3436
3440
  }, {
@@ -3467,7 +3471,7 @@ function _createMdxContent(props) {
3467
3471
  "content": "only",
3468
3472
  "props": {
3469
3473
  "style": {
3470
- "color": "#D8DEE9"
3474
+ "color": "#88C0D0"
3471
3475
  }
3472
3476
  }
3473
3477
  }, {
@@ -3527,7 +3531,7 @@ function _createMdxContent(props) {
3527
3531
  "content": "outDir",
3528
3532
  "props": {
3529
3533
  "style": {
3530
- "color": "#D8DEE9"
3534
+ "color": "#88C0D0"
3531
3535
  }
3532
3536
  }
3533
3537
  }, {
@@ -3629,7 +3633,7 @@ function _createMdxContent(props) {
3629
3633
  }
3630
3634
  }]
3631
3635
  }],
3632
- "lang": "ts"
3636
+ "lang": "js"
3633
3637
  },
3634
3638
  "annotations": []
3635
3639
  }]
@@ -3645,12 +3649,14 @@ function _createMdxContent(props) {
3645
3649
  }), " 不同场景的使用方式"]
3646
3650
  }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
3647
3651
  children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
3648
- href: "/api/config/build-config#define.html",
3652
+ href: "/module-tools/api/config/build-config.html#define-1",
3649
3653
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
3650
3654
  children: "buildConfig.define"
3651
3655
  })
3652
3656
  }), " 功能有些类似 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
3653
3657
  href: "https://webpack.js.org/plugins/define-plugin/",
3658
+ target: "_blank",
3659
+ rel: "nofollow",
3654
3660
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
3655
3661
  children: "webpack.DefinePlugin"
3656
3662
  })
@@ -3707,7 +3713,7 @@ function _createMdxContent(props) {
3707
3713
  "content": "defineConfig",
3708
3714
  "props": {
3709
3715
  "style": {
3710
- "color": "#D8DEE9"
3716
+ "color": "#8FBCBB"
3711
3717
  }
3712
3718
  }
3713
3719
  }, {
@@ -3837,7 +3843,7 @@ function _createMdxContent(props) {
3837
3843
  "content": "buildConfig",
3838
3844
  "props": {
3839
3845
  "style": {
3840
- "color": "#D8DEE9"
3846
+ "color": "#88C0D0"
3841
3847
  }
3842
3848
  }
3843
3849
  }, {
@@ -3874,7 +3880,7 @@ function _createMdxContent(props) {
3874
3880
  "content": "define",
3875
3881
  "props": {
3876
3882
  "style": {
3877
- "color": "#D8DEE9"
3883
+ "color": "#88C0D0"
3878
3884
  }
3879
3885
  }
3880
3886
  }, {
@@ -3946,7 +3952,7 @@ function _createMdxContent(props) {
3946
3952
  "content": "JSON",
3947
3953
  "props": {
3948
3954
  "style": {
3949
- "color": "#8FBCBB"
3955
+ "color": "#81A1C1"
3950
3956
  }
3951
3957
  }
3952
3958
  }, {
@@ -4118,7 +4124,7 @@ function _createMdxContent(props) {
4118
4124
  }
4119
4125
  }]
4120
4126
  }],
4121
- "lang": "ts"
4127
+ "lang": "js"
4122
4128
  },
4123
4129
  "annotations": []
4124
4130
  }]
@@ -4138,15 +4144,93 @@ function _createMdxContent(props) {
4138
4144
  "lines": [{
4139
4145
  "tokens": [{
4140
4146
  "content": "// 编译前代码",
4141
- "props": {}
4147
+ "props": {
4148
+ "style": {
4149
+ "color": "#616E88"
4150
+ }
4151
+ }
4142
4152
  }]
4143
4153
  }, {
4144
4154
  "tokens": [{
4145
- "content": "console.log(process.env.VERSION);",
4146
- "props": {}
4155
+ "content": "console",
4156
+ "props": {
4157
+ "style": {
4158
+ "color": "#D8DEE9"
4159
+ }
4160
+ }
4161
+ }, {
4162
+ "content": ".",
4163
+ "props": {
4164
+ "style": {
4165
+ "color": "#ECEFF4"
4166
+ }
4167
+ }
4168
+ }, {
4169
+ "content": "log",
4170
+ "props": {
4171
+ "style": {
4172
+ "color": "#88C0D0"
4173
+ }
4174
+ }
4175
+ }, {
4176
+ "content": "(",
4177
+ "props": {
4178
+ "style": {
4179
+ "color": "#D8DEE9FF"
4180
+ }
4181
+ }
4182
+ }, {
4183
+ "content": "process",
4184
+ "props": {
4185
+ "style": {
4186
+ "color": "#D8DEE9"
4187
+ }
4188
+ }
4189
+ }, {
4190
+ "content": ".",
4191
+ "props": {
4192
+ "style": {
4193
+ "color": "#ECEFF4"
4194
+ }
4195
+ }
4196
+ }, {
4197
+ "content": "env",
4198
+ "props": {
4199
+ "style": {
4200
+ "color": "#D8DEE9"
4201
+ }
4202
+ }
4203
+ }, {
4204
+ "content": ".",
4205
+ "props": {
4206
+ "style": {
4207
+ "color": "#ECEFF4"
4208
+ }
4209
+ }
4210
+ }, {
4211
+ "content": "VERSION",
4212
+ "props": {
4213
+ "style": {
4214
+ "color": "#D8DEE9"
4215
+ }
4216
+ }
4217
+ }, {
4218
+ "content": ")",
4219
+ "props": {
4220
+ "style": {
4221
+ "color": "#D8DEE9FF"
4222
+ }
4223
+ }
4224
+ }, {
4225
+ "content": ";",
4226
+ "props": {
4227
+ "style": {
4228
+ "color": "#81A1C1"
4229
+ }
4230
+ }
4147
4231
  }]
4148
4232
  }],
4149
- "lang": "text"
4233
+ "lang": "js"
4150
4234
  },
4151
4235
  "annotations": []
4152
4236
  }]
@@ -4168,15 +4252,79 @@ function _createMdxContent(props) {
4168
4252
  "lines": [{
4169
4253
  "tokens": [{
4170
4254
  "content": "// 编译后代码",
4171
- "props": {}
4255
+ "props": {
4256
+ "style": {
4257
+ "color": "#616E88"
4258
+ }
4259
+ }
4172
4260
  }]
4173
4261
  }, {
4174
4262
  "tokens": [{
4175
- "content": "console.log('1.0.0');",
4176
- "props": {}
4263
+ "content": "console",
4264
+ "props": {
4265
+ "style": {
4266
+ "color": "#D8DEE9"
4267
+ }
4268
+ }
4269
+ }, {
4270
+ "content": ".",
4271
+ "props": {
4272
+ "style": {
4273
+ "color": "#ECEFF4"
4274
+ }
4275
+ }
4276
+ }, {
4277
+ "content": "log",
4278
+ "props": {
4279
+ "style": {
4280
+ "color": "#88C0D0"
4281
+ }
4282
+ }
4283
+ }, {
4284
+ "content": "(",
4285
+ "props": {
4286
+ "style": {
4287
+ "color": "#D8DEE9FF"
4288
+ }
4289
+ }
4290
+ }, {
4291
+ "content": "'",
4292
+ "props": {
4293
+ "style": {
4294
+ "color": "#ECEFF4"
4295
+ }
4296
+ }
4297
+ }, {
4298
+ "content": "1.0.0",
4299
+ "props": {
4300
+ "style": {
4301
+ "color": "#A3BE8C"
4302
+ }
4303
+ }
4304
+ }, {
4305
+ "content": "'",
4306
+ "props": {
4307
+ "style": {
4308
+ "color": "#ECEFF4"
4309
+ }
4310
+ }
4311
+ }, {
4312
+ "content": ")",
4313
+ "props": {
4314
+ "style": {
4315
+ "color": "#D8DEE9FF"
4316
+ }
4317
+ }
4318
+ }, {
4319
+ "content": ";",
4320
+ "props": {
4321
+ "style": {
4322
+ "color": "#81A1C1"
4323
+ }
4324
+ }
4177
4325
  }]
4178
4326
  }],
4179
- "lang": "text"
4327
+ "lang": "js"
4180
4328
  },
4181
4329
  "annotations": []
4182
4330
  }]
@@ -4232,7 +4380,7 @@ function _createMdxContent(props) {
4232
4380
  "content": "defineConfig",
4233
4381
  "props": {
4234
4382
  "style": {
4235
- "color": "#D8DEE9"
4383
+ "color": "#8FBCBB"
4236
4384
  }
4237
4385
  }
4238
4386
  }, {
@@ -4362,7 +4510,7 @@ function _createMdxContent(props) {
4362
4510
  "content": "buildConfig",
4363
4511
  "props": {
4364
4512
  "style": {
4365
- "color": "#D8DEE9"
4513
+ "color": "#88C0D0"
4366
4514
  }
4367
4515
  }
4368
4516
  }, {
@@ -4399,7 +4547,7 @@ function _createMdxContent(props) {
4399
4547
  "content": "define",
4400
4548
  "props": {
4401
4549
  "style": {
4402
- "color": "#D8DEE9"
4550
+ "color": "#88C0D0"
4403
4551
  }
4404
4552
  }
4405
4553
  }, {
@@ -4436,7 +4584,7 @@ function _createMdxContent(props) {
4436
4584
  "content": "VERSION",
4437
4585
  "props": {
4438
4586
  "style": {
4439
- "color": "#D8DEE9"
4587
+ "color": "#88C0D0"
4440
4588
  }
4441
4589
  }
4442
4590
  }, {
@@ -4457,7 +4605,7 @@ function _createMdxContent(props) {
4457
4605
  "content": "JSON",
4458
4606
  "props": {
4459
4607
  "style": {
4460
- "color": "#8FBCBB"
4608
+ "color": "#81A1C1"
4461
4609
  }
4462
4610
  }
4463
4611
  }, {
@@ -4650,7 +4798,7 @@ function _createMdxContent(props) {
4650
4798
  }
4651
4799
  }]
4652
4800
  }],
4653
- "lang": "ts"
4801
+ "lang": "js"
4654
4802
  },
4655
4803
  "annotations": []
4656
4804
  }]
@@ -4670,15 +4818,65 @@ function _createMdxContent(props) {
4670
4818
  "lines": [{
4671
4819
  "tokens": [{
4672
4820
  "content": "// 编译前代码",
4673
- "props": {}
4821
+ "props": {
4822
+ "style": {
4823
+ "color": "#616E88"
4824
+ }
4825
+ }
4674
4826
  }]
4675
4827
  }, {
4676
4828
  "tokens": [{
4677
- "content": "console.log(VERSION);",
4678
- "props": {}
4829
+ "content": "console",
4830
+ "props": {
4831
+ "style": {
4832
+ "color": "#D8DEE9"
4833
+ }
4834
+ }
4835
+ }, {
4836
+ "content": ".",
4837
+ "props": {
4838
+ "style": {
4839
+ "color": "#ECEFF4"
4840
+ }
4841
+ }
4842
+ }, {
4843
+ "content": "log",
4844
+ "props": {
4845
+ "style": {
4846
+ "color": "#88C0D0"
4847
+ }
4848
+ }
4849
+ }, {
4850
+ "content": "(",
4851
+ "props": {
4852
+ "style": {
4853
+ "color": "#D8DEE9FF"
4854
+ }
4855
+ }
4856
+ }, {
4857
+ "content": "VERSION",
4858
+ "props": {
4859
+ "style": {
4860
+ "color": "#D8DEE9"
4861
+ }
4862
+ }
4863
+ }, {
4864
+ "content": ")",
4865
+ "props": {
4866
+ "style": {
4867
+ "color": "#D8DEE9FF"
4868
+ }
4869
+ }
4870
+ }, {
4871
+ "content": ";",
4872
+ "props": {
4873
+ "style": {
4874
+ "color": "#81A1C1"
4875
+ }
4876
+ }
4679
4877
  }]
4680
4878
  }],
4681
- "lang": "text"
4879
+ "lang": "js"
4682
4880
  },
4683
4881
  "annotations": []
4684
4882
  }]
@@ -4698,15 +4896,79 @@ function _createMdxContent(props) {
4698
4896
  "lines": [{
4699
4897
  "tokens": [{
4700
4898
  "content": "// 编译后代码",
4701
- "props": {}
4899
+ "props": {
4900
+ "style": {
4901
+ "color": "#616E88"
4902
+ }
4903
+ }
4702
4904
  }]
4703
4905
  }, {
4704
4906
  "tokens": [{
4705
- "content": "console.log('1.0.0');",
4706
- "props": {}
4907
+ "content": "console",
4908
+ "props": {
4909
+ "style": {
4910
+ "color": "#D8DEE9"
4911
+ }
4912
+ }
4913
+ }, {
4914
+ "content": ".",
4915
+ "props": {
4916
+ "style": {
4917
+ "color": "#ECEFF4"
4918
+ }
4919
+ }
4920
+ }, {
4921
+ "content": "log",
4922
+ "props": {
4923
+ "style": {
4924
+ "color": "#88C0D0"
4925
+ }
4926
+ }
4927
+ }, {
4928
+ "content": "(",
4929
+ "props": {
4930
+ "style": {
4931
+ "color": "#D8DEE9FF"
4932
+ }
4933
+ }
4934
+ }, {
4935
+ "content": "'",
4936
+ "props": {
4937
+ "style": {
4938
+ "color": "#ECEFF4"
4939
+ }
4940
+ }
4941
+ }, {
4942
+ "content": "1.0.0",
4943
+ "props": {
4944
+ "style": {
4945
+ "color": "#A3BE8C"
4946
+ }
4947
+ }
4948
+ }, {
4949
+ "content": "'",
4950
+ "props": {
4951
+ "style": {
4952
+ "color": "#ECEFF4"
4953
+ }
4954
+ }
4955
+ }, {
4956
+ "content": ")",
4957
+ "props": {
4958
+ "style": {
4959
+ "color": "#D8DEE9FF"
4960
+ }
4961
+ }
4962
+ }, {
4963
+ "content": ";",
4964
+ "props": {
4965
+ "style": {
4966
+ "color": "#81A1C1"
4967
+ }
4968
+ }
4707
4969
  }]
4708
4970
  }],
4709
- "lang": "text"
4971
+ "lang": "js"
4710
4972
  },
4711
4973
  "annotations": []
4712
4974
  }]
@@ -5024,23 +5286,19 @@ function _createMdxContent(props) {
5024
5286
  })]
5025
5287
  });
5026
5288
  }
5027
- function MDXContent() {
5028
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5029
- var _ref = props.components || {},
5030
- MDXLayout = _ref.wrapper;
5289
+ function MDXContent(props = {}) {
5290
+ const {wrapper: MDXLayout} = props.components || ({});
5031
5291
  return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
5032
5292
  children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
5033
5293
  })) : _createMdxContent(props);
5034
5294
  }
5035
- _c = MDXContent;
5036
5295
  /* harmony default export */ __webpack_exports__["default"] = (MDXContent);
5037
5296
  function _missingMdxReference(id, component, place) {
5038
- throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/advance/in-depth-about-build.md`" : ""));
5297
+ throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/guide/advance/in-depth-about-build.md`" : ""));
5039
5298
  }
5040
- var _c;
5041
- __webpack_require__.$Refresh$.register(_c, "MDXContent");
5299
+
5042
5300
 
5043
5301
  /***/ })
5044
5302
 
5045
5303
  }]);
5046
- //# sourceMappingURL=guide_advance_in-depth-about-build.js.map
5304
+ //# sourceMappingURL=zh_guide_advance_in-depth-about-build.js.map