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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (345) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/inspect.md +0 -4
  3. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/new.md +0 -2
  4. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/bootstrap.md +17 -3
  5. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/create-app.md +1 -1
  6. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-store.md +0 -22
  7. package/en/docusaurus-plugin-content-docs/current/components/init-app.md +42 -0
  8. package/en/docusaurus-plugin-content-docs/current/components/reduck-migration.md +1 -0
  9. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/asset-prefix.md +1 -1
  10. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/hmr.md +1 -1
  11. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/https.md +1 -1
  12. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/port.md +1 -1
  13. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/progress-bar.md +1 -1
  14. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/start-url.md +1 -1
  15. package/en/docusaurus-plugin-content-docs/current/configure/app/experiments/lazy-compilation.md +1 -1
  16. package/en/docusaurus-plugin-content-docs/current/configure/app/html/app-icon.md +1 -1
  17. package/en/docusaurus-plugin-content-docs/current/configure/app/html/crossorigin.md +1 -1
  18. package/en/docusaurus-plugin-content-docs/current/configure/app/html/disable-html-folder.md +1 -1
  19. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon-by-entries.md +1 -1
  20. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon.md +1 -1
  21. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject-by-entries.md +1 -1
  22. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject.md +1 -1
  23. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta-by-entries.md +1 -1
  24. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta.md +1 -1
  25. package/en/docusaurus-plugin-content-docs/current/configure/app/html/mount-id.md +1 -1
  26. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-by-entries.md +1 -1
  27. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters-by-entries.md +1 -1
  28. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters.md +1 -1
  29. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template.md +1 -1
  30. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title-by-entries.md +1 -1
  31. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title.md +1 -1
  32. package/en/docusaurus-plugin-content-docs/current/configure/app/output/asset-prefix.md +1 -1
  33. package/en/docusaurus-plugin-content-docs/current/configure/app/output/assets-retry.md +1 -1
  34. package/en/docusaurus-plugin-content-docs/current/configure/app/output/charset.md +1 -1
  35. package/en/docusaurus-plugin-content-docs/current/configure/app/output/clean-dist-path.md +1 -1
  36. package/en/docusaurus-plugin-content-docs/current/configure/app/output/convert-to-rem.md +1 -1
  37. package/en/docusaurus-plugin-content-docs/current/configure/app/output/copy.md +1 -1
  38. package/en/docusaurus-plugin-content-docs/current/configure/app/output/css-module-local-ident-name.md +1 -1
  39. package/en/docusaurus-plugin-content-docs/current/configure/app/output/data-uri-limit.md +1 -1
  40. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-extract.md +1 -1
  41. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-module-extension.md +1 -1
  42. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-filename-hash.md +1 -1
  43. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-inline-runtime-chunk.md +1 -1
  44. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-minimize.md +1 -1
  45. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-source-map.md +1 -1
  46. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-ts-checker.md +1 -1
  47. package/en/docusaurus-plugin-content-docs/current/configure/app/output/dist-path.md +1 -1
  48. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-fallback.md +1 -1
  49. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-manifest.md +1 -1
  50. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-css-module-tsdeclaration.md +1 -1
  51. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-scripts.md +1 -1
  52. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-styles.md +1 -1
  53. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-latest-decorators.md +1 -1
  54. package/en/docusaurus-plugin-content-docs/current/configure/app/output/externals.md +1 -1
  55. package/en/docusaurus-plugin-content-docs/current/configure/app/output/filename.md +1 -1
  56. package/en/docusaurus-plugin-content-docs/current/configure/app/output/legal-comments.md +1 -1
  57. package/en/docusaurus-plugin-content-docs/current/configure/app/output/override-browserslist.md +1 -1
  58. package/en/docusaurus-plugin-content-docs/current/configure/app/output/polyfill.md +1 -1
  59. package/en/docusaurus-plugin-content-docs/current/configure/app/output/svg-default-export.md +1 -1
  60. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/build-cache.md +1 -1
  61. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/bundle-analyze.md +1 -1
  62. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/chunk-split.md +1 -1
  63. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/print-file-size.md +1 -1
  64. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/profile.md +1 -1
  65. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-console.md +1 -1
  66. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-moment-locale.md +1 -1
  67. package/en/docusaurus-plugin-content-docs/current/configure/app/plugins.md +1 -1
  68. package/en/docusaurus-plugin-content-docs/current/configure/app/security/sri.md +1 -1
  69. package/en/docusaurus-plugin-content-docs/current/configure/app/server/routes.md +2 -4
  70. package/en/docusaurus-plugin-content-docs/current/configure/app/source/alias.md +1 -1
  71. package/en/docusaurus-plugin-content-docs/current/configure/app/source/compile-js-data-uri.md +1 -1
  72. package/en/docusaurus-plugin-content-docs/current/configure/app/source/define.md +1 -1
  73. package/en/docusaurus-plugin-content-docs/current/configure/app/source/exclude.md +1 -1
  74. package/en/docusaurus-plugin-content-docs/current/configure/app/source/global-vars.md +1 -1
  75. package/en/docusaurus-plugin-content-docs/current/configure/app/source/include.md +1 -1
  76. package/en/docusaurus-plugin-content-docs/current/configure/app/source/module-scopes.md +1 -1
  77. package/en/docusaurus-plugin-content-docs/current/configure/app/source/pre-entry.md +1 -1
  78. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-extension-prefix.md +1 -1
  79. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-main-fields.md +1 -1
  80. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/autoprefixer.md +1 -1
  81. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/babel.md +1 -1
  82. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-extract.md +1 -1
  83. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-loader.md +1 -1
  84. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/dev-server.md +1 -1
  85. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/esbuild.md +16 -39
  86. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/html-plugin.md +1 -1
  87. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/inspector.md +1 -1
  88. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/less.md +1 -1
  89. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/minify-css.md +1 -1
  90. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/postcss.md +1 -1
  91. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/pug.md +1 -1
  92. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/sass.md +1 -1
  93. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/style-loader.md +1 -1
  94. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/styled-components.md +1 -1
  95. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/swc.md +42 -0
  96. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/terser.md +1 -1
  97. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-checker.md +1 -1
  98. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-loader.md +1 -1
  99. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack-chain.md +1 -1
  100. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack.md +1 -1
  101. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/builder.md +46 -0
  102. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-in-js.md +38 -0
  103. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-modules.md +86 -0
  104. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/less-sass.md +17 -0
  105. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/postcss.md +81 -0
  106. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/tailwindcss.md +95 -0
  107. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/data-fetch.md +66 -0
  108. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/routes.md +270 -0
  109. package/en/docusaurus-plugin-content-docs/current/guides/concept/entries.md +116 -0
  110. package/en/docusaurus-plugin-content-docs/current/guides/concept/lifecycle.md +15 -0
  111. package/en/docusaurus-plugin-content-docs/current/guides/get-started/quick-start.md +162 -0
  112. package/en/docusaurus-plugin-content-docs/current/guides/get-started/upgrade.md +78 -0
  113. package/{zh/tutorials/first-app → en/docusaurus-plugin-content-docs/current/guides}/overview.md +4 -4
  114. package/en/docusaurus-plugin-content-docs/current/tutorials/foundations/introduction.md +1 -1
  115. package/en/docusaurus-plugin-content-docs/current.json +29 -29
  116. package/package.json +3 -3
  117. package/scripts/config.ts +2 -2
  118. package/zh/apis/app/commands/inspect.md +0 -4
  119. package/zh/apis/app/commands/new.md +1 -3
  120. package/zh/apis/app/hooks/src/index_.md +6 -5
  121. package/zh/apis/app/runtime/app/_category_.json +1 -1
  122. package/zh/apis/app/runtime/bff/_category_.json +1 -1
  123. package/zh/apis/app/runtime/core/_category_.json +1 -1
  124. package/zh/apis/app/runtime/core/bootstrap.md +17 -3
  125. package/zh/apis/app/runtime/model/_category_.json +1 -1
  126. package/zh/apis/app/runtime/model/create-app.md +1 -1
  127. package/zh/apis/app/runtime/model/use-store.md +1 -23
  128. package/zh/apis/app/runtime/router/_category_.json +1 -1
  129. package/zh/apis/app/runtime/ssr/_category_.json +1 -1
  130. package/zh/apis/app/runtime/testing/_category_.json +1 -1
  131. package/zh/apis/app/runtime/utility/_category_.json +1 -1
  132. package/zh/apis/app/runtime/web-server/_category_.json +1 -1
  133. package/zh/components/debug-app.md +18 -0
  134. package/zh/components/global-proxy.md +28 -0
  135. package/zh/components/init-app.md +44 -0
  136. package/zh/components/prerequisites.md +19 -0
  137. package/zh/components/reduck-migration.md +1 -0
  138. package/zh/configure/app/dev/asset-prefix.md +1 -1
  139. package/zh/configure/app/dev/hmr.md +1 -1
  140. package/zh/configure/app/dev/https.md +1 -1
  141. package/zh/configure/app/dev/port.md +1 -1
  142. package/zh/configure/app/dev/progress-bar.md +1 -1
  143. package/zh/configure/app/dev/start-url.md +1 -1
  144. package/zh/configure/app/experiments/_category_.json +4 -0
  145. package/zh/configure/app/experiments/lazy-compilation.md +1 -1
  146. package/zh/configure/app/html/_category_.json +4 -0
  147. package/zh/configure/app/html/app-icon.md +1 -1
  148. package/zh/configure/app/html/crossorigin.md +1 -1
  149. package/zh/configure/app/html/disable-html-folder.md +1 -1
  150. package/zh/configure/app/html/favicon-by-entries.md +1 -1
  151. package/zh/configure/app/html/favicon.md +1 -1
  152. package/zh/configure/app/html/inject-by-entries.md +1 -1
  153. package/zh/configure/app/html/inject.md +1 -1
  154. package/zh/configure/app/html/meta-by-entries.md +1 -1
  155. package/zh/configure/app/html/meta.md +1 -1
  156. package/zh/configure/app/html/mount-id.md +1 -1
  157. package/zh/configure/app/html/template-by-entries.md +1 -1
  158. package/zh/configure/app/html/template-parameters-by-entries.md +1 -1
  159. package/zh/configure/app/html/template-parameters.md +1 -1
  160. package/zh/configure/app/html/template.md +1 -1
  161. package/zh/configure/app/html/title-by-entries.md +1 -1
  162. package/zh/configure/app/html/title.md +1 -1
  163. package/zh/configure/app/output/asset-prefix.md +1 -1
  164. package/zh/configure/app/output/assets-retry.md +1 -1
  165. package/zh/configure/app/output/charset.md +1 -1
  166. package/zh/configure/app/output/clean-dist-path.md +1 -1
  167. package/zh/configure/app/output/convert-to-rem.md +1 -1
  168. package/zh/configure/app/output/copy.md +1 -1
  169. package/zh/configure/app/output/css-module-local-ident-name.md +1 -1
  170. package/zh/configure/app/output/data-uri-limit.md +1 -1
  171. package/zh/configure/app/output/disable-css-extract.md +1 -1
  172. package/zh/configure/app/output/disable-css-module-extension.md +1 -1
  173. package/zh/configure/app/output/disable-filename-hash.md +1 -1
  174. package/zh/configure/app/output/disable-inline-runtime-chunk.md +1 -1
  175. package/zh/configure/app/output/disable-minimize.md +1 -1
  176. package/zh/configure/app/output/disable-source-map.md +1 -1
  177. package/zh/configure/app/output/disable-ts-checker.md +1 -1
  178. package/zh/configure/app/output/dist-path.md +1 -1
  179. package/zh/configure/app/output/enable-asset-fallback.md +1 -1
  180. package/zh/configure/app/output/enable-asset-manifest.md +1 -1
  181. package/zh/configure/app/output/enable-css-module-tsdeclaration.md +1 -1
  182. package/zh/configure/app/output/enable-inline-scripts.md +1 -1
  183. package/zh/configure/app/output/enable-inline-styles.md +1 -1
  184. package/zh/configure/app/output/enable-latest-decorators.md +1 -1
  185. package/zh/configure/app/output/externals.md +1 -1
  186. package/zh/configure/app/output/filename.md +1 -1
  187. package/zh/configure/app/output/legal-comments.md +1 -1
  188. package/zh/configure/app/output/override-browserslist.md +1 -1
  189. package/zh/configure/app/output/polyfill.md +1 -1
  190. package/zh/configure/app/output/ssg.md +118 -114
  191. package/zh/configure/app/output/svg-default-export.md +1 -1
  192. package/zh/configure/app/performance/_category_.json +4 -0
  193. package/zh/configure/app/performance/build-cache.md +1 -1
  194. package/zh/configure/app/performance/bundle-analyze.md +1 -1
  195. package/zh/configure/app/performance/chunk-split.md +1 -1
  196. package/zh/configure/app/performance/print-file-size.md +1 -1
  197. package/zh/configure/app/performance/profile.md +1 -1
  198. package/zh/configure/app/performance/remove-console.md +1 -1
  199. package/zh/configure/app/performance/remove-moment-locale.md +1 -1
  200. package/zh/configure/app/plugins.md +1 -1
  201. package/zh/configure/app/runtime/state.md +13 -0
  202. package/zh/configure/app/security/_category_.json +4 -0
  203. package/zh/configure/app/security/sri.md +1 -1
  204. package/zh/configure/app/server/routes.md +2 -4
  205. package/zh/configure/app/server/ssr.md +0 -2
  206. package/zh/configure/app/source/alias.md +1 -1
  207. package/zh/configure/app/source/compile-js-data-uri.md +1 -1
  208. package/zh/configure/app/source/define.md +1 -1
  209. package/zh/configure/app/source/exclude.md +1 -1
  210. package/zh/configure/app/source/global-vars.md +1 -1
  211. package/zh/configure/app/source/include.md +1 -1
  212. package/zh/configure/app/source/module-scopes.md +1 -1
  213. package/zh/configure/app/source/pre-entry.md +1 -1
  214. package/zh/configure/app/source/resolve-extension-prefix.md +1 -1
  215. package/zh/configure/app/source/resolve-main-fields.md +1 -1
  216. package/zh/configure/app/tools/autoprefixer.md +1 -1
  217. package/zh/configure/app/tools/babel.md +1 -1
  218. package/zh/configure/app/tools/css-extract.md +1 -1
  219. package/zh/configure/app/tools/css-loader.md +1 -1
  220. package/zh/configure/app/tools/dev-server.md +1 -1
  221. package/zh/configure/app/tools/esbuild.md +16 -39
  222. package/zh/configure/app/tools/html-plugin.md +1 -1
  223. package/zh/configure/app/tools/inspector.md +1 -1
  224. package/zh/configure/app/tools/less.md +1 -1
  225. package/zh/configure/app/tools/minify-css.md +1 -1
  226. package/zh/configure/app/tools/postcss.md +1 -1
  227. package/zh/configure/app/tools/pug.md +1 -1
  228. package/zh/configure/app/tools/sass.md +1 -1
  229. package/zh/configure/app/tools/style-loader.md +1 -1
  230. package/zh/configure/app/tools/styled-components.md +1 -1
  231. package/zh/configure/app/tools/swc.md +42 -0
  232. package/zh/configure/app/tools/terser.md +1 -1
  233. package/zh/configure/app/tools/ts-checker.md +1 -1
  234. package/zh/configure/app/tools/ts-loader.md +1 -1
  235. package/zh/configure/app/tools/webpack-chain.md +1 -1
  236. package/zh/configure/app/tools/webpack.md +1 -1
  237. package/zh/guides/advanced-features/bff/bff-proxy.md +1 -1
  238. package/zh/guides/advanced-features/compatibility.md +2 -38
  239. package/zh/guides/advanced-features/custom-app.md +23 -19
  240. package/zh/guides/advanced-features/ssg.md +73 -62
  241. package/zh/guides/advanced-features/ssr.md +142 -36
  242. package/zh/guides/advanced-features/testing.md +33 -1
  243. package/zh/guides/advanced-features/web-server.md +2 -2
  244. package/zh/guides/basic-features/builder.md +46 -0
  245. package/zh/guides/basic-features/css/_category_.json +1 -1
  246. package/zh/guides/basic-features/css/less-sass.md +1 -14
  247. package/zh/guides/basic-features/css/tailwindcss.md +2 -6
  248. package/zh/guides/basic-features/data-fetch.md +1 -1
  249. package/zh/guides/basic-features/env-vars.md +34 -0
  250. package/zh/guides/basic-features/html.md +182 -0
  251. package/zh/guides/basic-features/mock.md +3 -9
  252. package/zh/guides/basic-features/proxy.md +2 -27
  253. package/zh/guides/basic-features/routes.md +32 -35
  254. package/zh/guides/concept/entries.md +8 -9
  255. package/zh/guides/get-started/quick-start.md +6 -78
  256. package/zh/guides/get-started/upgrade.md +8 -8
  257. package/zh/guides/topic-detail/framework-plugin/extend.md +3 -4
  258. package/zh/{apis/app/runtime/plugin/hook-api.md → guides/topic-detail/framework-plugin/hook-list.md} +42 -135
  259. package/zh/{apis/app/runtime/plugin → guides/topic-detail/framework-plugin}/hook.md +2 -3
  260. package/zh/guides/topic-detail/framework-plugin/implement.md +21 -10
  261. package/zh/guides/topic-detail/framework-plugin/introduction.md +49 -0
  262. package/{en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin → zh/guides/topic-detail/framework-plugin}/plugin-api.md +3 -4
  263. package/zh/guides/topic-detail/framework-plugin/relationship.md +2 -3
  264. package/zh/guides/topic-detail/model/quick-start.md +5 -1
  265. package/zh/guides/topic-detail/model/test-model.md +2 -2
  266. package/zh/guides/topic-detail/monorepo/intro.md +1 -1
  267. package/zh/guides/troubleshooting/dependencies.md +0 -69
  268. package/zh/tutorials/first-app/_category_.json +1 -1
  269. package/zh/tutorials/first-app/c01-start.md +94 -0
  270. package/zh/tutorials/first-app/c02-component.md +56 -0
  271. package/zh/tutorials/first-app/c03-css.md +305 -0
  272. package/zh/tutorials/first-app/c04-routes.md +169 -0
  273. package/zh/tutorials/first-app/c05-loader.md +82 -0
  274. package/zh/tutorials/first-app/c06-model.md +256 -0
  275. package/zh/tutorials/first-app/c07-container.md +268 -0
  276. package/zh/tutorials/first-app/c08-entries.md +134 -0
  277. package/zh/tutorials/foundations/introduction.md +2 -2
  278. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/default-alias.md +0 -25
  279. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/_category_.json +0 -4
  280. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/abstract.md +0 -26
  281. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/hook-api.md +0 -896
  282. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/plugin/hook.md +0 -170
  283. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-modern-mode.md +0 -34
  284. package/zh/apis/app/runtime/default-alias.md +0 -23
  285. package/zh/apis/app/runtime/plugin/_category_.json +0 -4
  286. package/zh/apis/app/runtime/plugin/abstract.md +0 -26
  287. package/zh/apis/app/runtime/plugin/plugin-api.md +0 -117
  288. package/zh/apis/generator/overview.md +0 -32
  289. package/zh/configure/app/output/enable-modern-mode.md +0 -34
  290. package/zh/guides/basic-features/image.md +0 -43
  291. package/zh/guides/topic-detail/compile-speed.md +0 -182
  292. package/zh/guides/topic-detail/framework-plugin/abstract.md +0 -27
  293. package/zh/guides/topic-detail/monorepo/deploy.md +0 -43
  294. package/zh/guides/troubleshooting/compile.md +0 -379
  295. package/zh/tutorials/first-app/c01-getting-started/1.1-prerequisites.md +0 -25
  296. package/zh/tutorials/first-app/c01-getting-started/1.2-minimal-mwa.md +0 -118
  297. package/zh/tutorials/first-app/c01-getting-started/1.3-dev-command.md +0 -29
  298. package/zh/tutorials/first-app/c01-getting-started/1.4-enable-ssr.md +0 -44
  299. package/zh/tutorials/first-app/c01-getting-started/1.5-start-command.md +0 -18
  300. package/zh/tutorials/first-app/c01-getting-started/1.6-create-repo.md +0 -31
  301. package/zh/tutorials/first-app/c01-getting-started/_category_.json +0 -3
  302. package/zh/tutorials/first-app/c02-generator-and-studio/2.1-generator.md +0 -79
  303. package/zh/tutorials/first-app/c02-generator-and-studio/2.2-boilerplates.md +0 -36
  304. package/zh/tutorials/first-app/c02-generator-and-studio/2.3-configuration.md +0 -21
  305. package/zh/tutorials/first-app/c02-generator-and-studio/_category_.json +0 -3
  306. package/zh/tutorials/first-app/c03-ide/3.1-setting-up.md +0 -55
  307. package/zh/tutorials/first-app/c03-ide/3.2-hints-in-ide.md +0 -66
  308. package/zh/tutorials/first-app/c03-ide/3.3-autofix-in-ide.md +0 -11
  309. package/zh/tutorials/first-app/c03-ide/3.4-autofix-in-cli.md +0 -63
  310. package/zh/tutorials/first-app/c03-ide/_category_.json +0 -3
  311. package/zh/tutorials/first-app/c04-es6-plus-and-ts/4.1-use-es6-plus.md +0 -67
  312. package/zh/tutorials/first-app/c04-es6-plus-and-ts/4.2-use-typescript.md +0 -111
  313. package/zh/tutorials/first-app/c04-es6-plus-and-ts/4.3-compatibility.md +0 -67
  314. package/zh/tutorials/first-app/c04-es6-plus-and-ts/_category_.json +0 -3
  315. package/zh/tutorials/first-app/c05-component/5.1-use-ui-library.md +0 -68
  316. package/zh/tutorials/first-app/c05-component/5.2-use-standalone-component.md +0 -92
  317. package/zh/tutorials/first-app/c05-component/_category_.json +0 -3
  318. package/zh/tutorials/first-app/c06-css-and-component/6.1-css-in-js.md +0 -110
  319. package/zh/tutorials/first-app/c06-css-and-component/6.2-utility-class.md +0 -148
  320. package/zh/tutorials/first-app/c06-css-and-component/6.3-postcss.md +0 -84
  321. package/zh/tutorials/first-app/c06-css-and-component/6.4-design-system.md +0 -83
  322. package/zh/tutorials/first-app/c06-css-and-component/6.5-storybook.md +0 -77
  323. package/zh/tutorials/first-app/c06-css-and-component/6.6-testing.md +0 -113
  324. package/zh/tutorials/first-app/c06-css-and-component/_category_.json +0 -3
  325. package/zh/tutorials/first-app/c07-app-entry/7.1-intro.md +0 -64
  326. package/zh/tutorials/first-app/c07-app-entry/7.2-add-entry-in-cli.md +0 -100
  327. package/zh/tutorials/first-app/c07-app-entry/7.3-manage-entries-by-hand.md +0 -74
  328. package/zh/tutorials/first-app/c07-app-entry/_category_.json +0 -3
  329. package/zh/tutorials/first-app/c08-client-side-routing/8.1-code-based-routing.md +0 -153
  330. package/zh/tutorials/first-app/c08-client-side-routing/8.2-file-based-routing.md +0 -310
  331. package/zh/tutorials/first-app/c08-client-side-routing/_category_.json +0 -3
  332. package/zh/tutorials/first-app/c09-bff/9.1-serverless.md +0 -30
  333. package/zh/tutorials/first-app/c09-bff/9.2-enable-bff.md +0 -93
  334. package/zh/tutorials/first-app/c09-bff/9.3-fetch-bff.md +0 -205
  335. package/zh/tutorials/first-app/c09-bff/_category_.json +0 -3
  336. package/zh/tutorials/first-app/c10-model/10.1-application-architecture.md +0 -23
  337. package/zh/tutorials/first-app/c10-model/10.2-add-model.md +0 -185
  338. package/zh/tutorials/first-app/c10-model/10.3-use-model.md +0 -54
  339. package/zh/tutorials/first-app/c10-model/10.4-testing.md +0 -69
  340. package/zh/tutorials/first-app/c10-model/_category_.json +0 -3
  341. package/zh/tutorials/first-app/c11-container/11.1-use-model-with-app-state.md +0 -274
  342. package/zh/tutorials/first-app/c11-container/11.2-add-container.md +0 -106
  343. package/zh/tutorials/first-app/c11-container/11.3-use-loader.md +0 -61
  344. package/zh/tutorials/first-app/c11-container/11.4-testing.md +0 -56
  345. package/zh/tutorials/first-app/c11-container/_category_.json +0 -3
