@modern-js/main-doc 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (525) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/index.md +0 -5
  3. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/lint.md +1 -1
  4. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/serve.md +2 -4
  5. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/framework/lambda.md +12 -12
  6. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/api.md +13 -13
  7. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/app.md +0 -2
  8. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/common.md +1 -3
  9. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/app.md +16 -9
  10. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/index_.md +0 -1
  11. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/routes.md +5 -3
  12. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/server.md +6 -4
  13. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/stories.md +2 -2
  14. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/test.md +1 -1
  15. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/app/define-config.md +0 -1
  16. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/bff/hook.md +3 -3
  17. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/bootstrap.md +3 -6
  18. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/create-app.md +1 -3
  19. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-loader.md +2 -2
  20. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-module-apps.md +58 -51
  21. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-runtime-context.md +3 -4
  22. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/index.md +0 -5
  23. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/Provider.md +1 -1
  24. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/connect.md +8 -5
  25. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/create-store.md +1 -3
  26. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/handle-effect.md +3 -3
  27. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/model_.md +0 -1
  28. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-model.md +0 -3
  29. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-store.md +0 -2
  30. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/router/router.md +23 -54
  31. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/ssr/no-ssr.md +1 -8
  32. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/ssr/pre-render.md +10 -6
  33. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/testing/render.md +0 -2
  34. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/css-in-js.md +2 -2
  35. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/head.md +3 -5
  36. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/loadable.md +14 -15
  37. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/web-server/hook.md +4 -5
  38. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/web-server/middleware.md +7 -6
  39. package/en/docusaurus-plugin-content-docs/current/components/command-tip.md +3 -2
  40. package/en/docusaurus-plugin-content-docs/current/components/debug-app.md +17 -0
  41. package/en/docusaurus-plugin-content-docs/current/components/enable-bff.md +10 -14
  42. package/en/docusaurus-plugin-content-docs/current/components/enable-micro-frontend.md +4 -4
  43. package/en/docusaurus-plugin-content-docs/current/components/global-proxy-config.md +6 -9
  44. package/en/docusaurus-plugin-content-docs/current/components/global-proxy.md +0 -1
  45. package/en/docusaurus-plugin-content-docs/current/components/micro-master-manifest-config.md +2 -2
  46. package/en/docusaurus-plugin-content-docs/current/components/micro-runtime-config.md +1 -1
  47. package/en/docusaurus-plugin-content-docs/current/components/prerequisites.md +19 -0
  48. package/en/docusaurus-plugin-content-docs/current/components/reduck-migration.md +0 -1
  49. package/en/docusaurus-plugin-content-docs/current/components/reduck-tip.md +1 -1
  50. package/en/docusaurus-plugin-content-docs/current/components/router-legacy-tip.md +0 -1
  51. package/en/docusaurus-plugin-content-docs/current/configure/app/auto-load-plugin.md +8 -9
  52. package/en/docusaurus-plugin-content-docs/current/configure/app/bff/prefix.md +6 -6
  53. package/en/docusaurus-plugin-content-docs/current/configure/app/bff/proxy.md +8 -9
  54. package/en/docusaurus-plugin-content-docs/current/configure/app/builder-plugins.md +6 -6
  55. package/en/docusaurus-plugin-content-docs/current/configure/app/deploy/microFrontend.md +11 -13
  56. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/asset-prefix.md +2 -2
  57. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/hmr.md +2 -2
  58. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/https.md +2 -2
  59. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/port.md +2 -2
  60. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/progress-bar.md +2 -2
  61. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/proxy.md +0 -1
  62. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/start-url.md +2 -2
  63. package/en/docusaurus-plugin-content-docs/current/configure/app/experiments/lazy-compilation.md +2 -2
  64. package/en/docusaurus-plugin-content-docs/current/configure/app/html/app-icon.md +2 -2
  65. package/en/docusaurus-plugin-content-docs/current/configure/app/html/crossorigin.md +2 -2
  66. package/en/docusaurus-plugin-content-docs/current/configure/app/html/disable-html-folder.md +2 -2
  67. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon-by-entries.md +2 -2
  68. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon.md +2 -2
  69. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject-by-entries.md +2 -2
  70. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject.md +2 -2
  71. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta-by-entries.md +2 -2
  72. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta.md +2 -2
  73. package/en/docusaurus-plugin-content-docs/current/configure/app/html/mount-id.md +2 -2
  74. package/en/docusaurus-plugin-content-docs/current/configure/app/html/tags-by-entries.md +12 -0
  75. package/en/docusaurus-plugin-content-docs/current/configure/app/html/tags.md +12 -0
  76. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-by-entries.md +2 -2
  77. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters-by-entries.md +2 -2
  78. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters.md +2 -2
  79. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template.md +2 -2
  80. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title-by-entries.md +2 -2
  81. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title.md +2 -2
  82. package/en/docusaurus-plugin-content-docs/current/configure/app/output/asset-prefix.md +2 -2
  83. package/en/docusaurus-plugin-content-docs/current/configure/app/output/assets-retry.md +2 -2
  84. package/en/docusaurus-plugin-content-docs/current/configure/app/output/charset.md +2 -2
  85. package/en/docusaurus-plugin-content-docs/current/configure/app/output/clean-dist-path.md +2 -2
  86. package/en/docusaurus-plugin-content-docs/current/configure/app/output/convert-to-rem.md +2 -2
  87. package/en/docusaurus-plugin-content-docs/current/configure/app/output/copy.md +2 -2
  88. package/en/docusaurus-plugin-content-docs/current/configure/app/output/css-module-local-ident-name.md +2 -2
  89. package/en/docusaurus-plugin-content-docs/current/configure/app/output/data-uri-limit.md +2 -2
  90. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-extract.md +2 -2
  91. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-module-extension.md +2 -2
  92. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-filename-hash.md +2 -2
  93. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-inline-runtime-chunk.md +2 -2
  94. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-minimize.md +2 -2
  95. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-node-polyfill.md +8 -6
  96. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-source-map.md +2 -2
  97. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-ts-checker.md +2 -2
  98. package/en/docusaurus-plugin-content-docs/current/configure/app/output/dist-path.md +2 -2
  99. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-fallback.md +2 -2
  100. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-manifest.md +2 -2
  101. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-css-module-tsdeclaration.md +2 -2
  102. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-scripts.md +2 -2
  103. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-styles.md +2 -2
  104. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-latest-decorators.md +2 -2
  105. package/en/docusaurus-plugin-content-docs/current/configure/app/output/externals.md +2 -2
  106. package/en/docusaurus-plugin-content-docs/current/configure/app/output/filename.md +2 -2
  107. package/en/docusaurus-plugin-content-docs/current/configure/app/output/legal-comments.md +2 -2
  108. package/en/docusaurus-plugin-content-docs/current/configure/app/output/override-browserslist.md +2 -2
  109. package/en/docusaurus-plugin-content-docs/current/configure/app/output/polyfill.md +2 -2
  110. package/en/docusaurus-plugin-content-docs/current/configure/app/output/ssg.md +3 -2
  111. package/en/docusaurus-plugin-content-docs/current/configure/app/output/svg-default-export.md +2 -2
  112. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/build-cache.md +2 -2
  113. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/bundle-analyze.md +2 -2
  114. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/chunk-split.md +2 -2
  115. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/print-file-size.md +2 -2
  116. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/profile.md +2 -2
  117. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-console.md +2 -2
  118. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-moment-locale.md +2 -2
  119. package/en/docusaurus-plugin-content-docs/current/configure/app/plugins.md +6 -6
  120. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/intro.md +11 -10
  121. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/master-app.md +1 -2
  122. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/router.md +7 -7
  123. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/state.md +15 -15
  124. package/en/docusaurus-plugin-content-docs/current/configure/app/security/sri.md +2 -2
  125. package/en/docusaurus-plugin-content-docs/current/configure/app/server/base-url.md +3 -4
  126. package/en/docusaurus-plugin-content-docs/current/configure/app/server/enable-framework-ext.md +5 -4
  127. package/en/docusaurus-plugin-content-docs/current/configure/app/server/port.md +24 -4
  128. package/en/docusaurus-plugin-content-docs/current/configure/app/server/public-routes.md +6 -6
  129. package/en/docusaurus-plugin-content-docs/current/configure/app/server/routes.md +7 -7
  130. package/en/docusaurus-plugin-content-docs/current/configure/app/server/ssr-by-entries.md +5 -5
  131. package/en/docusaurus-plugin-content-docs/current/configure/app/server/ssr.md +4 -4
  132. package/en/docusaurus-plugin-content-docs/current/configure/app/source/alias.md +2 -2
  133. package/en/docusaurus-plugin-content-docs/current/configure/app/source/compile-js-data-uri.md +2 -2
  134. package/en/docusaurus-plugin-content-docs/current/configure/app/source/config-dir.md +2 -2
  135. package/en/docusaurus-plugin-content-docs/current/configure/app/source/define.md +2 -2
  136. package/en/docusaurus-plugin-content-docs/current/configure/app/source/design-system.md +656 -634
  137. package/en/docusaurus-plugin-content-docs/current/configure/app/source/disable-default-entries.md +1 -1
  138. package/en/docusaurus-plugin-content-docs/current/configure/app/source/disable-entry-dirs.md +8 -8
  139. package/en/docusaurus-plugin-content-docs/current/configure/app/source/enable-async-entry.md +1 -1
  140. package/en/docusaurus-plugin-content-docs/current/configure/app/source/entries-dir.md +7 -7
  141. package/en/docusaurus-plugin-content-docs/current/configure/app/source/entries.md +4 -6
  142. package/en/docusaurus-plugin-content-docs/current/configure/app/source/exclude.md +2 -2
  143. package/en/docusaurus-plugin-content-docs/current/configure/app/source/global-vars.md +2 -2
  144. package/en/docusaurus-plugin-content-docs/current/configure/app/source/include.md +2 -2
  145. package/en/docusaurus-plugin-content-docs/current/configure/app/source/module-scopes.md +2 -2
  146. package/en/docusaurus-plugin-content-docs/current/configure/app/source/pre-entry.md +2 -2
  147. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-extension-prefix.md +2 -2
  148. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-main-fields.md +2 -2
  149. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/autoprefixer.md +2 -2
  150. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/babel.md +2 -2
  151. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-extract.md +2 -2
  152. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-loader.md +2 -2
  153. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/dev-server.md +2 -2
  154. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/html-plugin.md +2 -2
  155. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/inspector.md +2 -2
  156. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/jest.md +9 -9
  157. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/less.md +2 -2
  158. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/minify-css.md +2 -2
  159. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/postcss.md +2 -2
  160. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/pug.md +2 -2
  161. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/sass.md +2 -2
  162. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/style-loader.md +2 -2
  163. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/styled-components.md +2 -2
  164. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/swc.md +12 -1
  165. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/terser.md +2 -2
  166. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-checker.md +2 -2
  167. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-loader.md +2 -2
  168. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack-chain.md +2 -2
  169. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack.md +2 -2
  170. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/frameworks.md +6 -6
  171. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/function.md +44 -38
  172. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/index.md +9 -9
  173. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/type.md +0 -1
  174. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/code-split.md +3 -4
  175. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/compatibility.md +6 -7
  176. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/eslint.md +0 -1
  177. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/index.md +0 -5
  178. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/low-level.md +17 -19
  179. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssg.md +8 -10
  180. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssr.md +5 -11
  181. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/testing.md +3 -3
  182. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/web-server.md +3 -4
  183. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/alias.md +7 -11
  184. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-in-js.md +6 -6
  185. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-modules.md +2 -2
  186. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/less-sass.md +1 -2
  187. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/postcss.md +43 -47
  188. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/tailwindcss.md +3 -3
  189. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/data-fetch.md +106 -192
  190. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/env-vars.md +8 -8
  191. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/html.md +55 -47
  192. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/mock.md +4 -4
  193. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/proxy.md +4 -5
  194. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/routes.md +90 -9
  195. package/en/docusaurus-plugin-content-docs/current/guides/concept/entries.md +1 -2
  196. package/en/docusaurus-plugin-content-docs/current/guides/get-started/quick-start.md +2 -2
  197. package/en/docusaurus-plugin-content-docs/current/guides/get-started/upgrade.md +1 -1
  198. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/extend.md +13 -13
  199. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook-list.md +2 -2
  200. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook.md +57 -54
  201. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/implement.md +11 -11
  202. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/lifecycle.md +0 -1
  203. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/plugin-api.md +4 -4
  204. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/app.md +33 -33
  205. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/ejs.md +3 -3
  206. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/fs.md +3 -3
  207. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/git.md +3 -2
  208. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/handlebars.md +3 -4
  209. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/json.md +9 -12
  210. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/npm.md +2 -3
  211. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/introduce.md +4 -3
  212. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/run-in-js.md +4 -5
  213. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/structure.md +13 -11
  214. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/common.md +18 -27
  215. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/abstract.md +1 -4
  216. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/introduce.md +1 -1
  217. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/updateJSONFile.md +4 -5
  218. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/hook/onForged.md +0 -1
  219. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/addInputAfter.md +1 -4
  220. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/addInputBefore.md +1 -3
  221. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/setInput.md +1 -1
  222. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/type.md +1 -1
  223. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/introduce.md +8 -9
  224. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/develop.md +11 -12
  225. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/use.md +8 -8
  226. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/project.md +1 -2
  227. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c01-introduction.md +7 -8
  228. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c02-development.md +18 -21
  229. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c03-main-app.md +41 -44
  230. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c04-communicate.md +7 -5
  231. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c05-mixed-stack.md +1 -1
  232. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/auto-actions.md +0 -1
  233. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/computed-state.md +0 -2
  234. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/define-model.md +3 -6
  235. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/faq.md +2 -5
  236. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/manage-effects.md +2 -5
  237. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/model-communicate.md +1 -4
  238. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/performance.md +1 -5
  239. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/quick-start.md +0 -6
  240. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/redux-integration.md +3 -2
  241. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/test-model.md +1 -1
  242. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/typescript-best-practice.md +13 -14
  243. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/use-model.md +14 -12
  244. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/use-out-of-modernjs.md +4 -6
  245. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c01-start.md +19 -19
  246. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c02-component.md +11 -11
  247. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c03-css.md +52 -55
  248. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c04-routes.md +23 -23
  249. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c05-loader.md +12 -11
  250. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c06-model.md +28 -28
  251. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c07-container.md +25 -26
  252. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c08-entries.md +36 -38
  253. package/en/docusaurus-plugin-content-docs/current.json +3 -47
  254. package/package.json +3 -3
  255. package/scripts/config.ts +4 -2
  256. package/scripts/summary.en.json +1 -1
  257. package/scripts/summary.zh.json +1 -1
  258. package/scripts/sync.ts +1 -1
  259. package/zh/apis/app/commands/index.md +0 -5
  260. package/zh/apis/app/commands/lint.md +1 -1
  261. package/zh/apis/app/commands/serve.md +2 -4
  262. package/zh/apis/app/hooks/api/framework/lambda.md +12 -12
  263. package/zh/apis/app/hooks/api/functions/api.md +13 -13
  264. package/zh/apis/app/hooks/api/functions/app.md +0 -2
  265. package/zh/apis/app/hooks/api/functions/common.md +1 -1
  266. package/zh/apis/app/hooks/index.md +0 -5
  267. package/zh/apis/app/hooks/shared.md +0 -1
  268. package/zh/apis/app/hooks/src/app.md +16 -9
  269. package/zh/apis/app/hooks/src/index_.md +0 -2
  270. package/zh/apis/app/hooks/src/routes.md +6 -7
  271. package/zh/apis/app/hooks/src/server.md +6 -4
  272. package/zh/apis/app/hooks/src/stories.md +1 -1
  273. package/zh/apis/app/hooks/src/test.md +1 -1
  274. package/zh/apis/app/runtime/app/define-config.md +1 -2
  275. package/zh/apis/app/runtime/bff/hook.md +3 -3
  276. package/zh/apis/app/runtime/core/bootstrap.md +2 -3
  277. package/zh/apis/app/runtime/core/use-loader.md +2 -2
  278. package/zh/apis/app/runtime/core/use-module-apps.md +53 -50
  279. package/zh/apis/app/runtime/core/use-runtime-context.md +3 -4
  280. package/zh/apis/app/runtime/index.md +0 -5
  281. package/zh/apis/app/runtime/model/Provider.md +1 -0
  282. package/zh/apis/app/runtime/model/auto-actions.md +1 -1
  283. package/zh/apis/app/runtime/model/connect.md +9 -5
  284. package/zh/apis/app/runtime/model/create-app.md +3 -3
  285. package/zh/apis/app/runtime/model/create-store.md +2 -4
  286. package/zh/apis/app/runtime/model/handle-effect.md +3 -4
  287. package/zh/apis/app/runtime/model/model_.md +0 -3
  288. package/zh/apis/app/runtime/model/use-local-model.md +0 -1
  289. package/zh/apis/app/runtime/model/use-store.md +0 -2
  290. package/zh/apis/app/runtime/router/router.md +23 -53
  291. package/zh/apis/app/runtime/ssr/no-ssr.md +1 -5
  292. package/zh/apis/app/runtime/ssr/pre-render.md +10 -6
  293. package/zh/apis/app/runtime/testing/cleanup.md +2 -2
  294. package/zh/apis/app/runtime/testing/render.md +0 -2
  295. package/zh/apis/app/runtime/utility/css-in-js.md +2 -2
  296. package/zh/apis/app/runtime/utility/head.md +3 -5
  297. package/zh/apis/app/runtime/utility/loadable.md +14 -15
  298. package/zh/apis/app/runtime/web-server/hook.md +5 -4
  299. package/zh/apis/app/runtime/web-server/middleware.md +8 -6
  300. package/zh/apis/monorepo/commands/bump.md +1 -1
  301. package/zh/apis/monorepo/commands/change.md +3 -2
  302. package/zh/apis/monorepo/commands/gen-release-note.md +1 -2
  303. package/zh/apis/monorepo/commands/index.md +1 -6
  304. package/zh/apis/monorepo/commands/lint.md +1 -1
  305. package/zh/apis/monorepo/commands/release.md +0 -1
  306. package/zh/apis/monorepo/hooks/index.md +1 -6
  307. package/zh/components/command-tip.md +3 -2
  308. package/zh/components/enable-bff.md +10 -14
  309. package/zh/components/enable-micro-frontend.md +4 -4
  310. package/zh/components/global-proxy-config.md +6 -9
  311. package/zh/components/global-proxy.md +0 -1
  312. package/zh/components/init-app.md +0 -1
  313. package/zh/components/micro-master-manifest-config.md +2 -2
  314. package/zh/components/micro-runtime-config.md +1 -1
  315. package/zh/components/reduck-migration.md +0 -1
  316. package/zh/components/router-legacy-tip.md +0 -1
  317. package/zh/configure/app/auto-load-plugin.md +9 -10
  318. package/zh/configure/app/bff/prefix.md +6 -10
  319. package/zh/configure/app/bff/proxy.md +9 -8
  320. package/zh/configure/app/builder-plugins.md +6 -6
  321. package/zh/configure/app/deploy/microFrontend.md +11 -11
  322. package/zh/configure/app/dev/asset-prefix.md +2 -2
  323. package/zh/configure/app/dev/hmr.md +2 -2
  324. package/zh/configure/app/dev/https.md +2 -2
  325. package/zh/configure/app/dev/port.md +2 -2
  326. package/zh/configure/app/dev/progress-bar.md +2 -2
  327. package/zh/configure/app/dev/proxy.md +0 -1
  328. package/zh/configure/app/dev/start-url.md +2 -2
  329. package/zh/configure/app/experiments/lazy-compilation.md +2 -2
  330. package/zh/configure/app/html/app-icon.md +2 -2
  331. package/zh/configure/app/html/crossorigin.md +2 -2
  332. package/zh/configure/app/html/disable-html-folder.md +2 -2
  333. package/zh/configure/app/html/favicon-by-entries.md +2 -2
  334. package/zh/configure/app/html/favicon.md +2 -2
  335. package/zh/configure/app/html/inject-by-entries.md +2 -2
  336. package/zh/configure/app/html/inject.md +2 -2
  337. package/zh/configure/app/html/meta-by-entries.md +2 -2
  338. package/zh/configure/app/html/meta.md +2 -2
  339. package/zh/configure/app/html/mount-id.md +2 -2
  340. package/zh/configure/app/html/tags-by-entries.md +12 -0
  341. package/zh/configure/app/html/tags.md +12 -0
  342. package/zh/configure/app/html/template-by-entries.md +2 -2
  343. package/zh/configure/app/html/template-parameters-by-entries.md +2 -2
  344. package/zh/configure/app/html/template-parameters.md +2 -2
  345. package/zh/configure/app/html/template.md +2 -2
  346. package/zh/configure/app/html/title-by-entries.md +2 -2
  347. package/zh/configure/app/html/title.md +2 -2
  348. package/zh/configure/app/output/asset-prefix.md +2 -2
  349. package/zh/configure/app/output/assets-retry.md +2 -2
  350. package/zh/configure/app/output/charset.md +2 -2
  351. package/zh/configure/app/output/clean-dist-path.md +2 -2
  352. package/zh/configure/app/output/convert-to-rem.md +2 -2
  353. package/zh/configure/app/output/copy.md +2 -2
  354. package/zh/configure/app/output/css-module-local-ident-name.md +2 -2
  355. package/zh/configure/app/output/data-uri-limit.md +2 -2
  356. package/zh/configure/app/output/disable-css-extract.md +2 -2
  357. package/zh/configure/app/output/disable-css-module-extension.md +2 -2
  358. package/zh/configure/app/output/disable-filename-hash.md +2 -2
  359. package/zh/configure/app/output/disable-inline-runtime-chunk.md +2 -2
  360. package/zh/configure/app/output/disable-minimize.md +2 -2
  361. package/zh/configure/app/output/disable-node-polyfill.md +8 -8
  362. package/zh/configure/app/output/disable-source-map.md +2 -2
  363. package/zh/configure/app/output/disable-ts-checker.md +2 -2
  364. package/zh/configure/app/output/dist-path.md +2 -2
  365. package/zh/configure/app/output/enable-asset-fallback.md +2 -2
  366. package/zh/configure/app/output/enable-asset-manifest.md +2 -2
  367. package/zh/configure/app/output/enable-css-module-tsdeclaration.md +2 -2
  368. package/zh/configure/app/output/enable-inline-scripts.md +2 -2
  369. package/zh/configure/app/output/enable-inline-styles.md +2 -2
  370. package/zh/configure/app/output/enable-latest-decorators.md +2 -2
  371. package/zh/configure/app/output/externals.md +2 -2
  372. package/zh/configure/app/output/filename.md +2 -2
  373. package/zh/configure/app/output/legal-comments.md +2 -2
  374. package/zh/configure/app/output/override-browserslist.md +2 -2
  375. package/zh/configure/app/output/polyfill.md +2 -2
  376. package/zh/configure/app/output/ssg.md +3 -2
  377. package/zh/configure/app/output/svg-default-export.md +2 -2
  378. package/zh/configure/app/performance/build-cache.md +2 -2
  379. package/zh/configure/app/performance/bundle-analyze.md +2 -2
  380. package/zh/configure/app/performance/chunk-split.md +2 -2
  381. package/zh/configure/app/performance/print-file-size.md +2 -2
  382. package/zh/configure/app/performance/profile.md +2 -2
  383. package/zh/configure/app/performance/remove-console.md +2 -2
  384. package/zh/configure/app/performance/remove-moment-locale.md +2 -2
  385. package/zh/configure/app/plugins.md +6 -6
  386. package/zh/configure/app/runtime/intro.md +39 -11
  387. package/zh/configure/app/runtime/master-app.md +1 -2
  388. package/zh/configure/app/runtime/router.md +6 -7
  389. package/zh/configure/app/runtime/state.md +15 -16
  390. package/zh/configure/app/security/sri.md +2 -2
  391. package/zh/configure/app/server/base-url.md +3 -6
  392. package/zh/configure/app/server/enable-framework-ext.md +5 -4
  393. package/zh/configure/app/server/port.md +24 -6
  394. package/zh/configure/app/server/public-routes.md +6 -8
  395. package/zh/configure/app/server/routes.md +6 -6
  396. package/zh/configure/app/server/ssr-by-entries.md +5 -8
  397. package/zh/configure/app/server/ssr.md +4 -5
  398. package/zh/configure/app/source/alias.md +2 -2
  399. package/zh/configure/app/source/compile-js-data-uri.md +2 -2
  400. package/zh/configure/app/source/config-dir.md +2 -2
  401. package/zh/configure/app/source/define.md +2 -2
  402. package/zh/configure/app/source/design-system.md +656 -630
  403. package/zh/configure/app/source/disable-default-entries.md +3 -3
  404. package/zh/configure/app/source/disable-entry-dirs.md +8 -7
  405. package/zh/configure/app/source/enable-async-entry.md +3 -3
  406. package/zh/configure/app/source/entries-dir.md +7 -7
  407. package/zh/configure/app/source/entries.md +5 -6
  408. package/zh/configure/app/source/exclude.md +2 -2
  409. package/zh/configure/app/source/global-vars.md +2 -2
  410. package/zh/configure/app/source/include.md +2 -2
  411. package/zh/configure/app/source/module-scopes.md +2 -2
  412. package/zh/configure/app/source/pre-entry.md +2 -2
  413. package/zh/configure/app/source/resolve-extension-prefix.md +2 -2
  414. package/zh/configure/app/source/resolve-main-fields.md +2 -2
  415. package/zh/configure/app/testing/transformer.md +2 -3
  416. package/zh/configure/app/tools/autoprefixer.md +2 -2
  417. package/zh/configure/app/tools/babel.md +2 -2
  418. package/zh/configure/app/tools/css-extract.md +2 -2
  419. package/zh/configure/app/tools/css-loader.md +2 -2
  420. package/zh/configure/app/tools/dev-server.md +2 -2
  421. package/zh/configure/app/tools/html-plugin.md +2 -2
  422. package/zh/configure/app/tools/inspector.md +2 -2
  423. package/zh/configure/app/tools/jest.md +9 -9
  424. package/zh/configure/app/tools/less.md +2 -2
  425. package/zh/configure/app/tools/minify-css.md +2 -2
  426. package/zh/configure/app/tools/postcss.md +2 -2
  427. package/zh/configure/app/tools/pug.md +2 -2
  428. package/zh/configure/app/tools/sass.md +2 -2
  429. package/zh/configure/app/tools/style-loader.md +2 -2
  430. package/zh/configure/app/tools/styled-components.md +2 -2
  431. package/zh/configure/app/tools/swc.md +12 -1
  432. package/zh/configure/app/tools/terser.md +2 -2
  433. package/zh/configure/app/tools/ts-checker.md +2 -2
  434. package/zh/configure/app/tools/ts-loader.md +2 -2
  435. package/zh/configure/app/tools/webpack-chain.md +2 -2
  436. package/zh/configure/app/tools/webpack.md +2 -2
  437. package/zh/guides/advanced-features/bff/frameworks.md +6 -6
  438. package/zh/guides/advanced-features/bff/function.md +49 -44
  439. package/zh/guides/advanced-features/bff/index.md +9 -9
  440. package/zh/guides/advanced-features/bff/type.md +0 -1
  441. package/zh/guides/advanced-features/code-split.md +3 -3
  442. package/zh/guides/advanced-features/compatibility.md +6 -7
  443. package/zh/guides/advanced-features/eslint.md +0 -1
  444. package/zh/guides/advanced-features/index.md +0 -5
  445. package/zh/guides/advanced-features/low-level.md +17 -19
  446. package/zh/guides/advanced-features/ssg.md +8 -9
  447. package/zh/guides/advanced-features/ssr.md +5 -11
  448. package/zh/guides/advanced-features/testing.md +3 -2
  449. package/zh/guides/advanced-features/web-server.md +3 -4
  450. package/zh/guides/basic-features/alias.md +7 -11
  451. package/zh/guides/basic-features/css/css-in-js.md +5 -5
  452. package/zh/guides/basic-features/css/css-modules.md +2 -2
  453. package/zh/guides/basic-features/css/postcss.md +42 -46
  454. package/zh/guides/basic-features/css/tailwindcss.md +5 -5
  455. package/zh/guides/basic-features/data-fetch.md +109 -192
  456. package/zh/guides/basic-features/env-vars.md +7 -6
  457. package/zh/guides/basic-features/html.md +54 -46
  458. package/zh/guides/basic-features/index.md +0 -5
  459. package/zh/guides/basic-features/mock.md +4 -4
  460. package/zh/guides/basic-features/proxy.md +4 -5
  461. package/zh/guides/basic-features/routes.md +105 -18
  462. package/zh/guides/concept/entries.md +5 -7
  463. package/zh/guides/get-started/quick-start.md +3 -4
  464. package/zh/guides/topic-detail/changesets/add.md +1 -3
  465. package/zh/guides/topic-detail/changesets/changelog.md +30 -31
  466. package/zh/guides/topic-detail/changesets/commit.md +44 -45
  467. package/zh/guides/topic-detail/changesets/config.md +2 -1
  468. package/zh/guides/topic-detail/changesets/github.md +6 -10
  469. package/zh/guides/topic-detail/changesets/introduce.md +0 -1
  470. package/zh/guides/topic-detail/changesets/release-note.md +9 -12
  471. package/zh/guides/topic-detail/changesets/release-pre.md +1 -1
  472. package/zh/guides/topic-detail/framework-plugin/extend.md +13 -13
  473. package/zh/guides/topic-detail/framework-plugin/hook-list.md +2 -2
  474. package/zh/guides/topic-detail/framework-plugin/hook.md +57 -54
  475. package/zh/guides/topic-detail/framework-plugin/implement.md +11 -11
  476. package/zh/guides/topic-detail/framework-plugin/plugin-api.md +4 -4
  477. package/zh/guides/topic-detail/generator/codesmith/api/app.md +36 -36
  478. package/zh/guides/topic-detail/generator/codesmith/api/ejs.md +2 -2
  479. package/zh/guides/topic-detail/generator/codesmith/api/fs.md +2 -2
  480. package/zh/guides/topic-detail/generator/codesmith/api/git.md +3 -2
  481. package/zh/guides/topic-detail/generator/codesmith/api/handlebars.md +2 -2
  482. package/zh/guides/topic-detail/generator/codesmith/api/json.md +9 -11
  483. package/zh/guides/topic-detail/generator/codesmith/api/npm.md +4 -2
  484. package/zh/guides/topic-detail/generator/codesmith/introduce.md +20 -7
  485. package/zh/guides/topic-detail/generator/codesmith/run-in-js.md +4 -5
  486. package/zh/guides/topic-detail/generator/codesmith/structure.md +13 -10
  487. package/zh/guides/topic-detail/generator/config/common.md +18 -27
  488. package/zh/guides/topic-detail/generator/plugin/abstract.md +1 -1
  489. package/zh/guides/topic-detail/generator/plugin/api/file/introduce.md +1 -0
  490. package/zh/guides/topic-detail/generator/plugin/api/file/updateJSONFile.md +4 -4
  491. package/zh/guides/topic-detail/generator/plugin/api/info/locale.md +1 -1
  492. package/zh/guides/topic-detail/generator/plugin/api/input/addInputAfter.md +2 -2
  493. package/zh/guides/topic-detail/generator/plugin/api/input/addInputBefore.md +3 -4
  494. package/zh/guides/topic-detail/generator/plugin/api/input/setInput.md +1 -1
  495. package/zh/guides/topic-detail/generator/plugin/api/input/type.md +1 -1
  496. package/zh/guides/topic-detail/generator/plugin/api/introduce.md +8 -9
  497. package/zh/guides/topic-detail/generator/plugin/develop.md +13 -13
  498. package/zh/guides/topic-detail/generator/plugin/use.md +8 -8
  499. package/zh/guides/topic-detail/generator/project.md +1 -1
  500. package/zh/guides/topic-detail/micro-frontend/c01-introduction.md +7 -8
  501. package/zh/guides/topic-detail/micro-frontend/c02-development.md +20 -23
  502. package/zh/guides/topic-detail/micro-frontend/c03-main-app.md +41 -44
  503. package/zh/guides/topic-detail/micro-frontend/c04-communicate.md +7 -5
  504. package/zh/guides/topic-detail/micro-frontend/c05-mixed-stack.md +1 -1
  505. package/zh/guides/topic-detail/model/auto-actions.md +0 -1
  506. package/zh/guides/topic-detail/model/computed-state.md +0 -2
  507. package/zh/guides/topic-detail/model/define-model.md +3 -6
  508. package/zh/guides/topic-detail/model/faq.md +2 -5
  509. package/zh/guides/topic-detail/model/manage-effects.md +2 -5
  510. package/zh/guides/topic-detail/model/model-communicate.md +1 -4
  511. package/zh/guides/topic-detail/model/performance.md +1 -5
  512. package/zh/guides/topic-detail/model/quick-start.md +0 -6
  513. package/zh/guides/topic-detail/model/redux-integration.md +3 -2
  514. package/zh/guides/topic-detail/model/test-model.md +1 -1
  515. package/zh/guides/topic-detail/model/typescript-best-practice.md +13 -14
  516. package/zh/guides/topic-detail/model/use-model.md +14 -12
  517. package/zh/guides/topic-detail/model/use-out-of-modernjs.md +4 -6
  518. package/zh/guides/topic-detail/monorepo/intro.md +0 -1
  519. package/zh/guides/topic-detail/monorepo/sub-project-interface.md +14 -7
  520. package/zh/tutorials/first-app/c01-start.md +2 -2
  521. package/zh/tutorials/first-app/c03-css.md +6 -9
  522. package/zh/tutorials/first-app/c04-routes.md +1 -1
  523. package/zh/tutorials/first-app/c05-loader.md +2 -1
  524. package/zh/tutorials/first-app/c07-container.md +6 -7
  525. package/zh/tutorials/first-app/c08-entries.md +5 -7
