@modern-js/main-doc 2.0.0-beta.2 → 2.0.0-beta.3

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 (276) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/new.md +0 -2
  3. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/bootstrap.md +17 -3
  4. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/create-app.md +1 -1
  5. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-store.md +0 -22
  6. package/en/docusaurus-plugin-content-docs/current/components/reduck-migration.md +1 -0
  7. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/asset-prefix.md +1 -1
  8. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/hmr.md +1 -1
  9. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/https.md +1 -1
  10. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/port.md +1 -1
  11. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/progress-bar.md +1 -1
  12. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/start-url.md +1 -1
  13. package/en/docusaurus-plugin-content-docs/current/configure/app/experiments/lazy-compilation.md +1 -1
  14. package/en/docusaurus-plugin-content-docs/current/configure/app/html/app-icon.md +1 -1
  15. package/en/docusaurus-plugin-content-docs/current/configure/app/html/crossorigin.md +1 -1
  16. package/en/docusaurus-plugin-content-docs/current/configure/app/html/disable-html-folder.md +1 -1
  17. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon-by-entries.md +1 -1
  18. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon.md +1 -1
  19. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject-by-entries.md +1 -1
  20. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject.md +1 -1
  21. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta-by-entries.md +1 -1
  22. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta.md +1 -1
  23. package/en/docusaurus-plugin-content-docs/current/configure/app/html/mount-id.md +1 -1
  24. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-by-entries.md +1 -1
  25. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters-by-entries.md +1 -1
  26. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters.md +1 -1
  27. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template.md +1 -1
  28. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title-by-entries.md +1 -1
  29. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title.md +1 -1
  30. package/en/docusaurus-plugin-content-docs/current/configure/app/output/asset-prefix.md +1 -1
  31. package/en/docusaurus-plugin-content-docs/current/configure/app/output/assets-retry.md +1 -1
  32. package/en/docusaurus-plugin-content-docs/current/configure/app/output/charset.md +1 -1
  33. package/en/docusaurus-plugin-content-docs/current/configure/app/output/clean-dist-path.md +1 -1
  34. package/en/docusaurus-plugin-content-docs/current/configure/app/output/convert-to-rem.md +1 -1
  35. package/en/docusaurus-plugin-content-docs/current/configure/app/output/copy.md +1 -1
  36. package/en/docusaurus-plugin-content-docs/current/configure/app/output/css-module-local-ident-name.md +1 -1
  37. package/en/docusaurus-plugin-content-docs/current/configure/app/output/data-uri-limit.md +1 -1
  38. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-extract.md +1 -1
  39. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-module-extension.md +1 -1
  40. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-filename-hash.md +1 -1
  41. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-inline-runtime-chunk.md +1 -1
  42. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-minimize.md +1 -1
  43. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-source-map.md +1 -1
  44. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-ts-checker.md +1 -1
  45. package/en/docusaurus-plugin-content-docs/current/configure/app/output/dist-path.md +1 -1
  46. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-fallback.md +1 -1
  47. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-manifest.md +1 -1
  48. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-css-module-tsdeclaration.md +1 -1
  49. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-scripts.md +1 -1
  50. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-styles.md +1 -1
  51. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-latest-decorators.md +1 -1
  52. package/en/docusaurus-plugin-content-docs/current/configure/app/output/externals.md +1 -1
  53. package/en/docusaurus-plugin-content-docs/current/configure/app/output/filename.md +1 -1
  54. package/en/docusaurus-plugin-content-docs/current/configure/app/output/legal-comments.md +1 -1
  55. package/en/docusaurus-plugin-content-docs/current/configure/app/output/override-browserslist.md +1 -1
  56. package/en/docusaurus-plugin-content-docs/current/configure/app/output/polyfill.md +1 -1
  57. package/en/docusaurus-plugin-content-docs/current/configure/app/output/svg-default-export.md +1 -1
  58. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/build-cache.md +1 -1
  59. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/bundle-analyze.md +1 -1
  60. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/chunk-split.md +1 -1
  61. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/print-file-size.md +1 -1
  62. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/profile.md +1 -1
  63. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-console.md +1 -1
  64. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-moment-locale.md +1 -1
  65. package/en/docusaurus-plugin-content-docs/current/configure/app/plugins.md +1 -1
  66. package/en/docusaurus-plugin-content-docs/current/configure/app/security/sri.md +1 -1
  67. package/en/docusaurus-plugin-content-docs/current/configure/app/source/alias.md +1 -1
  68. package/en/docusaurus-plugin-content-docs/current/configure/app/source/compile-js-data-uri.md +1 -1
  69. package/en/docusaurus-plugin-content-docs/current/configure/app/source/define.md +1 -1
  70. package/en/docusaurus-plugin-content-docs/current/configure/app/source/exclude.md +1 -1
  71. package/en/docusaurus-plugin-content-docs/current/configure/app/source/global-vars.md +1 -1
  72. package/en/docusaurus-plugin-content-docs/current/configure/app/source/include.md +1 -1
  73. package/en/docusaurus-plugin-content-docs/current/configure/app/source/module-scopes.md +1 -1
  74. package/en/docusaurus-plugin-content-docs/current/configure/app/source/pre-entry.md +1 -1
  75. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-extension-prefix.md +1 -1
  76. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-main-fields.md +1 -1
  77. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/autoprefixer.md +1 -1
  78. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/babel.md +1 -1
  79. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-extract.md +1 -1
  80. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-loader.md +1 -1
  81. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/dev-server.md +1 -1
  82. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/html-plugin.md +1 -1
  83. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/inspector.md +1 -1
  84. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/less.md +1 -1
  85. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/minify-css.md +1 -1
  86. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/postcss.md +1 -1
  87. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/pug.md +1 -1
  88. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/sass.md +1 -1
  89. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/style-loader.md +1 -1
  90. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/styled-components.md +1 -1
  91. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/swc.md +42 -0
  92. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/terser.md +1 -1
  93. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-checker.md +1 -1
  94. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-loader.md +1 -1
  95. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack-chain.md +1 -1
  96. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack.md +1 -1
  97. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/builder.md +46 -0
  98. package/en/docusaurus-plugin-content-docs/current.json +18 -18
  99. package/package.json +3 -3
  100. package/scripts/config.ts +2 -2
  101. package/zh/apis/app/commands/new.md +0 -2
  102. package/zh/apis/app/runtime/app/_category_.json +1 -1
  103. package/zh/apis/app/runtime/bff/_category_.json +1 -1
  104. package/zh/apis/app/runtime/core/_category_.json +1 -1
  105. package/zh/apis/app/runtime/core/bootstrap.md +17 -3
  106. package/zh/apis/app/runtime/model/_category_.json +1 -1
  107. package/zh/apis/app/runtime/model/create-app.md +1 -1
  108. package/zh/apis/app/runtime/model/use-store.md +1 -23
  109. package/zh/apis/app/runtime/router/_category_.json +1 -1
  110. package/zh/apis/app/runtime/ssr/_category_.json +1 -1
  111. package/zh/apis/app/runtime/testing/_category_.json +1 -1
  112. package/zh/apis/app/runtime/utility/_category_.json +1 -1
  113. package/zh/apis/app/runtime/web-server/_category_.json +1 -1
  114. package/zh/components/reduck-migration.md +1 -0
  115. package/zh/configure/app/dev/asset-prefix.md +1 -1
  116. package/zh/configure/app/dev/hmr.md +1 -1
  117. package/zh/configure/app/dev/https.md +1 -1
  118. package/zh/configure/app/dev/port.md +1 -1
  119. package/zh/configure/app/dev/progress-bar.md +1 -1
  120. package/zh/configure/app/dev/start-url.md +1 -1
  121. package/zh/configure/app/experiments/_category_.json +4 -0
  122. package/zh/configure/app/experiments/lazy-compilation.md +1 -1
  123. package/zh/configure/app/html/_category_.json +4 -0
  124. package/zh/configure/app/html/app-icon.md +1 -1
  125. package/zh/configure/app/html/crossorigin.md +1 -1
  126. package/zh/configure/app/html/disable-html-folder.md +1 -1
  127. package/zh/configure/app/html/favicon-by-entries.md +1 -1
  128. package/zh/configure/app/html/favicon.md +1 -1
  129. package/zh/configure/app/html/inject-by-entries.md +1 -1
  130. package/zh/configure/app/html/inject.md +1 -1
  131. package/zh/configure/app/html/meta-by-entries.md +1 -1
  132. package/zh/configure/app/html/meta.md +1 -1
  133. package/zh/configure/app/html/mount-id.md +1 -1
  134. package/zh/configure/app/html/template-by-entries.md +1 -1
  135. package/zh/configure/app/html/template-parameters-by-entries.md +1 -1
  136. package/zh/configure/app/html/template-parameters.md +1 -1
  137. package/zh/configure/app/html/template.md +1 -1
  138. package/zh/configure/app/html/title-by-entries.md +1 -1
  139. package/zh/configure/app/html/title.md +1 -1
  140. package/zh/configure/app/output/asset-prefix.md +1 -1
  141. package/zh/configure/app/output/assets-retry.md +1 -1
  142. package/zh/configure/app/output/charset.md +1 -1
  143. package/zh/configure/app/output/clean-dist-path.md +1 -1
  144. package/zh/configure/app/output/convert-to-rem.md +1 -1
  145. package/zh/configure/app/output/copy.md +1 -1
  146. package/zh/configure/app/output/css-module-local-ident-name.md +1 -1
  147. package/zh/configure/app/output/data-uri-limit.md +1 -1
  148. package/zh/configure/app/output/disable-css-extract.md +1 -1
  149. package/zh/configure/app/output/disable-css-module-extension.md +1 -1
  150. package/zh/configure/app/output/disable-filename-hash.md +1 -1
  151. package/zh/configure/app/output/disable-inline-runtime-chunk.md +1 -1
  152. package/zh/configure/app/output/disable-minimize.md +1 -1
  153. package/zh/configure/app/output/disable-source-map.md +1 -1
  154. package/zh/configure/app/output/disable-ts-checker.md +1 -1
  155. package/zh/configure/app/output/dist-path.md +1 -1
  156. package/zh/configure/app/output/enable-asset-fallback.md +1 -1
  157. package/zh/configure/app/output/enable-asset-manifest.md +1 -1
  158. package/zh/configure/app/output/enable-css-module-tsdeclaration.md +1 -1
  159. package/zh/configure/app/output/enable-inline-scripts.md +1 -1
  160. package/zh/configure/app/output/enable-inline-styles.md +1 -1
  161. package/zh/configure/app/output/enable-latest-decorators.md +1 -1
  162. package/zh/configure/app/output/externals.md +1 -1
  163. package/zh/configure/app/output/filename.md +1 -1
  164. package/zh/configure/app/output/legal-comments.md +1 -1
  165. package/zh/configure/app/output/override-browserslist.md +1 -1
  166. package/zh/configure/app/output/polyfill.md +1 -1
  167. package/zh/configure/app/output/ssg.md +118 -114
  168. package/zh/configure/app/output/svg-default-export.md +1 -1
  169. package/zh/configure/app/performance/_category_.json +4 -0
  170. package/zh/configure/app/performance/build-cache.md +1 -1
  171. package/zh/configure/app/performance/bundle-analyze.md +1 -1
  172. package/zh/configure/app/performance/chunk-split.md +1 -1
  173. package/zh/configure/app/performance/print-file-size.md +1 -1
  174. package/zh/configure/app/performance/profile.md +1 -1
  175. package/zh/configure/app/performance/remove-console.md +1 -1
  176. package/zh/configure/app/performance/remove-moment-locale.md +1 -1
  177. package/zh/configure/app/plugins.md +1 -1
  178. package/zh/configure/app/runtime/state.md +13 -0
  179. package/zh/configure/app/security/_category_.json +4 -0
  180. package/zh/configure/app/security/sri.md +1 -1
  181. package/zh/configure/app/server/ssr.md +0 -2
  182. package/zh/configure/app/source/alias.md +1 -1
  183. package/zh/configure/app/source/compile-js-data-uri.md +1 -1
  184. package/zh/configure/app/source/define.md +1 -1
  185. package/zh/configure/app/source/exclude.md +1 -1
  186. package/zh/configure/app/source/global-vars.md +1 -1
  187. package/zh/configure/app/source/include.md +1 -1
  188. package/zh/configure/app/source/module-scopes.md +1 -1
  189. package/zh/configure/app/source/pre-entry.md +1 -1
  190. package/zh/configure/app/source/resolve-extension-prefix.md +1 -1
  191. package/zh/configure/app/source/resolve-main-fields.md +1 -1
  192. package/zh/configure/app/tools/autoprefixer.md +1 -1
  193. package/zh/configure/app/tools/babel.md +1 -1
  194. package/zh/configure/app/tools/css-extract.md +1 -1
  195. package/zh/configure/app/tools/css-loader.md +1 -1
  196. package/zh/configure/app/tools/dev-server.md +1 -1
  197. package/zh/configure/app/tools/html-plugin.md +1 -1
  198. package/zh/configure/app/tools/inspector.md +1 -1
  199. package/zh/configure/app/tools/less.md +1 -1
  200. package/zh/configure/app/tools/minify-css.md +1 -1
  201. package/zh/configure/app/tools/postcss.md +1 -1
  202. package/zh/configure/app/tools/pug.md +1 -1
  203. package/zh/configure/app/tools/sass.md +1 -1
  204. package/zh/configure/app/tools/style-loader.md +1 -1
  205. package/zh/configure/app/tools/styled-components.md +1 -1
  206. package/zh/configure/app/tools/swc.md +42 -0
  207. package/zh/configure/app/tools/terser.md +1 -1
  208. package/zh/configure/app/tools/ts-checker.md +1 -1
  209. package/zh/configure/app/tools/ts-loader.md +1 -1
  210. package/zh/configure/app/tools/webpack-chain.md +1 -1
  211. package/zh/configure/app/tools/webpack.md +1 -1
  212. package/zh/guides/advanced-features/custom-app.md +8 -2
  213. package/zh/guides/advanced-features/ssg.md +74 -63
  214. package/zh/guides/advanced-features/ssr.md +74 -11
  215. package/zh/guides/basic-features/builder.md +46 -0
  216. package/zh/guides/basic-features/css/_category_.json +1 -1
  217. package/zh/guides/basic-features/css/less-sass.md +1 -14
  218. package/zh/guides/basic-features/data-fetch.md +1 -1
  219. package/zh/guides/basic-features/env-vars.md +34 -0
  220. package/zh/guides/basic-features/routes.md +32 -35
  221. package/zh/guides/concept/entries.md +4 -4
  222. package/zh/guides/topic-detail/framework-plugin/extend.md +3 -4
  223. package/zh/{apis/app/runtime/plugin/hook-api.md → guides/topic-detail/framework-plugin/hook-list.md} +42 -135
  224. package/zh/{apis/app/runtime/plugin → guides/topic-detail/framework-plugin}/hook.md +2 -3
  225. package/zh/guides/topic-detail/framework-plugin/implement.md +21 -10
  226. package/zh/guides/topic-detail/framework-plugin/introduction.md +49 -0
  227. package/{en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin → zh/guides/topic-detail/framework-plugin}/plugin-api.md +3 -4
  228. package/zh/guides/topic-detail/framework-plugin/relationship.md +2 -3
  229. package/zh/guides/topic-detail/model/quick-start.md +4 -0
  230. package/zh/tutorials/first-app/c01-getting-started/1.2-minimal-mwa.md +2 -2
  231. package/zh/tutorials/first-app/c01-getting-started/1.4-enable-ssr.md +5 -2
  232. package/zh/tutorials/first-app/c02-generator-and-studio/2.2-boilerplates.md +4 -6
  233. package/zh/tutorials/first-app/c02-generator-and-studio/2.3-configuration.md +2 -4
  234. package/zh/tutorials/first-app/c03-ide/3.1-setting-up.md +1 -1
  235. package/zh/tutorials/first-app/c03-ide/3.2-hints-in-ide.md +44 -50
  236. package/zh/tutorials/first-app/c03-ide/3.3-autofix-in-ide.md +1 -1
  237. package/zh/tutorials/first-app/c03-ide/3.4-autofix-in-cli.md +4 -4
  238. package/zh/tutorials/first-app/c04-es6-plus-and-ts/4.1-use-es6-plus.md +8 -21
  239. package/zh/tutorials/first-app/c04-es6-plus-and-ts/4.2-use-typescript.md +37 -13
  240. package/zh/tutorials/first-app/c05-component/5.1-use-ui-library.md +3 -13
  241. package/zh/tutorials/first-app/c05-component/5.2-use-standalone-component.md +1 -21
  242. package/zh/tutorials/first-app/c06-css-and-component/6.1-css-in-js.md +9 -9
  243. package/zh/tutorials/first-app/c06-css-and-component/6.2-utility-class.md +9 -14
  244. package/zh/tutorials/first-app/c06-css-and-component/6.3-postcss.md +7 -7
  245. package/zh/tutorials/first-app/c06-css-and-component/6.4-design-system.md +1 -1
  246. package/zh/tutorials/first-app/c06-css-and-component/6.5-storybook.md +2 -2
  247. package/zh/tutorials/first-app/c06-css-and-component/6.6-testing.md +8 -17
  248. package/zh/tutorials/first-app/c07-app-entry/7.1-intro.md +23 -18
  249. package/zh/tutorials/first-app/c07-app-entry/7.2-add-entry-in-cli.md +30 -30
  250. package/zh/tutorials/first-app/c07-app-entry/7.3-manage-entries-by-hand.md +4 -9
  251. package/zh/tutorials/first-app/c08-client-side-routing/8.1-code-based-routing.md +66 -63
  252. package/zh/tutorials/first-app/c09-bff/9.2-enable-bff.md +35 -33
  253. package/zh/tutorials/first-app/c09-bff/9.3-fetch-bff.md +28 -102
  254. package/zh/tutorials/first-app/c10-model/10.1-application-architecture.md +4 -6
  255. package/zh/tutorials/first-app/c10-model/10.2-add-model.md +3 -3
  256. package/zh/tutorials/first-app/c10-model/10.3-use-model.md +21 -20
  257. package/zh/tutorials/first-app/c10-model/10.4-testing.md +2 -2
  258. package/zh/tutorials/first-app/c11-container/11.1-use-model-with-app-state.md +34 -68
  259. package/zh/tutorials/first-app/c11-container/11.2-add-container.md +40 -37
  260. package/zh/tutorials/first-app/c11-container/11.3-use-loader.md +6 -4
  261. package/zh/tutorials/first-app/c11-container/11.4-testing.md +2 -2
  262. package/zh/tutorials/foundations/introduction.md +1 -1
  263. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/default-alias.md +0 -25
  264. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/_category_.json +0 -4
  265. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/abstract.md +0 -26
  266. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/hook-api.md +0 -896
  267. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/hook.md +0 -170
  268. package/zh/apis/app/runtime/default-alias.md +0 -23
  269. package/zh/apis/app/runtime/plugin/_category_.json +0 -4
  270. package/zh/apis/app/runtime/plugin/abstract.md +0 -26
  271. package/zh/apis/app/runtime/plugin/plugin-api.md +0 -117
  272. package/zh/guides/basic-features/image.md +0 -43
  273. package/zh/guides/topic-detail/compile-speed.md +0 -182
  274. package/zh/guides/topic-detail/framework-plugin/abstract.md +0 -27
  275. package/zh/guides/troubleshooting/compile.md +0 -379
  276. package/zh/tutorials/first-app/c08-client-side-routing/8.2-file-based-routing.md +0 -310