@@ -4,7 +4,7 @@ sidebar_label: enableInlineScripts
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.enableInlineScripts](https://modernjs.dev/builder/zh/api/config-output.html#output-enableinlinescripts)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.enableInlineScripts](https://modernjs.dev/builder/zh/api/config-output.html#output-enableinlinescripts)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/enableInlineScripts.md'
@@ -4,7 +4,7 @@ sidebar_label: enableInlineStyles
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.enableInlineStyles](https://modernjs.dev/builder/zh/api/config-output.html#output-enableinlinestyles)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.enableInlineStyles](https://modernjs.dev/builder/zh/api/config-output.html#output-enableinlinestyles)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/enableInlineStyles.md'
@@ -4,7 +4,7 @@ sidebar_label: enableLatestDecorators
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.enableLatestDecorators](https://modernjs.dev/builder/zh/api/config-output.html#output-enablelatestdecorators)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.enableLatestDecorators](https://modernjs.dev/builder/zh/api/config-output.html#output-enablelatestdecorators)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/enableLatestDecorators.md'
@@ -4,7 +4,7 @@ sidebar_label: externals
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.externals](https://modernjs.dev/builder/zh/api/config-output.html#output-externals)。
7
+ This configuration is Modern.js Builder configuration, more detail can see [output.externals](https://modernjs.dev/builder/zh/api/config-output.html#output-externals)。
8
8
  :::
9
9
 
10
10
  import Main from '@modern-js/builder-doc/en/config/output/externals.md'
@@ -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'
@@ -52,16 +52,14 @@ After executing the `dev` command, you can see in `dist/route.json` that there a
52
52
  "entryName": "page-a",
53
53
  "entryPath": "html/page-a/index.html",
54
54
  "isSPA": true,
55
- "isSSR": false,
56
- "enableModernMode": false
55
+ "isSSR": false
57
56
  },
58
57
  {
59
58
  "urlPath": "/b",
60
59
  "entryName": "page-a",
61
60
  "entryPath": "html/page-a/index.html",
62
61
  "isSPA": true,
63
- "isSSR": false,
64
- "enableModernMode": false
62
+ "isSSR": false
65
63
  },
66
64
  ]