@@ -1,4 +1,4 @@
1
1
 
2
- > @modern-js/main-doc@2.0.2 build /github/workspace/packages/toolkit/main-doc
2
+ > @modern-js/main-doc@2.1.0 build /github/workspace/packages/toolkit/main-doc
3
3
  > npx ts-node ./scripts/sync.ts
4
4
 
@@ -5,8 +5,3 @@ type: ref
5
5
  # Commands
6
6
 
7
7
  This section covers all commands.
8
-
9
-
10
-
11
-
12
-
@@ -15,7 +15,7 @@ Options:
15
15
 
16
16
  Run ESLint to check the syntax of the code. Normally, only the part of the code modified by this commit needs to be checked by `lint-staged` during the `git commit` phase.
17
17
 
18
- * `--no-fix` close auto fix by lint.
18
+ - `--no-fix` close auto fix by lint.
19
19
 
20
20
  import CommandTip from '@site-docs-en/components/command-tip.md'
21
21
 
@@ -21,12 +21,10 @@ By default, the project will run in `localhost:8080`, you can modify the Server
21
21
  export default defineConfig({
22
22
  server: {
23
23
  port: 8081,
24
- }
25
- })
24
+ },
25
+ });
26
26
  ```
27
27
 
28
28
  import CommandTip from '@site-docs-en/components/command-tip.md'
29
29
 
30
30
  <CommandTip />
31
-
32
-
@@ -19,23 +19,23 @@ this file supports the use `js` or `ts`, but the functions must be exported usin
19
19
 
20
20
  The files named `index` will be upper level routing:
21
21
 
22
- * `api/lambda/index.ts` -> `$BASENAME/`
23
- * `api/lambda/user/index.ts` -> `$BASENAME/user`
22
+ - `api/lambda/index.ts` -> `$BASENAME/`
23
+ - `api/lambda/user/index.ts` -> `$BASENAME/user`
24
24
 
25
25
  ### Multi Level Route
26
26
 
27
27
  The routing system also supports parsing multiple levels of files. and if you create a folder, the files will still be automatically parsed in the same way.
28
28
 
29
- * `api/lambda/hello.ts` -> `$BASENAME/hello`
30
- * `api/lambda/user/list.ts` -> `$BASENAME/user/list`
29
+ - `api/lambda/hello.ts` -> `$BASENAME/hello`
30
+ - `api/lambda/user/list.ts` -> `$BASENAME/user/list`
31
31
 
32
32
  ### Dynamic Route
33
33
 
34
34
  Dynamic named routing parameters can be supported by creating folders or files with `[xxx]`.
35
35
 
36
- * `api/lambda/user/[username]/info.ts` -> `$BASENAME/user/:username/info`
37
- * `api/lambda/user/[username]/delete.ts` -> `$BASENAME/user/:username/delete`
38
- * `api/lambda/article/[id]/info.ts` -> `$BASENAME/article/:id/info`
36
+ - `api/lambda/user/[username]/info.ts` -> `$BASENAME/user/:username/info`
37
+ - `api/lambda/user/[username]/delete.ts` -> `$BASENAME/user/:username/delete`
38
+ - `api/lambda/article/[id]/info.ts` -> `$BASENAME/article/:id/info`
39
39
 
40
40
  the `$BASENAME` can be configured in `modern.config.js`,the default value is `/api`。
41
41
 
@@ -43,11 +43,11 @@ the `$BASENAME` can be configured in `modern.config.js`,the default value is `
43
43
 