@@ -4,7 +4,7 @@ sidebar_label: filename
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [output.filename](https://modernjs.dev/builder/zh/api/config-output.html#output-filename)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.filename](https://modernjs.dev/builder/zh/api/config-output.html#output-filename)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/filename.md'
@@ -4,7 +4,7 @@ sidebar_label: legalComments
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [output.legalComments](https://modernjs.dev/builder/zh/api/config-output.html#output-legalcomments)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.legalComments](https://modernjs.dev/builder/zh/api/config-output.html#output-legalcomments)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/legalComments.md'
@@ -4,7 +4,7 @@ sidebar_label: overrideBrowserslist
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [output.overrideBrowserslist](https://modernjs.dev/builder/zh/api/config-output.html#output-overridebrowserslist)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.overrideBrowserslist](https://modernjs.dev/builder/zh/api/config-output.html#output-overridebrowserslist)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/overrideBrowserslist.md'
@@ -4,7 +4,7 @@ sidebar_label: polyfill
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [output.polyfill](https://modernjs.dev/builder/zh/api/config-output.html#output-polyfill)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.polyfill](https://modernjs.dev/builder/zh/api/config-output.html#output-polyfill)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/polyfill.md'
@@ -4,7 +4,7 @@ sidebar_label: svgDefaultExport
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [output.svgDefaultExport](https://modernjs.dev/builder/zh/api/config-output.html#output-svgdefaultexport)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.svgDefaultExport](https://modernjs.dev/builder/zh/api/config-output.html#output-svgdefaultexport)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/svgDefaultExport.md'
@@ -4,7 +4,7 @@ sidebar_label: buildCache
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [performance.buildCache](https://modernjs.dev/builder/zh/api/config-performance.html#performance-buildcache)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [performance.buildCache](https://modernjs.dev/builder/zh/api/config-performance.html#performance-buildcache)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/performance/buildCache.md'
@@ -4,7 +4,7 @@ sidebar_label: bundleAnalyze
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [performance.bundleAnalyze](https://modernjs.dev/builder/zh/api/config-performance.html#performance-bundleanalyze)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [performance.bundleAnalyze](https://modernjs.dev/builder/zh/api/config-performance.html#performance-bundleanalyze)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/performance/bundleAnalyze.md'
@@ -4,7 +4,7 @@ sidebar_label: chunkSplit
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [performance.chunkSplit](https://modernjs.dev/builder/zh/api/config-performance.html#performance-chunksplit)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [performance.chunkSplit](https://modernjs.dev/builder/zh/api/config-performance.html#performance-chunksplit)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/performance/chunkSplit.md'
@@ -4,7 +4,7 @@ sidebar_label: printFileSize
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [performance.printFileSize](https://modernjs.dev/builder/zh/api/config-performance.html#performance-printfilesize)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [performance.printFileSize](https://modernjs.dev/builder/zh/api/config-performance.html#performance-printfilesize)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/performance/printFileSize.md'
@@ -4,7 +4,7 @@ sidebar_label: profile
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [performance.profile](https://modernjs.dev/builder/zh/api/config-performance.html#performance-profile)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [performance.profile](https://modernjs.dev/builder/zh/api/config-performance.html#performance-profile)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/performance/profile.md'
@@ -4,7 +4,7 @@ sidebar_label: removeConsole
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [performance.removeConsole](https://modernjs.dev/builder/zh/api/config-performance.html#performance-removeconsole)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [performance.removeConsole](https://modernjs.dev/builder/zh/api/config-performance.html#performance-removeconsole)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/performance/removeConsole.md'
@@ -4,7 +4,7 @@ sidebar_label: removeMomentLocale
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [performance.removeMomentLocale](https://modernjs.dev/builder/zh/api/config-performance.html#performance-removemomentlocale)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [performance.removeMomentLocale](https://modernjs.dev/builder/zh/api/config-performance.html#performance-removemomentlocale)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/performance/removeMomentLocale.md'
@@ -3,7 +3,7 @@ title: plugins
3
3
  sidebar_position: 9
4
4
  ---
5
5
 
6
- * Type: `CliPlugin[] | { cli: CliPlugin[] }`
6
+ * Type: `CliPlugin[]`
7
7
  * Default: `[]`
8
8
 
9
9
  Used to configure custom Modern.js plugins.
@@ -4,7 +4,7 @@ sidebar_label: sri
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [security.sri](https://modernjs.dev/builder/zh/api/config-security.html#security-sri)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [security.sri](https://modernjs.dev/builder/zh/api/config-security.html#security-sri)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/security/sri.md'
@@ -4,7 +4,7 @@ sidebar_label: alias
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.alias](https://modernjs.dev/builder/zh/api/config-source.html#source-alias)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.alias](https://modernjs.dev/builder/zh/api/config-source.html#source-alias)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/alias.md'
@@ -4,7 +4,7 @@ sidebar_label: compileJsDataURI
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.compileJsDataURI](https://modernjs.dev/builder/zh/api/config-source.html#source-compilejsdatauri)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.compileJsDataURI](https://modernjs.dev/builder/zh/api/config-source.html#source-compilejsdatauri)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/compileJsDataURI.md'
@@ -4,7 +4,7 @@ sidebar_label: define
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.define](https://modernjs.dev/builder/zh/api/config-source.html#source-define)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.define](https://modernjs.dev/builder/zh/api/config-source.html#source-define)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/define.md'
@@ -4,7 +4,7 @@ sidebar_label: exclude
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.exclude](https://modernjs.dev/builder/zh/api/config-source.html#source-exclude)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.exclude](https://modernjs.dev/builder/zh/api/config-source.html#source-exclude)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/exclude.md'
@@ -4,7 +4,7 @@ sidebar_label: globalVars
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.globalVars](https://modernjs.dev/builder/zh/api/config-source.html#source-globalvars)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.globalVars](https://modernjs.dev/builder/zh/api/config-source.html#source-globalvars)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/globalVars.md'
@@ -4,7 +4,7 @@ sidebar_label: include
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.include](https://modernjs.dev/builder/zh/api/config-source.html#source-include)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.include](https://modernjs.dev/builder/zh/api/config-source.html#source-include)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/include.md'
@@ -4,7 +4,7 @@ sidebar_label: moduleScopes
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.moduleScopes](https://modernjs.dev/builder/zh/api/config-source.html#source-modulescopes)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.moduleScopes](https://modernjs.dev/builder/zh/api/config-source.html#source-modulescopes)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/moduleScopes.md'
@@ -4,7 +4,7 @@ sidebar_label: preEntry
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.preEntry](https://modernjs.dev/builder/zh/api/config-source.html#source-preentry)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.preEntry](https://modernjs.dev/builder/zh/api/config-source.html#source-preentry)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/preEntry.md'
@@ -4,7 +4,7 @@ sidebar_label: resolveExtensionPrefix
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.resolveExtensionPrefix](https://modernjs.dev/builder/zh/api/config-source.html#source-resolveextensionprefix)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.resolveExtensionPrefix](https://modernjs.dev/builder/zh/api/config-source.html#source-resolveextensionprefix)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/resolveExtensionPrefix.md'
@@ -4,7 +4,7 @@ sidebar_label: resolveMainFields
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [source.resolveMainFields](https://modernjs.dev/builder/zh/api/config-source.html#source-resolvemainfields)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [source.resolveMainFields](https://modernjs.dev/builder/zh/api/config-source.html#source-resolvemainfields)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/source/resolveMainFields.md'
@@ -4,7 +4,7 @@ sidebar_label: autoprefixer
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.autoprefixer](https://modernjs.dev/builder/zh/api/config-tools.html#tools-autoprefixer)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.autoprefixer](https://modernjs.dev/builder/zh/api/config-tools.html#tools-autoprefixer)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/autoprefixer.md'
@@ -4,7 +4,7 @@ sidebar_label: babel
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.babel](https://modernjs.dev/builder/zh/api/config-tools.html#tools-babel)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.babel](https://modernjs.dev/builder/zh/api/config-tools.html#tools-babel)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/babel.md'
@@ -4,7 +4,7 @@ sidebar_label: cssExtract
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.cssExtract](https://modernjs.dev/builder/zh/api/config-tools.html#tools-cssextract)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.cssExtract](https://modernjs.dev/builder/zh/api/config-tools.html#tools-cssextract)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/cssExtract.md'
@@ -4,7 +4,7 @@ sidebar_label: cssLoader
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.cssLoader](https://modernjs.dev/builder/zh/api/config-tools.html#tools-cssloader)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.cssLoader](https://modernjs.dev/builder/zh/api/config-tools.html#tools-cssloader)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/cssLoader.md'
@@ -4,7 +4,7 @@ sidebar_label: devServer
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.devServer](https://modernjs.dev/builder/zh/api/config-tools.html#tools-devserver)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.devServer](https://modernjs.dev/builder/zh/api/config-tools.html#tools-devserver)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/devServer.md'
@@ -4,7 +4,7 @@ sidebar_label: htmlPlugin
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.htmlPlugin](https://modernjs.dev/builder/zh/api/config-tools.html#tools-htmlplugin)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.htmlPlugin](https://modernjs.dev/builder/zh/api/config-tools.html#tools-htmlplugin)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/htmlPlugin.md'
@@ -4,7 +4,7 @@ sidebar_label: inspector
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.inspector](https://modernjs.dev/builder/zh/api/config-tools.html#tools-inspector)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.inspector](https://modernjs.dev/builder/zh/api/config-tools.html#tools-inspector)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/inspector.md'
@@ -4,7 +4,7 @@ sidebar_label: less
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.less](https://modernjs.dev/builder/zh/api/config-tools.html#tools-less)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.less](https://modernjs.dev/builder/zh/api/config-tools.html#tools-less)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/less.md'
@@ -4,7 +4,7 @@ sidebar_label: minifyCss
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.minifyCss](https://modernjs.dev/builder/zh/api/config-tools.html#tools-minifycss)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.minifyCss](https://modernjs.dev/builder/zh/api/config-tools.html#tools-minifycss)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/minifyCss.md'
@@ -4,7 +4,7 @@ sidebar_label: postcss
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.postcss](https://modernjs.dev/builder/zh/api/config-tools.html#tools-postcss)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.postcss](https://modernjs.dev/builder/zh/api/config-tools.html#tools-postcss)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/postcss.md'
@@ -4,7 +4,7 @@ sidebar_label: pug
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.pug](https://modernjs.dev/builder/zh/api/config-tools.html#tools-pug)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.pug](https://modernjs.dev/builder/zh/api/config-tools.html#tools-pug)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/pug.md'
@@ -4,7 +4,7 @@ sidebar_label: sass
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.sass](https://modernjs.dev/builder/zh/api/config-tools.html#tools-sass)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.sass](https://modernjs.dev/builder/zh/api/config-tools.html#tools-sass)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/sass.md'
@@ -4,7 +4,7 @@ sidebar_label: styleLoader
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.styleLoader](https://modernjs.dev/builder/zh/api/config-tools.html#tools-styleloader)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.styleLoader](https://modernjs.dev/builder/zh/api/config-tools.html#tools-styleloader)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/styleLoader.md'
@@ -4,7 +4,7 @@ sidebar_label: styledComponents
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.styledComponents](https://modernjs.dev/builder/zh/api/config-tools.html#tools-styledcomponents)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.styledComponents](https://modernjs.dev/builder/zh/api/config-tools.html#tools-styledcomponents)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/styledComponents.md'
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: tools.swc
3
+ sidebar_label: swc
4
+ ---
5
+
6
+ - Type: `Object`
7
+ - Default: `undefined`
8
+
9
+ ## Introduction
10
+
11
+ [SWC](https://SWC.rs/) (Speedy Web Compiler) is a transformer and minimizer for JavaScript and TypeScript based on `Rust`. SWC can provide the same abilities with Babel, and it's more than 10x faster than Babel.
12
+
13
+ Modern.js Builder has a out-of-box plugin for SWC, power your Web application with Polyfill and minification, we also port some common used Babel plugins to SWC.
14
+
15
+ ## Install
16
+
17
+ The `@modern-js/plugin-swc` plugin needs to be installed before use. After the installation, the SWC compilation and compression will be automatically enabled.
18
+
19
+ ```bash
20
+ pnpm add @modern-js/plugin-swc -D
21
+ ```
22
+
23
+ ## Config
24
+
25
+ You can set the SWC compilation behavior through the `tools.swc` config.
26
+
27
+ ```js title="modern.config.ts"
28
+ import { defineConfig } from '@modern-js/app-tools';
29
+
30
+ export default defineConfig({
31
+ tools: {
32
+ swc: {
33
+ jsMinify: {
34
+ compress: {},
35
+ mangle: true,
36
+ },
37
+ },
38
+ },
39
+ });
40
+ ```
41
+
42
+ For config details, please refer to [Modern.js Builder - SWC Plugin Configuration](https://modernjs.dev/builder/en/plugins/plugin-swc.html#config).
@@ -4,7 +4,7 @@ sidebar_label: terser
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.terser](https://modernjs.dev/builder/zh/api/config-tools.html#tools-terser)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.terser](https://modernjs.dev/builder/zh/api/config-tools.html#tools-terser)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/terser.md'
@@ -4,7 +4,7 @@ sidebar_label: tsChecker
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.tsChecker](https://modernjs.dev/builder/zh/api/config-tools.html#tools-tschecker)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.tsChecker](https://modernjs.dev/builder/zh/api/config-tools.html#tools-tschecker)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/tsChecker.md'
@@ -4,7 +4,7 @@ sidebar_label: tsLoader
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.tsLoader](https://modernjs.dev/builder/zh/api/config-tools.html#tools-tsloader)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.tsLoader](https://modernjs.dev/builder/zh/api/config-tools.html#tools-tsloader)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/tsLoader.md'
@@ -4,7 +4,7 @@ sidebar_label: webpackChain
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.webpackChain](https://modernjs.dev/builder/zh/api/config-tools.html#tools-webpackchain)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.webpackChain](https://modernjs.dev/builder/zh/api/config-tools.html#tools-webpackchain)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/webpackChain.md'
@@ -4,7 +4,7 @@ sidebar_label: webpack
4
4
  ---
5
5
 
6
6
  :::info BUILDER
7
- This configuration is Modern.js Builder configuration, there may be links that cannot be redirected. for details, please refer to [tools.webpack](https://modernjs.dev/builder/zh/api/config-tools.html#tools-webpack)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [tools.webpack](https://modernjs.dev/builder/zh/api/config-tools.html#tools-webpack)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/tools/webpack.md'
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Builder
3
+ sidebar_position: 2
4
+ ---
5
+
6
+ **Modern.js uses [Modern.js Builder](https://modernjs.dev/builder) to build your Web APP. **
7
+
8
+ Modern.js Builder is one of the core components of Modern.js. It is a build engine for modern Web development and can be used independently of Modern.js. Modern.js Builder supports multiple bundlers such as webpack and rspack, and it uses webpack by default.
9
+
10
+ ## Build Architecture
11
+
12
+ From the perspective of building, Modern.js is divided into three layers, from top to bottom:
13
+
14
+ - Upper-layer framework: Modern.js.
15
+ - Universal build engine: Modern.js Builder.
16
+ - Low-level bundlers: webpack and rspack.
17
+
18
+ <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/builder-layers-1117.png" style={{ maxWidth: '540px' }} />
19
+
20
+ ## Builder Documentation
21
+
22
+ Since Modern.js Builder is a module that can be used independently, we provide a separate document for it, the site address is: [modernjs.dev/builder](https://modernjs.dev/builder).
23
+
24
+ In this document, you can learn about the detailed introduction of Modern.js Builder, and you can also find a complete usage guide for each building features. When you encounter building issues, it is recommended that you first read the Modern.js Builder documentation to solve them.
25
+
26
+ ## Builder Config
27
+
28
+ The config of Modern.js is inherited from Modern.js Builder, so you can use all build configs provided by Modern.js Builder in Modern.js.
29
+
30
+ Take the `html.title` config of Modern.js Builder as an example, you can directly use this config in the `modern.config.ts` file, and it will be automatically passed to Modern.js Builder.
31
+
32
+ ```ts title="modern.config.js"
33
+ export default defineConfig({
34
+ html: {
35
+ title: 'example',
36
+ },
37
+ });
38
+ ```
39
+
40
+ For details of building configs, please refer to [「Modern.js Builder - Builder Config」](https://modernjs.dev/builder/en/guide/basic/builder-config.html).
41
+
42
+ ## Building Features
43
+
44
+ Modern.js Builder provides a wealth of building features, including dozens of features such as JavaScript compilation, CSS compilation, static resource processing, hot module replacement, code compression, and TS type checking.
45
+
46
+ We recommend you to read [「Modern.js Builder - All Features」](https://modernjs.dev/builder/en/guide/features.html) to learn all the building features provided by Modern.js Builder.
@@ -179,44 +179,44 @@
179
179
  "message": "Runtime",
180
180
  "description": "The label for category runtime in sidebar apisAppSidebar"
181
181
  },
182
- "sidebar.apisAppSidebar.category.核心 API": {
183
- "message": "Core API",
182
+ "sidebar.apisAppSidebar.category.核心": {
183
+ "message": "Core",
184
184
  "description": "The label for category Core API in sidebar apisAppSidebar"
185
185
  },
186
- "sidebar.apisAppSidebar.category.App API": {
187
- "message": "App API",
186
+ "sidebar.apisAppSidebar.category.App": {
187
+ "message": "App",
188
188
  "description": "The label for category App API in sidebar apisAppSidebar"
189
189
  },
190
- "sidebar.apisAppSidebar.category.BFF Server API": {
191
- "message": "BFF Server API",
190
+ "sidebar.apisAppSidebar.category.BFF Server": {
191
+ "message": "BFF Server",
192
192
  "description": "The label for category BFF Server API in sidebar apisAppSidebar"
193
193
  },
194
- "sidebar.apisAppSidebar.category.Model API": {
195
- "message": "Model API",
194
+ "sidebar.apisAppSidebar.category.Model": {
195
+ "message": "Model",
196
196
  "description": "The label for category Model API in sidebar apisAppSidebar"
197
197
  },
198
- "sidebar.apisAppSidebar.category.Container API": {
199
- "message": "Container API",
198
+ "sidebar.apisAppSidebar.category.Container": {
199
+ "message": "Container",
200
200
  "description": "The label for category Container API in sidebar apisAppSidebar"
201
201
  },
202
- "sidebar.apisAppSidebar.category.Testing API": {
203
- "message": "Testing API",
202
+ "sidebar.apisAppSidebar.category.Testing": {
203
+ "message": "Testing",
204
204
  "description": "The label for category Testing API in sidebar apisAppSidebar"
205
205
  },
206
- "sidebar.apisAppSidebar.category.Web Server API": {
207
- "message": "Web Server API",
206
+ "sidebar.apisAppSidebar.category.Web Server": {
207
+ "message": "Web Server",
208
208
  "description": "The label for category Web Server API in sidebar apisAppSidebar"
209
209
  },
210
- "sidebar.apisAppSidebar.category.Utility API": {
211
- "message": "Utility API",
210
+ "sidebar.apisAppSidebar.category.Utility": {
211
+ "message": "Utility",
212
212
  "description": "The label for category Utility API in sidebar apisAppSidebar"
213
213
  },
214
214
  "sidebar.apisAppSidebar.category.loadable": {
215
215
  "message": "loadable",
216
216
  "description": "The label for category loadable in sidebar apisAppSidebar"
217
217
  },
218
- "sidebar.apisAppSidebar.category.插件 API": {
219
- "message": "插件 API",
218
+ "sidebar.apisAppSidebar.category.插件": {
219
+ "message": "插件",
220
220
  "description": "The label for category 插件 API in sidebar apisAppSidebar"
221
221
  },
222
222
  "sidebar.apisMonorepoSidebar.category.文件约定": {