67
65
  }
@@ -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'
@@ -3,59 +3,36 @@ title: tools.esbuild
3
3
  sidebar_label: esbuild
4
4
  ---
5
5
 
6
- * Type: `Object`
7
- * Default: `undefined`
6
+ - Type: `Object`
7
+ - Default: `undefined`
8
8
 
9
9
  ## Introduction
10
10
 
11
- Esbuild is a JavaScript Bundler/Minifier written in Go language, which is characterized by extremely fast speed. In terms of code compression, esbuild has dozens of times the performance improvement compared to webpack's built-in terser compressor.
12
-
13
- Modern.js provides the ability to compile and compress code based on esbuild. After opening it in a large project, ** can greatly reduce the time required for code compression, while effectively avoiding OOM (heap out of memory) problems **.
14
-
15
- Although the use of esbuild compression has brought about an improvement in construction efficiency, the compression ratio of esbuild is lower than that of terser, so the size of the ** bundle will increase **, please use it according to the business situation (more suitable for middle and back-end scenarios).
16
-
17
- For a detailed comparison between compression tools, see [mining-benchmarks](https://github.com/privatenumber/minification-benchmarks).
18
-
19
- :::info
20
- In addition to code compression, esbuild can also replace babel for code compilation. The advantage is that it can improve the compilation speed, but the disadvantage is that it cannot use the rich babel plug-in capabilities.
11
+ :::tip About esbuild
12
+ [esbuild](https://esbuild.github.io/) is a front-end build tool based on Golang. It has the functions of bundling, compiling and minimizing JavaScript code. Compared with traditional tools, the performance is significantly improved. When minimizing code, compared to webpack's built-in terser minimizer, esbuild has dozens of times better performance.
21
13
  :::
22
14
 
23
- ## Configuration
24
-
25
- ### target
15
+ Modern.js provides esbuild plugin that allow you to use esbuild instead of babel-loader, ts-loader and terser for transformation and minification process.
26
16
 
27
- * Type: `string | string[]`
28
- * Default `'esnext'`
29
-
30
- Set the target environment for the generated JavaScript and CSS code.
31
-
32
- Can be set directly to the JavaScript language version, such as `es5`, `es6`, `es2020`. It can also be set to several target environments, each target environment is an environment name followed by a version number. For example: `['chrome58', 'edge16', 'firefox57']`.
33
-
34
- The following environments are supported:
17
+ ## Configuration
35
18
 
36
- - chrome
37
- - edge
38
- - firefox
39
- - ie
40
- - ios
41
- - node
42
- - opera
43
- - safari
19
+ You can set the esbuild compilation behavior through the `tools.esbuild` config.
44
20
 
45
- By default, ES6 code, such as template string, is introduced into the esbuild compression process. If you need to be ES5 compatible, you can set `target` to `es5`.
21
+ ```js title="modern.config.ts"
22
+ import { defineConfig } from '@modern-js/app-tools';
46
23
 
47
- ```typescript title="modern.config.ts"
48
24
  export default defineConfig({
49
25
  tools: {
50
26
  esbuild: {
51
- target: 'es5',
27
+ loader: {
28
+ target: 'chrome61',
29
+ },
30
+ minimize: {
31
+ target: 'chrome61',
32
+ },
52
33
  },
53
34
  },
54
35
  });
55
36
  ```
56
37
 
57
- :::info
58
- When setting `target` to `es5`, you need to ensure that all code is escaped to es5 code by babel, otherwise it will cause an esbuild compilation error: `Transforming 'xxx' to the configured target environment ("es5") is not supported yet`.
59
-
60
- A detailed description of the `target` field can be found in [esbuild-target](https://esbuild.github.io/api/#target).
61
- :::
38
+ For config details, please refer to [Modern.js Builder - esbuild Plugin Configuration](https://modernjs.dev/builder/en/plugins/plugin-esbuild.html#config).
@@ -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'