44
44
  By default, all files in the `api/` will be parsed as BFF function. but we also set a allow list, and these files will not be parsed:
45
45
 
46
- * file name start with `_`, for example: `_utils.ts`.
47
- * files in directory that name start with `_`, for example:`_utils/index.ts`、`_utils/cp.ts`.
48
- * test files, for example:`foo.test.ts`.
49
- * TypeScript define files, for example:`hello.d.ts`.
50
- * files in `node_module`.
46
+ - file name start with `_`, for example: `_utils.ts`.
47
+ - files in directory that name start with `_`, for example:`_utils/index.ts`、`_utils/cp.ts`.
48
+ - test files, for example:`foo.test.ts`.
49
+ - TypeScript define files, for example:`hello.d.ts`.
50
+ - files in `node_module`.
51
51
 
52
52
  ## Define Function
53
53
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "**/*.[tj]s"
2
+ title: '**/*.[tj]s'
3
3
  sidebar_position: 1
4
4
  ---
5
5
 
@@ -19,23 +19,23 @@ this file supports the use `js` or `ts`, but the functions must be exported usin
19
19
 
20
20
  The files named `index` will be upper level routing:
21
21
 
22
- * `api/index.ts` -> `$BASENAME/`
23
- * `api/user/index.ts` -> `$BASENAME/user`
22
+ - `api/index.ts` -> `$BASENAME/`
23
+ - `api/user/index.ts` -> `$BASENAME/user`
24
24
 
25
25
  ### Multi Level Route
26
26
 
27
27
  The routing system also supports parsing multiple levels of files. and if you create a folder, the files will still be automatically parsed in the same way.
28
28
 
29
- * `api/hello.ts` -> `$BASENAME/hello`
30
- * `api/user/list.ts` -> `$BASENAME/user/list`
29
+ - `api/hello.ts` -> `$BASENAME/hello`
30
+ - `api/user/list.ts` -> `$BASENAME/user/list`
31
31
 
32
32
  ### Dynamic Route
33
33
 
34
34
  Dynamic named routing parameters can be supported by creating folders or files with `[xxx]`.
35
35
 
36
- * `api/user/[username]/info.ts` -> `$BASENAME/user/:username/info`
37
- * `api/user/[username]/delete.ts` -> `$BASENAME/user/:username/delete`
38
- * `api/article/[id]/info.ts` -> `$BASENAME/article/:id/info`
36
+ - `api/user/[username]/info.ts` -> `$BASENAME/user/:username/info`
37
+ - `api/user/[username]/delete.ts` -> `$BASENAME/user/:username/delete`
38
+ - `api/article/[id]/info.ts` -> `$BASENAME/article/:id/info`
39
39
 
40
40
  the `$BASENAME` can be configured in `modern.config.js`,the default value is `/api`。
41
41
 
@@ -43,11 +43,11 @@ the `$BASENAME` can be configured in `modern.config.js`,the default value is `
43
43
 
44
44
  By default, all files in the `api/` will be parsed as BFF function. but we also set a allow list, and these files will not be parsed:
45
45
 
46
- * file name start with `_`, for example: `_utils.ts`.
47
- * files in directory that name start with `_`, for example:`_utils/index.ts`、`_utils/cp.ts`.
48
- * test files, for example:`foo.test.ts`.
49
- * TypeScript define files, for example:`hello.d.ts`.
50
- * files in `node_module`.
46
+ - file name start with `_`, for example: `_utils.ts`.
47
+ - files in directory that name start with `_`, for example:`_utils/index.ts`、`_utils/cp.ts`.
48
+ - test files, for example:`foo.test.ts`.
49
+ - TypeScript define files, for example:`hello.d.ts`.
50
+ - files in `node_module`.
51
51
 
52
52
  ## Define Function
53
53
 
@@ -8,5 +8,3 @@ in BFF function mode,this file can add middleware before [BFF 函数](/docs/ap
8
8
  :::note
9
9
  For detail, see [hook](/docs/apis/app/runtime/bff/hook)
10
10
  :::
11
-
12
-
@@ -1,10 +1,8 @@
1
1
  ---
2
- title: "**/_*.[tj]s, _*/**"
2
+ title: '**/_*.[tj]s, _*/**'
3
3
  sidebar_position: 2
4
4
  ---
5
5
 
6
6
  under BFF function mode, these files are not registered as routes.
7
7
 
8
8
  Any files that not routes, but required in the project can be named in this way.
9
-
10
-
@@ -13,33 +13,40 @@ import { createApp, bootstrap } from '@modern-js/runtime';
13
13
  // App.[jt]sx
14
14
  import App from '@_modern_js_src/App';
15
15
  import { state } from '@modern-js/runtime/plugins';
16
- import { immer, effects, autoActions, devtools } from '@modern-js/runtime/model';
16
+ import {
17
+ immer,
18
+ effects,
19
+ autoActions,
20
+ devtools,
21
+ } from '@modern-js/runtime/model';
17
22
 
18
- const createStatePlugins = (config) => {
23
+ const createStatePlugins = config => {
19
24
  const plugins = [];
20
25
  plugins.push(immer(config['immer']));
21
26
  plugins.push(effects(config['effects']));
22
27
  plugins.push(autoActions(config['autoActions']));
23
28
  plugins.push(devtools(config['devtools']));
24
29
  return plugins;
25
- }
30
+ };
26
31
  let AppWrapper = null;
27
32
  function render() {
28
33
  AppWrapper = createApp({
29
34
  plugins: [
30
- state({...{plugins: createStatePlugins(true)}, ...App?.config?.state}),
31
- ]
32
- })(App)
35
+ state({
36
+ ...{ plugins: createStatePlugins(true) },
37
+ ...App?.config?.state,
38
+ }),
39
+ ],
40
+ })(App);
33
41
  if (IS_BROWSER) {
34
42
  bootstrap(AppWrapper, MOUNT_ID);
35
43
  }
36
- return AppWrapper
44
+ return AppWrapper;
37
45
  }
38
46
  AppWrapper = render();
39
- export default AppWrapper;;
47
+ export default AppWrapper;
40
48
  ```
41
49
 
42
50
  :::note
43
51
  In multi-entry App,each entry can have a `App.[jt]sx`, for detail, see [Entry](/docs/guides/concept/entries).
44
52
  :::
45
-
@@ -7,7 +7,6 @@ Entry identifier if App want use custom entry. In most case, [`App.[tj]sx`](/doc
7
7
 
8
8
  When we need to add custom behavior before `bootstrap` or completely take over the webpack entry, we can place `index.[tj]s` in `src/` or entry directory. The following are discussed in two cases:
9
9
 
10
-
11
10
  1. add custom behavior before bootstrap
12
11
 
13
12
  Just add default export under `src/index.[tj]s`:
@@ -7,8 +7,8 @@ The entry identifier when the application uses file system-based routing.
7
7
 
8
8
  When the project structure is of type `Routes directory entry`, the files in the `src/routes` directory are parsed to get the client-side routing configuration. See [Routing by convention](/docs/guides/basic-features/routes) for more details on usage.
9
9
 
10
-
11
10
  Any `layout.[tj]sx` and `page.[tj]sx` under `src/routes` will be used as a route to the application:
11
+
12
12
  ```bash {3}
13
13
  .
14
14
  └── routes
@@ -32,6 +32,7 @@ The directory names in the `routes` directory will be used as a mapping of the r
32
32
  ```
33
33
 
34
34
  The following two routes are produced:
35
+
35
36
  - `/`
36
37
  - `/user`
37
38
 
@@ -69,6 +70,7 @@ As in the example below, you can add a common layout component for all routing c
69
70
  ```
70
71
 
71
72
  You can represent child components in layout components by using `<Outlet>`:
73
+
72
74
  ```tsx title=routes/layout.tsx
73
75
  import { Link, Outlet, useLoaderData } from '@modern-js/runtime/router';
74
76
 
@@ -77,8 +79,8 @@ export default () => {
77
79
  <>
78
80
  <Outlet></Outlet>
79
81
  </>
80
- )
81
- }
82
+ );
83
+ };
82
84
  ```
83
85
 
84
86
  :::note
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "*.[server|node].[tj]sx"
2
+ title: '*.[server|node].[tj]sx'
3
3
  sidebar_position: 8
4
4
  ---
5
5
 
@@ -14,12 +14,14 @@ Used in application projects to place server side code, it generally has the fol
14
14
  import { useLoaderData } from '@modern-js/runtime/router';
15
15
  import { readFile } from './utils.server';
16
16
 
17
- type ProfileData = { /* some type declarations */ }
17
+ type ProfileData = {
18
+ /* some type declarations */
19
+ };
18
20
 
19
- export const loader = async(): ProfileData => {
21
+ export const loader = async (): ProfileData => {
20
22
  const profile = await readFile('profile.json');
21
23
  return profile;
22
- }
24
+ };
23
25
 
24
26
  export default function UserPage() {
25
27
  const profileData = useLoaderData() as ProfileData;
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "**/*.stories.[tj]sx"
2
+ title: '**/*.stories.[tj]sx'
3
3
  sidebar_position: 7
4
4
  ---
5
5
 
@@ -8,5 +8,5 @@ App Storybook debug file. files in `src/` which suffix `*.stories.[tj]sx` are as
8
8
  Execute the `dev story` command to debugging these files in the Storybook.
9
9
 
10
10
  :::info
11
- Using a Storybook requires executing `new` command to enable the 「Visual Testing (Storybook)」 mode.
11
+ Using a Storybook requires executing `new` command to enable the 「Visual Testing (Storybook)」 mode.
12
12
  :::
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "**/*.test.[tj]sx?"
2
+ title: '**/*.test.[tj]sx?'
3
3
  sidebar_position: 6
4
4
  ---
5
5
 
@@ -43,7 +43,6 @@ defineConfig(App, {
43
43
  })
44
44
  ```
45
45
 
46
-
47
46
  1. `defineConfig` can configuring [runtime.state](/docs/configure/app/runtime/state)、[runtime.router](/docs/configure/app/runtime/router) etc.
48
47
 
49
48
  2. `defineConfig` before configuring a property, such as `router`, you need to make sure that the `modern.config.js` has been configured to enable this feature.
@@ -16,10 +16,10 @@ import { hook } from '@modern-js/runtime/{namespace}';
16
16
 
17
17
  ```ts
18
18
  type HookOptions = {
19
- addMiddleware: string | function
20
- }
19
+ addMiddleware: string | function;
20
+ };
21
21
 
22
- function hook(options: HookOptions): void
22
+ function hook(options: HookOptions): void;
23
23
  ```
24
24
 
25
25
  ### Input
@@ -7,7 +7,7 @@ Used to start and mount App, usually without manual calls。This API is only req
7
7
  ## Usage
8
8
 
9
9
  ```ts
10
- import ReactDOM from 'react-dom/client'
10
+ import ReactDOM from 'react-dom/client';
11
11
  import { bootstrap } from '@modern-js/runtime';
12
12
 
13
13
  bootstrap(App, 'root', undefined, ReactDOM);
@@ -39,7 +39,7 @@ type BootStrap<T = unknown> = (
39
39
  ## Example
40
40
 
41
41
  ```tsx
42
- import ReactDOM from 'react-dom/client'
42
+ import ReactDOM from 'react-dom/client';
43
43
  import { createApp, bootstrap } from '@modern-js/runtime';
44
44
 
45
45
  function App() {
@@ -48,13 +48,10 @@ function App() {
48
48
 
49
49
  const WrappedApp = createApp({
50
50
  // customized plugin
51
- plugins: [
52
- customPlugin(),
53
- ],
51
+ plugins: [customPlugin()],
54
52
  })(App);
55
53
 
56
54
  bootstrap(WrappedApp, 'root', undefined, ReactDOM);
57
-
58
55
  ```
59
56
 
60
57
  :::info
@@ -39,8 +39,6 @@ function App() {
39
39
  }
40
40
 
41
41
  export default createApp({
42
- plugins: [
43
- customPlugin()
44
- ]
42
+ plugins: [customPlugin()],
45
43
  })(App);
46
44
  ```
@@ -21,14 +21,14 @@ type Options = {
21
21
  skip: boolean;
22
22
  params: Record<string, any>;
23
23
  static: boolean;
24
- }
24
+ };
25
25
  type ReturnData = {
26
26
  data: Record<string, any>;
27
27
  loading: boolean;
28
28
  error: Error;
29
29
  reload: (params?: Record<string, any>) => Promise<any> | undefined;
30
30
  reloading: boolean;
31
- }
31
+ };
32
32
 
33
33
  function useLoader(loaderFn: LoaderFn, options: Options): ReturnData;
34
34
  ```
@@ -28,15 +28,17 @@ import EnableMicroFrontend from '@site-docs-en/components/enable-micro-frontend.
28
28
  function App() {
29
29
  const { Home, Contact } = useModuleApps();
30
30
 
31
- return <div>
32
- Master APP
33
- <Route exact path='/home'>
34
- <Home />
35
- </Route>
36
- <Route exact path='/home'>
37
- <Contact />
38
- </Route>
39
- </div>;
31
+ return (
32
+ <div>
33
+ Master APP
34
+ <Route exact path="/home">
35
+ <Home />
36
+ </Route>
37
+ <Route exact path="/home">
38
+ <Contact />
39
+ </Route>
40
+ </div>
41
+ );
40
42
  }
41
43
 
42
44
  defineConfig(App, {
@@ -44,24 +46,23 @@ defineConfig(App, {
44
46
  apps: [
45
47
  {
46
48
  // name 区分大小写,name 提供的是什么 useModuleApps 返回的就是什么
47
- name: "Home",
48
- entry: "http://127.0.0.1:8081/"
49
+ name: 'Home',
50
+ entry: 'http://127.0.0.1:8081/',
49
51
  },
50
52
  {
51
- name: "Contact",
52
- entry: "http://localhost:8082"
53
- }
54
- ]
55
- }
56
- })
53
+ name: 'Contact',
54
+ entry: 'http://localhost:8082',
55
+ },
56
+ ],
57
+ },
58
+ });
57
59
  ```
58
60
 
59
61
  Get the `Home` and `Contact` sub-application components(the same as name in the config) through `useModuleApps()`. After that, you can load the child application just like a normal React component.
60
62
 
61
-
62
63
  ### Centralized Routing
63
64
 
64
- **Centralized Routing** is a way to centrally configure the activation routes of sub-applications. 我add `activeWhen` config to enable **Centralized Routing**。
65
+ **Centralized Routing** is a way to centrally configure the activation routes of sub-applications. Add `activeWhen` config to enable **Centralized Routing**。
65
66
 
66
67
  import MicroRuntimeConfig from '@site-docs-en/components/micro-runtime-config.md';
67
68
 
@@ -75,9 +76,11 @@ import { useModuleApp } from '@modern-js/plugin-runtime';
75
76
  function App() {
76
77
  const { MApp } = useModuleApps();
77
78
 
78
- return <div>
79
- <MApp />
80
- </div>
79
+ return (
80
+ <div>
81
+ <MApp />
82
+ </div>
83
+ );
81
84
  }
82
85
 
83
86
  defineConfig(App, {
@@ -85,18 +88,18 @@ defineConfig(App, {
85
88
  apps: [
86
89
  {
87
90
  // name is case sensitive, what name provides is what useModuleApps returns
88
- name: "Dashboard",
91
+ name: 'Dashboard',
89
92
  activeWhen: '/dashboard',
90
- entry: "http://127.0.0.1:8081/"
93
+ entry: 'http://127.0.0.1:8081/',
91
94
  },
92
95
  {
93
- name: "TableList",
96
+ name: 'TableList',
94
97
  activeWhen: '/table',
95
- entry: "http://localhost:8082"
96
- }
97
- ]
98
- }
99
- })
98
+ entry: 'http://localhost:8082',
99
+ },
100
+ ],
101
+ },
102
+ });
100
103
  ```
101
104
 
102
105
  After starting the application in this way, accessing the `/dashboard` route will render the `Dashboard`, and accessing the `/table` route will render the `TableList`.
@@ -107,26 +110,30 @@ The transition animation of the component loading process can be customized in t
107
110
 
108
111
  ```tsx title=App.tsx
109
112
  function App() {
110
- const { Components: { Home } } = useModuleApps();
111
-
112
- return <div>
113
- Master APP
114
- <Route exact path='/home'>
115
- <Home
116
- loadable={{
117
- loading: ({ pastDelay, error }: any) => {
118
- if (error) {
119
- console.error(error);
120
- return <div>error: {error?.message}</div>;
121
- } else if (pastDelay) {
122
- return <div>loading</div>;
123
- } else {
124
- return null;
125
- }
126
- },
127
- }}
128
- />
129
- </Route>
130
- </div>;
113
+ const {
114
+ Components: { Home },
115
+ } = useModuleApps();
116
+
117
+ return (
118
+ <div>
119
+ Master APP
120
+ <Route exact path="/home">
121
+ <Home
122
+ loadable={{
123
+ loading: ({ pastDelay, error }: any) => {
124
+ if (error) {
125
+ console.error(error);
126
+ return <div>error: {error?.message}</div>;
127
+ } else if (pastDelay) {
128
+ return <div>loading</div>;
129
+ } else {
130
+ return null;
131
+ }
132
+ },
133
+ }}
134
+ />
135
+ </Route>
136
+ </div>
137
+ );
131
138
  }
132
139
  ```
@@ -11,7 +11,7 @@ import { useRuntimeContext } from '@modern-js/runtime';
11
11
 
12
12
  export function App() {
13
13
  const runtimeContext = useRuntimeContext();
14
- return <div>Hello World</div>
14
+ return <div>Hello World</div>;
15
15
  }
16
16
  ```
17
17
 
@@ -27,12 +27,11 @@ type RuntimeContext = {
27
27
  cookie: string;
28
28
  };
29
29
  store: ReduckStore;
30
- }
30
+ };
31
31
 
32
32
  function useRuntimeContext(): RuntimeContext;
33
33
  ```
34
34
 
35
-
36
35
  ### Return Value
37
36
 
38
37
  - `request`: additional information in the request context.
@@ -54,6 +53,6 @@ function App() {
54
53
 
55
54
  const [state, actions] = store.use(fooModel);
56
55
 
57
- return <div>state: {state}</div>
56
+ return <div>state: {state}</div>;
58
57
  }
59
58
  ```
@@ -5,8 +5,3 @@ type: ref
5
5
  # Runtime
6
6
 
7
7
  This section covers all APIs using `@modern-js/runtime`.
8
-
9
-
10
-
11
-
12
-
@@ -3,7 +3,7 @@ sidebar_position: 8
3
3
  title: Provider
4
4
  ---
5
5
 
6
- import ReduckTip from '@site-docs/components/reduck-tip.md'
6
+ import ReduckTip from '@site-docs-en/components/reduck-tip.md'
7
7
 
8
8
  <ReduckTip />
9
9
 
@@ -13,12 +13,17 @@ The original type of Reduck is complex. The following type definition shows the
13
13
 
14
14
  `Connect` is the same as `useModel` and is the corresponding HOC-style API. It is recommended to use the Hook-style `useModel` first.
15
15
 
16
-
17
16
  ## Function Signature
18
17
 
19
18
  ```ts
20
- type SelectStateToProps = (...modelStates: State[], ownProps? :any) => PlainObject;
21
- type SelectActionsToProps = (...modelActions: Actions[], ownProps? :any) => PlainObject;
19
+ type SelectStateToProps = (
20
+ ...modelStates: State[],
21
+ ownProps?: any,
22
+ ) => PlainObject;
23
+ type SelectActionsToProps = (
24
+ ...modelActions: Actions[],
25
+ ownProps?: any,
26
+ ) => PlainObject;
22
27
 
23
28
  function connect(models: Model, options?: ConnectOptions);
24
29
  function connect(
@@ -27,7 +32,6 @@ function connect(
27
32
  );
28
33
  ```
29
34
 
30
-
31
35
  ### Input
32
36
 
33
37
  - `models`: passed one or more Models. When `models` is an array type parameter, the last two params can be a function for filtering State (`SelectStateToProps` type) and a function for filtering Actions (`SelectActionsToProps` type).
@@ -38,7 +42,6 @@ function connect(
38
42
 
39
43
  - `options`: Optional parameter for auxiliary configuration. Currently supports setting `forwardRef`, which is used to control whether to forward the `ref` of the component. The default value is `false`, which means that the `ref` is not forwarded. Set to `{ forwardRef: true }`, which means to forward `ref`.
40
44
 
41
-
42
45
  ### Return Type
43
46
 
44
47
  Returns a HOC: receives an component, returns a component with extra State and Actions injected on `props`.
@@ -7,12 +7,10 @@ import ReduckTip from '@site-docs-en/components/reduck-tip.md'
7
7
 
8
8
  <ReduckTip />
9
9
 
10
-
11
10
  `createStore` is used to create a Store. Reduck’s Store based on Redux's [Store](https://redux.js.org/api/store) implementatio. Used to store the state of the application and managing the state and Model.
12
11
 
13
12
  In general, this API is only used when you need to have full control over the creation of the Store. For example, to customize a Store, pass in the ['Provider'](./Provider.md) component to use.
14
13
 
15
-
16
14
  ## Function Signature
17
15
 
18
16
  ```ts
@@ -49,8 +47,8 @@ Reduck Store:
49
47
  - `unmount`: unmount the Model object, and the Model State is cleared from the Store.
50
48
  - `ReduxStore`: [Redux Store API](https://redux.js.org/tutorials/fundamentals/part-4-store#redux-store).
51
49
 
52
-
53
50
  ## Example
51
+
54
52
  ```tsx
55
53
  const store = createStore();
56
54