@modern-js/main-doc 2.0.3-alpha.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.turbo/turbo-build.log +1 -1
- package/en/apis/app/commands/_category_.json +8 -0
- package/en/apis/app/commands/build.mdx +39 -0
- package/en/apis/app/commands/dev.mdx +61 -0
- package/en/apis/app/commands/index.mdx +7 -0
- package/en/apis/app/commands/inspect.mdx +61 -0
- package/en/apis/app/commands/lint.mdx +19 -0
- package/en/apis/app/commands/new.mdx +54 -0
- package/en/apis/app/commands/serve.mdx +27 -0
- package/en/apis/app/commands/test.mdx +35 -0
- package/en/apis/app/commands/upgrade.mdx +18 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/hooks/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/hooks/api/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/hooks/api/framework/_category_.json +0 -0
- package/en/apis/app/hooks/api/framework/lambda.mdx +57 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/hooks/api/functions/_category_.json +0 -0
- package/en/apis/app/hooks/api/functions/api.mdx +81 -0
- package/en/apis/app/hooks/api/functions/app.mdx +12 -0
- package/en/apis/app/hooks/api/functions/common.mdx +9 -0
- package/en/apis/app/hooks/api/test.mdx +12 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/hooks/config/_category_.json +0 -0
- package/en/apis/app/hooks/config/html.mdx +9 -0
- package/en/apis/app/hooks/config/icon.mdx +16 -0
- package/en/apis/app/hooks/config/mock.mdx +7 -0
- package/en/apis/app/hooks/config/public.mdx +30 -0
- package/en/apis/app/hooks/config/storybook.mdx +14 -0
- package/en/apis/app/hooks/config/upload.mdx +44 -0
- package/en/{docusaurus-plugin-content-docs/current/apis/app/hooks/index.md → apis/app/hooks/index.mdx} +0 -0
- package/en/apis/app/hooks/modern-config.mdx +9 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/hooks/server/_category_.json +0 -0
- package/en/apis/app/hooks/server/index_.mdx +16 -0
- package/en/apis/app/hooks/server/test.mdx +12 -0
- package/en/apis/app/hooks/shared.mdx +7 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/hooks/src/_category_.json +0 -0
- package/en/apis/app/hooks/src/app.mdx +54 -0
- package/en/apis/app/hooks/src/index_.mdx +34 -0
- package/en/apis/app/hooks/src/pages.mdx +182 -0
- package/en/apis/app/hooks/src/routes.mdx +90 -0
- package/en/apis/app/hooks/src/server.mdx +34 -0
- package/en/apis/app/hooks/src/stories.mdx +14 -0
- package/en/apis/app/hooks/src/test.mdx +14 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/app/_category_.json +0 -0
- package/en/apis/app/runtime/app/define-config.mdx +61 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/bff/_category_.json +0 -0
- package/en/apis/app/runtime/bff/hook.mdx +44 -0
- package/en/apis/app/runtime/bff/use-context.mdx +38 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/core/_category_.json +0 -0
- package/en/apis/app/runtime/core/bootstrap.mdx +70 -0
- package/en/apis/app/runtime/core/create-app.mdx +45 -0
- package/en/apis/app/runtime/core/use-loader.mdx +85 -0
- package/en/apis/app/runtime/core/use-module-apps.mdx +140 -0
- package/en/apis/app/runtime/core/use-runtime-context.mdx +59 -0
- package/en/apis/app/runtime/index.mdx +7 -0
- package/en/apis/app/runtime/model/Provider.mdx +36 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/model/_category_.json +0 -0
- package/en/apis/app/runtime/model/auto-actions.mdx +122 -0
- package/en/apis/app/runtime/model/connect.mdx +145 -0
- package/en/apis/app/runtime/model/create-app.mdx +75 -0
- package/en/apis/app/runtime/model/create-store.mdx +61 -0
- package/en/apis/app/runtime/model/handle-effect.mdx +107 -0
- package/en/apis/app/runtime/model/model_.mdx +199 -0
- package/en/apis/app/runtime/model/use-local-model.mdx +29 -0
- package/en/apis/app/runtime/model/use-model.mdx +89 -0
- package/en/apis/app/runtime/model/use-static-model.mdx +51 -0
- package/en/apis/app/runtime/model/use-store.mdx +26 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/router/_category_.json +0 -0
- package/en/apis/app/runtime/router/router.mdx +262 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/ssr/_category_.json +0 -0
- package/en/apis/app/runtime/ssr/no-ssr.mdx +38 -0
- package/en/apis/app/runtime/ssr/pre-render.mdx +96 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/testing/_category_.json +0 -0
- package/en/apis/app/runtime/testing/act.mdx +35 -0
- package/en/apis/app/runtime/testing/cleanup.mdx +40 -0
- package/en/apis/app/runtime/testing/render.mdx +71 -0
- package/en/apis/app/runtime/testing/renderApp.mdx +34 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/utility/_category_.json +0 -0
- package/en/apis/app/runtime/utility/css-in-js.mdx +43 -0
- package/en/apis/app/runtime/utility/head.mdx +38 -0
- package/en/apis/app/runtime/utility/loadable.mdx +85 -0
- package/en/{docusaurus-plugin-content-docs/current/apis → apis}/app/runtime/web-server/_category_.json +0 -0
- package/en/apis/app/runtime/web-server/hook.mdx +133 -0
- package/en/apis/app/runtime/web-server/middleware.mdx +110 -0
- package/en/{docusaurus-plugin-content-docs/current/components/debug-app.md → components/debug-app.mdx} +0 -0
- package/en/components/enable-bff.mdx +31 -0
- package/en/components/enable-micro-frontend.mdx +13 -0
- package/en/components/global-proxy-config.mdx +74 -0
- package/en/components/global-proxy.mdx +27 -0
- package/en/components/init-app.mdx +43 -0
- package/en/components/micro-master-manifest-config.mdx +15 -0
- package/en/components/micro-runtime-config.mdx +18 -0
- package/en/components/prerequisites.mdx +20 -0
- package/en/components/reduck-migration.mdx +0 -0
- package/en/components/reduck-tip.mdx +8 -0
- package/en/components/router-legacy-tip.mdx +0 -0
- package/en/configure/app/auto-load-plugin.mdx +62 -0
- package/en/configure/app/bff/prefix.mdx +34 -0
- package/en/configure/app/bff/proxy.mdx +76 -0
- package/en/configure/app/builder-plugins.mdx +71 -0
- package/en/configure/app/deploy/microFrontend.mdx +53 -0
- package/en/configure/app/dev/asset-prefix.mdx +12 -0
- package/en/configure/app/dev/hmr.mdx +12 -0
- package/en/configure/app/dev/https.mdx +12 -0
- package/en/configure/app/dev/port.mdx +12 -0
- package/en/configure/app/dev/progress-bar.mdx +12 -0
- package/en/configure/app/dev/proxy.mdx +9 -0
- package/en/configure/app/dev/start-url.mdx +12 -0
- package/en/configure/app/experiments/lazy-compilation.mdx +12 -0
- package/en/configure/app/html/app-icon.mdx +12 -0
- package/en/configure/app/html/crossorigin.mdx +12 -0
- package/en/configure/app/html/disable-html-folder.mdx +12 -0
- package/en/configure/app/html/favicon-by-entries.mdx +12 -0
- package/en/configure/app/html/favicon.mdx +12 -0
- package/en/configure/app/html/inject-by-entries.mdx +12 -0
- package/en/configure/app/html/inject.mdx +12 -0
- package/en/configure/app/html/meta-by-entries.mdx +12 -0
- package/en/configure/app/html/meta.mdx +12 -0
- package/en/configure/app/html/mount-id.mdx +12 -0
- package/en/configure/app/html/tags-by-entries.mdx +12 -0
- package/en/configure/app/html/tags.mdx +12 -0
- package/en/configure/app/html/template-by-entries.mdx +12 -0
- package/en/configure/app/html/template-parameters-by-entries.mdx +12 -0
- package/en/configure/app/html/template-parameters.mdx +12 -0
- package/en/configure/app/html/template.mdx +12 -0
- package/en/configure/app/html/title-by-entries.mdx +12 -0
- package/en/configure/app/html/title.mdx +12 -0
- package/en/configure/app/output/asset-prefix.mdx +12 -0
- package/en/configure/app/output/assets-retry.mdx +12 -0
- package/en/configure/app/output/charset.mdx +12 -0
- package/en/configure/app/output/clean-dist-path.mdx +12 -0
- package/en/configure/app/output/convert-to-rem.mdx +12 -0
- package/en/configure/app/output/copy.mdx +12 -0
- package/en/configure/app/output/css-module-local-ident-name.mdx +12 -0
- package/en/configure/app/output/data-uri-limit.mdx +12 -0
- package/en/configure/app/output/disable-css-extract.mdx +12 -0
- package/en/configure/app/output/disable-css-module-extension.mdx +12 -0
- package/en/configure/app/output/disable-filename-hash.mdx +12 -0
- package/en/configure/app/output/disable-inline-runtime-chunk.mdx +12 -0
- package/en/configure/app/output/disable-minimize.mdx +12 -0
- package/en/configure/app/output/disable-node-polyfill.mdx +22 -0
- package/en/configure/app/output/disable-source-map.mdx +12 -0
- package/en/configure/app/output/disable-ts-checker.mdx +12 -0
- package/en/configure/app/output/dist-path.mdx +12 -0
- package/en/configure/app/output/enable-asset-fallback.mdx +12 -0
- package/en/configure/app/output/enable-asset-manifest.mdx +12 -0
- package/en/configure/app/output/enable-css-module-tsdeclaration.mdx +12 -0
- package/en/configure/app/output/enable-inline-scripts.mdx +12 -0
- package/en/configure/app/output/enable-inline-styles.mdx +12 -0
- package/en/configure/app/output/enable-latest-decorators.mdx +12 -0
- package/en/configure/app/output/externals.mdx +12 -0
- package/en/configure/app/output/filename.mdx +12 -0
- package/en/configure/app/output/legal-comments.mdx +12 -0
- package/en/configure/app/output/override-browserslist.mdx +12 -0
- package/en/configure/app/output/polyfill.mdx +12 -0
- package/en/configure/app/output/ssg.mdx +196 -0
- package/en/configure/app/output/svg-default-export.mdx +12 -0
- package/en/configure/app/performance/build-cache.mdx +12 -0
- package/en/configure/app/performance/bundle-analyze.mdx +12 -0
- package/en/configure/app/performance/chunk-split.mdx +12 -0
- package/en/configure/app/performance/print-file-size.mdx +12 -0
- package/en/configure/app/performance/profile.mdx +12 -0
- package/en/configure/app/performance/remove-console.mdx +12 -0
- package/en/configure/app/performance/remove-moment-locale.mdx +12 -0
- package/en/configure/app/plugins.mdx +81 -0
- package/en/configure/app/runtime/intro.mdx +95 -0
- package/en/configure/app/runtime/master-app.mdx +41 -0
- package/en/configure/app/runtime/router.mdx +33 -0
- package/en/configure/app/runtime/state.mdx +54 -0
- package/en/configure/app/security/sri.mdx +12 -0
- package/en/configure/app/server/base-url.mdx +32 -0
- package/en/configure/app/server/enable-framework-ext.mdx +49 -0
- package/en/configure/app/server/port.mdx +38 -0
- package/en/configure/app/server/public-routes.mdx +26 -0
- package/en/configure/app/server/routes.mdx +90 -0
- package/en/configure/app/server/ssr-by-entries.mdx +29 -0
- package/en/configure/app/server/ssr.mdx +20 -0
- package/en/configure/app/source/alias.mdx +12 -0
- package/en/configure/app/source/compile-js-data-uri.mdx +12 -0
- package/en/configure/app/source/config-dir.mdx +24 -0
- package/en/configure/app/source/define.mdx +12 -0
- package/en/configure/app/source/design-system.mdx +1175 -0
- package/en/configure/app/source/disable-default-entries.mdx +31 -0
- package/en/configure/app/source/disable-entry-dirs.mdx +39 -0
- package/en/configure/app/source/enable-async-entry.mdx +52 -0
- package/en/configure/app/source/entries-dir.mdx +39 -0
- package/en/configure/app/source/entries.mdx +123 -0
- package/en/configure/app/source/exclude.mdx +12 -0
- package/en/configure/app/source/global-vars.mdx +12 -0
- package/en/configure/app/source/include.mdx +12 -0
- package/en/configure/app/source/module-scopes.mdx +12 -0
- package/en/configure/app/source/pre-entry.mdx +12 -0
- package/en/configure/app/source/resolve-extension-prefix.mdx +12 -0
- package/en/configure/app/source/resolve-main-fields.mdx +12 -0
- package/en/configure/app/testing/transformer.mdx +21 -0
- package/en/configure/app/tools/autoprefixer.mdx +12 -0
- package/en/configure/app/tools/babel.mdx +12 -0
- package/en/configure/app/tools/css-extract.mdx +12 -0
- package/en/configure/app/tools/css-loader.mdx +12 -0
- package/en/configure/app/tools/dev-server.mdx +12 -0
- package/en/configure/app/tools/esbuild.mdx +40 -0
- package/en/configure/app/tools/html-plugin.mdx +12 -0
- package/en/configure/app/tools/inspector.mdx +12 -0
- package/en/configure/app/tools/jest.mdx +41 -0
- package/en/configure/app/tools/less.mdx +12 -0
- package/en/configure/app/tools/minify-css.mdx +12 -0
- package/en/configure/app/tools/postcss.mdx +12 -0
- package/en/configure/app/tools/pug.mdx +12 -0
- package/en/configure/app/tools/sass.mdx +12 -0
- package/en/configure/app/tools/style-loader.mdx +12 -0
- package/en/configure/app/tools/styled-components.mdx +12 -0
- package/en/configure/app/tools/swc.mdx +54 -0
- package/en/configure/app/tools/tailwindcss.mdx +43 -0
- package/en/configure/app/tools/terser.mdx +12 -0
- package/en/configure/app/tools/ts-checker.mdx +12 -0
- package/en/configure/app/tools/ts-loader.mdx +12 -0
- package/en/configure/app/tools/webpack-chain.mdx +12 -0
- package/en/configure/app/tools/webpack.mdx +12 -0
- package/en/configure/app/usage.mdx +93 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/advanced-features/bff/_category_.json +0 -0
- package/en/guides/advanced-features/bff/bff-proxy.mdx +30 -0
- package/en/guides/advanced-features/bff/frameworks.mdx +152 -0
- package/en/guides/advanced-features/bff/function.mdx +233 -0
- package/en/guides/advanced-features/bff/index.mdx +21 -0
- package/en/guides/advanced-features/bff/type.mdx +46 -0
- package/en/guides/advanced-features/code-split.mdx +80 -0
- package/en/guides/advanced-features/compatibility.mdx +79 -0
- package/en/guides/advanced-features/eslint.mdx +150 -0
- package/en/guides/advanced-features/index.mdx +7 -0
- package/en/guides/advanced-features/low-level.mdx +45 -0
- package/en/guides/advanced-features/ssg.mdx +117 -0
- package/en/guides/advanced-features/ssr.mdx +308 -0
- package/en/guides/advanced-features/testing.mdx +47 -0
- package/en/guides/advanced-features/web-server.mdx +58 -0
- package/en/guides/basic-features/alias.mdx +65 -0
- package/en/guides/basic-features/builder.mdx +47 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/basic-features/css/_category_.json +0 -0
- package/en/guides/basic-features/css/css-in-js.mdx +40 -0
- package/en/guides/basic-features/css/css-modules.mdx +87 -0
- package/en/guides/basic-features/css/less-sass.mdx +17 -0
- package/en/guides/basic-features/css/postcss.mdx +79 -0
- package/en/guides/basic-features/css/tailwindcss.mdx +91 -0
- package/en/guides/basic-features/data-fetch.mdx +391 -0
- package/en/guides/basic-features/env-vars.mdx +170 -0
- package/en/guides/basic-features/html.mdx +247 -0
- package/en/guides/basic-features/mock.mdx +79 -0
- package/en/guides/basic-features/proxy.mdx +61 -0
- package/en/guides/basic-features/routes.mdx +352 -0
- package/en/guides/concept/entries.mdx +120 -0
- package/en/guides/get-started/quick-start.mdx +162 -0
- package/en/guides/get-started/upgrade.mdx +81 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/framework-plugin/_category_.json +0 -0
- package/en/guides/topic-detail/framework-plugin/extend.mdx +163 -0
- package/en/guides/topic-detail/framework-plugin/hook-list.mdx +828 -0
- package/en/guides/topic-detail/framework-plugin/hook.mdx +173 -0
- package/en/guides/topic-detail/framework-plugin/implement.mdx +248 -0
- package/en/guides/topic-detail/framework-plugin/introduction.mdx +51 -0
- package/en/guides/topic-detail/framework-plugin/lifecycle.mdx +16 -0
- package/en/guides/topic-detail/framework-plugin/plugin-api.mdx +117 -0
- package/en/guides/topic-detail/framework-plugin/relationship.mdx +119 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/codesmith/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/codesmith/api/_category_.json +0 -0
- package/en/guides/topic-detail/generator/codesmith/api/app.mdx +152 -0
- package/en/guides/topic-detail/generator/codesmith/api/ejs.mdx +56 -0
- package/en/guides/topic-detail/generator/codesmith/api/fs.mdx +54 -0
- package/en/guides/topic-detail/generator/codesmith/api/git.mdx +50 -0
- package/en/guides/topic-detail/generator/codesmith/api/handlebars.mdx +57 -0
- package/en/guides/topic-detail/generator/codesmith/api/json.mdx +56 -0
- package/en/guides/topic-detail/generator/codesmith/api/npm.mdx +48 -0
- package/en/guides/topic-detail/generator/codesmith/develop.mdx +53 -0
- package/en/guides/topic-detail/generator/codesmith/introduce.mdx +47 -0
- package/en/guides/topic-detail/generator/codesmith/run-in-js.mdx +47 -0
- package/en/guides/topic-detail/generator/codesmith/structure.mdx +89 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/config/_category_.json +0 -0
- package/en/guides/topic-detail/generator/config/common.mdx +100 -0
- package/en/guides/topic-detail/generator/config/module.mdx +42 -0
- package/en/guides/topic-detail/generator/config/monorepo.mdx +28 -0
- package/en/guides/topic-detail/generator/config/mwa.mdx +82 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/_category_.json +0 -0
- package/en/guides/topic-detail/generator/plugin/abstract.mdx +23 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/file/_category_.json +0 -0
- package/en/guides/topic-detail/generator/plugin/api/file/addFile.mdx +52 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/addHelper.md → guides/topic-detail/generator/plugin/api/file/addHelper.mdx} +0 -0
- package/en/guides/topic-detail/generator/plugin/api/file/addManyFile.mdx +58 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/addPartial.md → guides/topic-detail/generator/plugin/api/file/addPartial.mdx} +0 -0
- package/en/guides/topic-detail/generator/plugin/api/file/introduce.mdx +39 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/rmDir.md → guides/topic-detail/generator/plugin/api/file/rmDir.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/rmFile.md → guides/topic-detail/generator/plugin/api/file/rmFile.mdx} +0 -0
- package/en/guides/topic-detail/generator/plugin/api/file/updateJSONFile.mdx +54 -0
- package/en/guides/topic-detail/generator/plugin/api/file/updateModernConfig.mdx +27 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/updateTextRawFile.md → guides/topic-detail/generator/plugin/api/file/updateTextRawFile.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/git/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/git/gitAddAndCommit.md → guides/topic-detail/generator/plugin/api/git/gitAddAndCommit.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/git/initGitRepo.md → guides/topic-detail/generator/plugin/api/git/initGitRepo.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/git/isInGitRepo.md → guides/topic-detail/generator/plugin/api/git/isInGitRepo.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/hook/_category_.json +0 -0
- package/en/guides/topic-detail/generator/plugin/api/hook/afterForged.mdx +35 -0
- package/en/guides/topic-detail/generator/plugin/api/hook/onForged.mdx +35 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/info/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/info/isFileExit.md → guides/topic-detail/generator/plugin/api/info/isFileExit.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/info/locale.md → guides/topic-detail/generator/plugin/api/info/locale.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/info/readDir.md → guides/topic-detail/generator/plugin/api/info/readDir.mdx} +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/input/_category_.json +0 -0
- package/en/guides/topic-detail/generator/plugin/api/input/addInputAfter.mdx +55 -0
- package/en/guides/topic-detail/generator/plugin/api/input/addInputBefore.mdx +55 -0
- package/en/guides/topic-detail/generator/plugin/api/input/setInput.mdx +43 -0
- package/en/guides/topic-detail/generator/plugin/api/input/setInputValue.mdx +31 -0
- package/en/guides/topic-detail/generator/plugin/api/input/type.mdx +65 -0
- package/en/guides/topic-detail/generator/plugin/api/introduce.mdx +90 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/new/_category_.json +0 -0
- package/en/guides/topic-detail/generator/plugin/api/new/createElement.mdx +33 -0
- package/en/guides/topic-detail/generator/plugin/api/new/createSubProject.mdx +35 -0
- package/en/guides/topic-detail/generator/plugin/api/new/enableFunc.mdx +44 -0
- package/en/guides/topic-detail/generator/plugin/api/new/introduce.mdx +15 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/generator/plugin/api/npm/_category_.json +0 -0
- package/en/{docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/npm/install.md → guides/topic-detail/generator/plugin/api/npm/install.mdx} +0 -0
- package/en/guides/topic-detail/generator/plugin/develop.mdx +125 -0
- package/en/guides/topic-detail/generator/plugin/use.mdx +61 -0
- package/en/guides/topic-detail/generator/project.mdx +118 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/micro-frontend/_category_.json +0 -0
- package/en/guides/topic-detail/micro-frontend/c01-introduction.mdx +29 -0
- package/en/guides/topic-detail/micro-frontend/c02-development.mdx +189 -0
- package/en/guides/topic-detail/micro-frontend/c03-main-app.mdx +245 -0
- package/en/guides/topic-detail/micro-frontend/c04-communicate.mdx +57 -0
- package/en/guides/topic-detail/micro-frontend/c05-mixed-stack.mdx +26 -0
- package/en/{docusaurus-plugin-content-docs/current/guides → guides}/topic-detail/model/_category_.json +0 -0
- package/en/guides/topic-detail/model/auto-actions.mdx +92 -0
- package/en/guides/topic-detail/model/computed-state.mdx +151 -0
- package/en/guides/topic-detail/model/define-model.mdx +66 -0
- package/en/guides/topic-detail/model/faq.mdx +41 -0
- package/en/guides/topic-detail/model/manage-effects.mdx +260 -0
- package/en/guides/topic-detail/model/model-communicate.mdx +220 -0
- package/en/guides/topic-detail/model/performance.mdx +171 -0
- package/en/guides/topic-detail/model/quick-start.mdx +113 -0
- package/en/guides/topic-detail/model/redux-integration.mdx +24 -0
- package/en/guides/topic-detail/model/test-model.mdx +45 -0
- package/en/guides/topic-detail/model/typescript-best-practice.mdx +71 -0
- package/en/guides/topic-detail/model/use-model.mdx +252 -0
- package/en/guides/topic-detail/model/use-out-of-modernjs.mdx +50 -0
- package/en/guides/troubleshooting/_category_.json +5 -0
- package/en/guides/troubleshooting/cli.mdx +63 -0
- package/en/index.md +4 -0
- package/en/{docusaurus-plugin-content-docs/current/tutorials → tutorials}/first-app/_category_.json +0 -0
- package/en/tutorials/first-app/c01-start.mdx +100 -0
- package/en/tutorials/first-app/c02-component.mdx +59 -0
- package/en/tutorials/first-app/c03-css.mdx +324 -0
- package/en/tutorials/first-app/c04-routes.mdx +170 -0
- package/en/tutorials/first-app/c05-loader.mdx +85 -0
- package/en/tutorials/first-app/c06-model.mdx +275 -0
- package/en/tutorials/first-app/c07-container.mdx +282 -0
- package/en/tutorials/first-app/c08-entries.mdx +136 -0
- package/en/{docusaurus-plugin-content-docs/current/tutorials → tutorials}/foundations/_category_.json +0 -0
- package/en/tutorials/foundations/introduction.mdx +47 -0
- package/package.json +5 -4
- package/scripts/config.ts +7 -12
- package/scripts/summary.en.json +1 -1
- package/scripts/summary.zh.json +1 -1
- package/scripts/sync.ts +1 -1
- package/zh/apis/app/commands/_category_.json +1 -1
- package/zh/apis/app/commands/build.mdx +39 -0
- package/zh/apis/app/commands/dev.mdx +61 -0
- package/zh/apis/app/commands/index.mdx +7 -0
- package/zh/apis/app/commands/inspect.mdx +61 -0
- package/zh/apis/app/commands/lint.mdx +19 -0
- package/zh/apis/app/commands/new.mdx +54 -0
- package/zh/apis/app/commands/serve.mdx +27 -0
- package/zh/apis/app/commands/test.mdx +35 -0
- package/zh/apis/app/commands/upgrade.mdx +18 -0
- package/zh/apis/app/hooks/api/framework/lambda.mdx +57 -0
- package/zh/apis/app/hooks/api/functions/api.mdx +80 -0
- package/zh/apis/app/hooks/api/functions/app.mdx +12 -0
- package/zh/apis/app/hooks/api/functions/common.mdx +9 -0
- package/zh/apis/app/hooks/api/test.mdx +12 -0
- package/zh/apis/app/hooks/config/html.mdx +9 -0
- package/zh/apis/app/hooks/config/icon.mdx +18 -0
- package/zh/apis/app/hooks/config/mock.mdx +7 -0
- package/zh/apis/app/hooks/config/public.mdx +30 -0
- package/zh/apis/app/hooks/config/storybook.mdx +14 -0
- package/zh/apis/app/hooks/config/upload.mdx +44 -0
- package/zh/apis/app/hooks/index.mdx +7 -0
- package/zh/apis/app/hooks/modern-config.mdx +9 -0
- package/zh/apis/app/hooks/server/index_.mdx +14 -0
- package/zh/apis/app/hooks/server/test.mdx +14 -0
- package/zh/apis/app/hooks/shared.mdx +7 -0
- package/zh/apis/app/hooks/src/app.mdx +54 -0
- package/zh/apis/app/hooks/src/index_.mdx +35 -0
- package/zh/apis/app/hooks/src/pages.mdx +183 -0
- package/zh/apis/app/hooks/src/routes.mdx +90 -0
- package/zh/apis/app/hooks/src/server.mdx +34 -0
- package/zh/apis/app/hooks/src/stories.mdx +16 -0
- package/zh/apis/app/hooks/src/test.mdx +14 -0
- package/zh/apis/app/runtime/app/define-config.mdx +62 -0
- package/zh/apis/app/runtime/bff/hook.mdx +44 -0
- package/zh/apis/app/runtime/bff/use-context.mdx +38 -0
- package/zh/apis/app/runtime/core/bootstrap.mdx +70 -0
- package/zh/apis/app/runtime/core/create-app.mdx +31 -0
- package/zh/apis/app/runtime/core/use-loader.mdx +85 -0
- package/zh/apis/app/runtime/core/use-module-apps.mdx +138 -0
- package/zh/apis/app/runtime/core/use-runtime-context.mdx +59 -0
- package/zh/apis/app/runtime/index.mdx +7 -0
- package/zh/apis/app/runtime/model/Provider.mdx +36 -0
- package/zh/apis/app/runtime/model/auto-actions.mdx +122 -0
- package/zh/apis/app/runtime/model/connect.mdx +143 -0
- package/zh/apis/app/runtime/model/create-app.mdx +75 -0
- package/zh/apis/app/runtime/model/create-store.mdx +61 -0
- package/zh/apis/app/runtime/model/handle-effect.mdx +107 -0
- package/zh/apis/app/runtime/model/model_.mdx +199 -0
- package/zh/apis/app/runtime/model/use-local-model.mdx +29 -0
- package/zh/apis/app/runtime/model/use-model.mdx +89 -0
- package/zh/apis/app/runtime/model/use-static-model.mdx +49 -0
- package/zh/apis/app/runtime/model/use-store.mdx +26 -0
- package/zh/apis/app/runtime/router/router.mdx +262 -0
- package/zh/apis/app/runtime/ssr/no-ssr.mdx +38 -0
- package/zh/apis/app/runtime/ssr/pre-render.mdx +96 -0
- package/zh/apis/app/runtime/testing/act.mdx +35 -0
- package/zh/apis/app/runtime/testing/cleanup.mdx +40 -0
- package/zh/apis/app/runtime/testing/render.mdx +71 -0
- package/zh/apis/app/runtime/testing/renderApp.mdx +32 -0
- package/zh/apis/app/runtime/utility/css-in-js.mdx +43 -0
- package/zh/apis/app/runtime/utility/head.mdx +38 -0
- package/zh/apis/app/runtime/utility/loadable.mdx +83 -0
- package/zh/apis/app/runtime/web-server/hook.mdx +134 -0
- package/zh/apis/app/runtime/web-server/middleware.mdx +111 -0
- package/zh/apis/monorepo/commands/bump.mdx +39 -0
- package/zh/apis/monorepo/commands/change.mdx +57 -0
- package/zh/apis/monorepo/commands/clear.mdx +24 -0
- package/zh/apis/monorepo/commands/deploy.mdx +38 -0
- package/zh/apis/monorepo/commands/gen-release-note.mdx +32 -0
- package/zh/apis/monorepo/commands/index.mdx +7 -0
- package/zh/apis/monorepo/commands/lint.mdx +18 -0
- package/zh/apis/monorepo/commands/new.mdx +39 -0
- package/zh/apis/monorepo/commands/pre.mdx +65 -0
- package/zh/apis/monorepo/commands/release.mdx +16 -0
- package/zh/apis/monorepo/commands/upgrade.mdx +20 -0
- package/zh/apis/monorepo/hooks/apps.mdx +14 -0
- package/zh/apis/monorepo/hooks/code-workspace.mdx +11 -0
- package/zh/apis/monorepo/hooks/examples.mdx +16 -0
- package/zh/apis/monorepo/hooks/features.mdx +16 -0
- package/zh/apis/monorepo/hooks/index.mdx +7 -0
- package/zh/apis/monorepo/hooks/packages.mdx +16 -0
- package/zh/apis/monorepo/hooks/pnpm-workspace.mdx +11 -0
- package/zh/apis/monorepo/hooks/pnpmfile.mdx +11 -0
- package/zh/blog/index.md +6 -0
- package/zh/community/{index.md → index.mdx} +0 -0
- package/zh/components/{debug-app.md → debug-app.mdx} +0 -0
- package/zh/components/{default-mwa-generate.md → default-mwa-generate.mdx} +0 -0
- package/zh/components/{deploy.md → deploy.mdx} +0 -0
- package/zh/components/enable-bff.mdx +31 -0
- package/zh/components/enable-micro-frontend.mdx +13 -0
- package/zh/components/global-proxy-config.mdx +70 -0
- package/zh/components/global-proxy.mdx +27 -0
- package/zh/components/init-app.mdx +44 -0
- package/zh/components/micro-master-manifest-config.mdx +15 -0
- package/zh/components/micro-runtime-config.mdx +18 -0
- package/zh/components/prerequisites.mdx +20 -0
- package/zh/components/reduck-migration.mdx +0 -0
- package/zh/components/reduck-tip.mdx +8 -0
- package/zh/components/{release-note.md → release-note.mdx} +0 -0
- package/zh/components/router-legacy-tip.mdx +0 -0
- package/zh/components/self-route-example.mdx +21 -0
- package/zh/configure/app/auto-load-plugin.mdx +62 -0
- package/zh/configure/app/bff/prefix.mdx +34 -0
- package/zh/configure/app/bff/proxy.mdx +74 -0
- package/zh/configure/app/builder-plugins.mdx +73 -0
- package/zh/configure/app/deploy/microFrontend.mdx +55 -0
- package/zh/configure/app/dev/asset-prefix.mdx +12 -0
- package/zh/configure/app/dev/hmr.mdx +12 -0
- package/zh/configure/app/dev/https.mdx +12 -0
- package/zh/configure/app/dev/port.mdx +12 -0
- package/zh/configure/app/dev/progress-bar.mdx +12 -0
- package/zh/configure/app/dev/proxy.mdx +9 -0
- package/zh/configure/app/dev/start-url.mdx +12 -0
- package/zh/configure/app/experiments/lazy-compilation.mdx +12 -0
- package/zh/configure/app/html/app-icon.mdx +12 -0
- package/zh/configure/app/html/crossorigin.mdx +12 -0
- package/zh/configure/app/html/disable-html-folder.mdx +12 -0
- package/zh/configure/app/html/favicon-by-entries.mdx +12 -0
- package/zh/configure/app/html/favicon.mdx +12 -0
- package/zh/configure/app/html/inject-by-entries.mdx +12 -0
- package/zh/configure/app/html/inject.mdx +12 -0
- package/zh/configure/app/html/meta-by-entries.mdx +12 -0
- package/zh/configure/app/html/meta.mdx +12 -0
- package/zh/configure/app/html/mount-id.mdx +12 -0
- package/zh/configure/app/html/tags-by-entries.mdx +12 -0
- package/zh/configure/app/html/tags.mdx +12 -0
- package/zh/configure/app/html/template-by-entries.mdx +12 -0
- package/zh/configure/app/html/template-parameters-by-entries.mdx +12 -0
- package/zh/configure/app/html/template-parameters.mdx +12 -0
- package/zh/configure/app/html/template.mdx +12 -0
- package/zh/configure/app/html/title-by-entries.mdx +12 -0
- package/zh/configure/app/html/title.mdx +12 -0
- package/zh/configure/app/output/asset-prefix.mdx +12 -0
- package/zh/configure/app/output/assets-retry.mdx +12 -0
- package/zh/configure/app/output/charset.mdx +12 -0
- package/zh/configure/app/output/clean-dist-path.mdx +12 -0
- package/zh/configure/app/output/convert-to-rem.mdx +12 -0
- package/zh/configure/app/output/copy.mdx +12 -0
- package/zh/configure/app/output/css-module-local-ident-name.mdx +12 -0
- package/zh/configure/app/output/data-uri-limit.mdx +12 -0
- package/zh/configure/app/output/disable-css-extract.mdx +12 -0
- package/zh/configure/app/output/disable-css-module-extension.mdx +12 -0
- package/zh/configure/app/output/disable-filename-hash.mdx +12 -0
- package/zh/configure/app/output/disable-inline-runtime-chunk.mdx +12 -0
- package/zh/configure/app/output/disable-minimize.mdx +12 -0
- package/zh/configure/app/output/disable-node-polyfill.mdx +22 -0
- package/zh/configure/app/output/disable-source-map.mdx +12 -0
- package/zh/configure/app/output/disable-ts-checker.mdx +12 -0
- package/zh/configure/app/output/dist-path.mdx +12 -0
- package/zh/configure/app/output/enable-asset-fallback.mdx +12 -0
- package/zh/configure/app/output/enable-asset-manifest.mdx +12 -0
- package/zh/configure/app/output/enable-css-module-tsdeclaration.mdx +12 -0
- package/zh/configure/app/output/enable-inline-scripts.mdx +12 -0
- package/zh/configure/app/output/enable-inline-styles.mdx +12 -0
- package/zh/configure/app/output/enable-latest-decorators.mdx +12 -0
- package/zh/configure/app/output/externals.mdx +12 -0
- package/zh/configure/app/output/filename.mdx +12 -0
- package/zh/configure/app/output/legal-comments.mdx +12 -0
- package/zh/configure/app/output/override-browserslist.mdx +12 -0
- package/zh/configure/app/output/polyfill.mdx +12 -0
- package/zh/configure/app/output/ssg.mdx +196 -0
- package/zh/configure/app/output/svg-default-export.mdx +12 -0
- package/zh/configure/app/performance/build-cache.mdx +12 -0
- package/zh/configure/app/performance/bundle-analyze.mdx +12 -0
- package/zh/configure/app/performance/chunk-split.mdx +12 -0
- package/zh/configure/app/performance/print-file-size.mdx +12 -0
- package/zh/configure/app/performance/profile.mdx +12 -0
- package/zh/configure/app/performance/remove-console.mdx +12 -0
- package/zh/configure/app/performance/remove-moment-locale.mdx +12 -0
- package/zh/configure/app/plugins.mdx +81 -0
- package/zh/configure/app/runtime/intro.mdx +120 -0
- package/zh/configure/app/runtime/master-app.mdx +42 -0
- package/zh/configure/app/runtime/router.mdx +35 -0
- package/zh/configure/app/runtime/state.mdx +54 -0
- package/zh/configure/app/security/sri.mdx +12 -0
- package/zh/configure/app/server/base-url.mdx +32 -0
- package/zh/configure/app/server/enable-framework-ext.mdx +49 -0
- package/zh/configure/app/server/port.mdx +38 -0
- package/zh/configure/app/server/public-routes.mdx +26 -0
- package/zh/configure/app/server/routes.mdx +90 -0
- package/zh/configure/app/server/ssr-by-entries.mdx +29 -0
- package/zh/configure/app/server/ssr.mdx +20 -0
- package/zh/configure/app/source/alias.mdx +12 -0
- package/zh/configure/app/source/compile-js-data-uri.mdx +12 -0
- package/zh/configure/app/source/config-dir.mdx +24 -0
- package/zh/configure/app/source/define.mdx +12 -0
- package/zh/configure/app/source/design-system.mdx +1175 -0
- package/zh/configure/app/source/disable-default-entries.mdx +31 -0
- package/zh/configure/app/source/disable-entry-dirs.mdx +39 -0
- package/zh/configure/app/source/enable-async-entry.mdx +55 -0
- package/zh/configure/app/source/entries-dir.mdx +40 -0
- package/zh/configure/app/source/entries.mdx +123 -0
- package/zh/configure/app/source/exclude.mdx +12 -0
- package/zh/configure/app/source/global-vars.mdx +12 -0
- package/zh/configure/app/source/include.mdx +12 -0
- package/zh/configure/app/source/module-scopes.mdx +12 -0
- package/zh/configure/app/source/pre-entry.mdx +12 -0
- package/zh/configure/app/source/resolve-extension-prefix.mdx +12 -0
- package/zh/configure/app/source/resolve-main-fields.mdx +12 -0
- package/zh/configure/app/testing/transformer.mdx +16 -0
- package/zh/configure/app/tools/autoprefixer.mdx +12 -0
- package/zh/configure/app/tools/babel.mdx +12 -0
- package/zh/configure/app/tools/css-extract.mdx +12 -0
- package/zh/configure/app/tools/css-loader.mdx +12 -0
- package/zh/configure/app/tools/dev-server.mdx +12 -0
- package/zh/configure/app/tools/esbuild.mdx +40 -0
- package/zh/configure/app/tools/html-plugin.mdx +12 -0
- package/zh/configure/app/tools/inspector.mdx +12 -0
- package/zh/configure/app/tools/jest.mdx +41 -0
- package/zh/configure/app/tools/less.mdx +12 -0
- package/zh/configure/app/tools/minify-css.mdx +12 -0
- package/zh/configure/app/tools/postcss.mdx +12 -0
- package/zh/configure/app/tools/pug.mdx +12 -0
- package/zh/configure/app/tools/sass.mdx +12 -0
- package/zh/configure/app/tools/style-loader.mdx +12 -0
- package/zh/configure/app/tools/styled-components.mdx +12 -0
- package/zh/configure/app/tools/swc.mdx +54 -0
- package/zh/configure/app/tools/tailwindcss.mdx +43 -0
- package/zh/configure/app/tools/terser.mdx +12 -0
- package/zh/configure/app/tools/ts-checker.mdx +12 -0
- package/zh/configure/app/tools/ts-loader.mdx +12 -0
- package/zh/configure/app/tools/webpack-chain.mdx +12 -0
- package/zh/configure/app/tools/webpack.mdx +12 -0
- package/zh/configure/app/usage.mdx +93 -0
- package/zh/guides/advanced-features/bff/bff-proxy.mdx +30 -0
- package/zh/guides/advanced-features/bff/frameworks.mdx +152 -0
- package/zh/guides/advanced-features/bff/function.mdx +253 -0
- package/zh/guides/advanced-features/bff/index.mdx +21 -0
- package/zh/guides/advanced-features/bff/type.mdx +46 -0
- package/zh/guides/advanced-features/code-split.mdx +80 -0
- package/zh/guides/advanced-features/compatibility.mdx +77 -0
- package/zh/guides/advanced-features/eslint.mdx +152 -0
- package/zh/guides/advanced-features/index.mdx +7 -0
- package/zh/guides/advanced-features/low-level.mdx +43 -0
- package/zh/guides/advanced-features/ssg.mdx +117 -0
- package/zh/guides/advanced-features/ssr.mdx +294 -0
- package/zh/guides/advanced-features/testing.mdx +48 -0
- package/zh/guides/advanced-features/web-server.mdx +58 -0
- package/zh/guides/basic-features/alias.mdx +65 -0
- package/zh/guides/basic-features/builder.mdx +47 -0
- package/zh/guides/basic-features/css/css-in-js.mdx +40 -0
- package/zh/guides/basic-features/css/css-modules.mdx +87 -0
- package/zh/guides/basic-features/css/less-sass.mdx +17 -0
- package/zh/guides/basic-features/css/postcss.mdx +79 -0
- package/zh/guides/basic-features/css/tailwindcss.mdx +102 -0
- package/zh/guides/basic-features/data-fetch.mdx +386 -0
- package/zh/guides/basic-features/env-vars.mdx +168 -0
- package/zh/guides/basic-features/html.mdx +247 -0
- package/zh/guides/basic-features/index.mdx +7 -0
- package/zh/guides/basic-features/mock.mdx +79 -0
- package/zh/guides/basic-features/proxy.mdx +61 -0
- package/zh/guides/basic-features/routes.mdx +423 -0
- package/zh/guides/concept/entries.mdx +210 -0
- package/zh/guides/get-started/quick-start.mdx +132 -0
- package/zh/guides/get-started/upgrade.mdx +83 -0
- package/zh/guides/topic-detail/changesets/add.mdx +124 -0
- package/zh/guides/topic-detail/changesets/changelog.mdx +238 -0
- package/zh/guides/topic-detail/changesets/commit.mdx +271 -0
- package/zh/guides/topic-detail/changesets/config.mdx +147 -0
- package/zh/guides/topic-detail/changesets/github.mdx +164 -0
- package/zh/guides/topic-detail/changesets/introduce.mdx +56 -0
- package/zh/guides/topic-detail/changesets/release-note.mdx +259 -0
- package/zh/guides/topic-detail/changesets/release-pre.mdx +50 -0
- package/zh/guides/topic-detail/changesets/release.mdx +231 -0
- package/zh/guides/topic-detail/framework-plugin/extend.mdx +163 -0
- package/zh/guides/topic-detail/framework-plugin/hook-list.mdx +829 -0
- package/zh/guides/topic-detail/framework-plugin/hook.mdx +173 -0
- package/zh/guides/topic-detail/framework-plugin/implement.mdx +248 -0
- package/zh/guides/topic-detail/framework-plugin/introduction.mdx +51 -0
- package/zh/guides/topic-detail/framework-plugin/lifecycle.mdx +16 -0
- package/zh/guides/topic-detail/framework-plugin/plugin-api.mdx +117 -0
- package/zh/guides/topic-detail/framework-plugin/relationship.mdx +119 -0
- package/zh/guides/topic-detail/generator/codesmith/api/app.mdx +152 -0
- package/zh/guides/topic-detail/generator/codesmith/api/ejs.mdx +56 -0
- package/zh/guides/topic-detail/generator/codesmith/api/fs.mdx +54 -0
- package/zh/guides/topic-detail/generator/codesmith/api/git.mdx +49 -0
- package/zh/guides/topic-detail/generator/codesmith/api/handlebars.mdx +56 -0
- package/zh/guides/topic-detail/generator/codesmith/api/json.mdx +56 -0
- package/zh/guides/topic-detail/generator/codesmith/api/npm.mdx +47 -0
- package/zh/guides/topic-detail/generator/codesmith/develop.mdx +53 -0
- package/zh/guides/topic-detail/generator/codesmith/introduce.mdx +59 -0
- package/zh/guides/topic-detail/generator/codesmith/run-in-js.mdx +47 -0
- package/zh/guides/topic-detail/generator/codesmith/structure.mdx +89 -0
- package/zh/guides/topic-detail/generator/config/common.mdx +100 -0
- package/zh/guides/topic-detail/generator/config/module.mdx +42 -0
- package/zh/guides/topic-detail/generator/config/monorepo.mdx +28 -0
- package/zh/guides/topic-detail/generator/config/mwa.mdx +82 -0
- package/zh/guides/topic-detail/generator/plugin/abstract.mdx +23 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/addFile.mdx +52 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/{addHelper.md → addHelper.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/addManyFile.mdx +55 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/{addPartial.md → addPartial.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/introduce.mdx +39 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/{rmDir.md → rmDir.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/{rmFile.md → rmFile.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/updateJSONFile.mdx +54 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/updateModernConfig.mdx +27 -0
- package/zh/guides/topic-detail/generator/plugin/api/file/{updateTextRawFile.md → updateTextRawFile.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/git/{gitAddAndCommit.md → gitAddAndCommit.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/git/{initGitRepo.md → initGitRepo.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/git/{isInGitRepo.md → isInGitRepo.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/hook/afterForged.mdx +35 -0
- package/zh/guides/topic-detail/generator/plugin/api/hook/onForged.mdx +35 -0
- package/zh/guides/topic-detail/generator/plugin/api/info/{isFileExit.md → isFileExit.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/info/locale.mdx +17 -0
- package/zh/guides/topic-detail/generator/plugin/api/info/{readDir.md → readDir.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/api/input/addInputAfter.mdx +57 -0
- package/zh/guides/topic-detail/generator/plugin/api/input/addInputBefore.mdx +56 -0
- package/zh/guides/topic-detail/generator/plugin/api/input/setInput.mdx +43 -0
- package/zh/guides/topic-detail/generator/plugin/api/input/setInputValue.mdx +29 -0
- package/zh/guides/topic-detail/generator/plugin/api/input/type.mdx +65 -0
- package/zh/guides/topic-detail/generator/plugin/api/introduce.mdx +92 -0
- package/zh/guides/topic-detail/generator/plugin/api/new/createElement.mdx +33 -0
- package/zh/guides/topic-detail/generator/plugin/api/new/createSubProject.mdx +35 -0
- package/zh/guides/topic-detail/generator/plugin/api/new/enableFunc.mdx +44 -0
- package/zh/guides/topic-detail/generator/plugin/api/new/introduce.mdx +15 -0
- package/zh/guides/topic-detail/generator/plugin/api/npm/{install.md → install.mdx} +0 -0
- package/zh/guides/topic-detail/generator/plugin/develop.mdx +125 -0
- package/zh/guides/topic-detail/generator/plugin/use.mdx +61 -0
- package/zh/guides/topic-detail/generator/project.mdx +118 -0
- package/zh/guides/topic-detail/micro-frontend/c01-introduction.mdx +29 -0
- package/zh/guides/topic-detail/micro-frontend/c02-development.mdx +189 -0
- package/zh/guides/topic-detail/micro-frontend/c03-main-app.mdx +245 -0
- package/zh/guides/topic-detail/micro-frontend/c04-communicate.mdx +57 -0
- package/zh/guides/topic-detail/micro-frontend/c05-mixed-stack.mdx +26 -0
- package/zh/guides/topic-detail/model/auto-actions.mdx +92 -0
- package/zh/guides/topic-detail/model/computed-state.mdx +151 -0
- package/zh/guides/topic-detail/model/define-model.mdx +66 -0
- package/zh/guides/topic-detail/model/faq.mdx +41 -0
- package/zh/guides/topic-detail/model/manage-effects.mdx +260 -0
- package/zh/guides/topic-detail/model/model-communicate.mdx +220 -0
- package/zh/guides/topic-detail/model/performance.mdx +171 -0
- package/zh/guides/topic-detail/model/quick-start.mdx +113 -0
- package/zh/guides/topic-detail/model/redux-integration.mdx +24 -0
- package/zh/guides/topic-detail/model/test-model.mdx +45 -0
- package/zh/guides/topic-detail/model/typescript-best-practice.mdx +71 -0
- package/zh/guides/topic-detail/model/use-model.mdx +252 -0
- package/zh/guides/topic-detail/model/use-out-of-modernjs.mdx +50 -0
- package/zh/guides/topic-detail/monorepo/create-sub-project.mdx +67 -0
- package/zh/guides/topic-detail/monorepo/intro.mdx +14 -0
- package/zh/guides/topic-detail/monorepo/publish.mdx +69 -0
- package/zh/guides/topic-detail/monorepo/sub-project-interface.mdx +179 -0
- package/zh/guides/troubleshooting/cli.mdx +63 -0
- package/zh/guides/troubleshooting/{dependencies.md → dependencies.mdx} +0 -0
- package/zh/index.md +4 -0
- package/zh/tutorials/first-app/c01-start.mdx +100 -0
- package/zh/tutorials/first-app/c02-component.mdx +59 -0
- package/zh/tutorials/first-app/c03-css.mdx +324 -0
- package/zh/tutorials/first-app/c04-routes.mdx +170 -0
- package/zh/tutorials/first-app/c05-loader.mdx +85 -0
- package/zh/tutorials/first-app/c06-model.mdx +275 -0
- package/zh/tutorials/first-app/c07-container.mdx +282 -0
- package/zh/tutorials/first-app/c08-entries.mdx +136 -0
- package/zh/tutorials/foundations/introduction.mdx +45 -0
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/_category_.json +0 -8
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/build.md +0 -44
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/dev.md +0 -36
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/index.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/inspect.md +0 -60
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/lint.md +0 -22
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/new.md +0 -56
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/serve.md +0 -32
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/test.md +0 -36
- package/en/docusaurus-plugin-content-docs/current/apis/app/commands/upgrade.md +0 -21
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/framework/lambda.md +0 -54
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/api.md +0 -78
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/app.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/common.md +0 -10
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/test.md +0 -10
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/config/html.md +0 -8
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/config/icon.md +0 -15
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/config/mock.md +0 -6
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/config/public.md +0 -28
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/config/storybook.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/config/upload.md +0 -42
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/modern-config.md +0 -8
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/server/index_.md +0 -14
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/server/test.md +0 -10
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/shared.md +0 -6
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/app.md +0 -45
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/index_.md +0 -34
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/pages.md +0 -180
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/routes.md +0 -86
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/server.md +0 -31
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/stories.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/test.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/app/define-config.md +0 -60
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/bff/hook.md +0 -43
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/bff/use-context.md +0 -36
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/bootstrap.md +0 -70
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/create-app.md +0 -46
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-loader.md +0 -83
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-module-apps.md +0 -132
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-runtime-context.md +0 -59
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/index.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/Provider.md +0 -35
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/auto-actions.md +0 -120
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/connect.md +0 -140
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/create-app.md +0 -73
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/create-store.md +0 -62
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/handle-effect.md +0 -105
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/model_.md +0 -197
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-local-model.md +0 -27
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-model.md +0 -89
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-static-model.md +0 -49
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-store.md +0 -26
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/router/router.md +0 -291
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/ssr/no-ssr.md +0 -44
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/ssr/pre-render.md +0 -91
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/testing/act.md +0 -34
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/testing/cleanup.md +0 -38
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/testing/render.md +0 -72
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/testing/renderApp.md +0 -33
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/css-in-js.md +0 -42
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/head.md +0 -39
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/loadable.md +0 -85
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/web-server/hook.md +0 -131
- package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/web-server/middleware.md +0 -106
- package/en/docusaurus-plugin-content-docs/current/components/command-tip.md +0 -56
- package/en/docusaurus-plugin-content-docs/current/components/enable-bff.md +0 -36
- package/en/docusaurus-plugin-content-docs/current/components/enable-micro-frontend.md +0 -13
- package/en/docusaurus-plugin-content-docs/current/components/global-proxy-config.md +0 -74
- package/en/docusaurus-plugin-content-docs/current/components/global-proxy.md +0 -28
- package/en/docusaurus-plugin-content-docs/current/components/init-app.md +0 -42
- package/en/docusaurus-plugin-content-docs/current/components/micro-master-manifest-config.md +0 -15
- package/en/docusaurus-plugin-content-docs/current/components/micro-runtime-config.md +0 -18
- package/en/docusaurus-plugin-content-docs/current/components/prerequisites.md +0 -19
- package/en/docusaurus-plugin-content-docs/current/components/reduck-migration.md +0 -1
- package/en/docusaurus-plugin-content-docs/current/components/reduck-tip.md +0 -5
- package/en/docusaurus-plugin-content-docs/current/components/router-legacy-tip.md +0 -1
- package/en/docusaurus-plugin-content-docs/current/configure/app/auto-load-plugin.md +0 -62
- package/en/docusaurus-plugin-content-docs/current/configure/app/bff/prefix.md +0 -33
- package/en/docusaurus-plugin-content-docs/current/configure/app/bff/proxy.md +0 -75
- package/en/docusaurus-plugin-content-docs/current/configure/app/builder-plugins.md +0 -70
- package/en/docusaurus-plugin-content-docs/current/configure/app/deploy/microFrontend.md +0 -54
- package/en/docusaurus-plugin-content-docs/current/configure/app/dev/asset-prefix.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/dev/hmr.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/dev/https.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/dev/port.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/dev/progress-bar.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/dev/proxy.md +0 -10
- package/en/docusaurus-plugin-content-docs/current/configure/app/dev/start-url.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/experiments/lazy-compilation.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/app-icon.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/crossorigin.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/disable-html-folder.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon-by-entries.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject-by-entries.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta-by-entries.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/mount-id.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-by-entries.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters-by-entries.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/template.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/title-by-entries.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/html/title.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/asset-prefix.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/assets-retry.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/charset.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/clean-dist-path.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/convert-to-rem.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/copy.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/css-module-local-ident-name.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/data-uri-limit.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-extract.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-module-extension.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-filename-hash.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-inline-runtime-chunk.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-minimize.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-node-polyfill.md +0 -20
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-source-map.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-ts-checker.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/dist-path.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-fallback.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-manifest.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-css-module-tsdeclaration.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-scripts.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-styles.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-latest-decorators.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/externals.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/filename.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/legal-comments.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/override-browserslist.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/polyfill.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/ssg.md +0 -226
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/svg-default-export.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/performance/build-cache.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/performance/bundle-analyze.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/performance/chunk-split.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/performance/print-file-size.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/performance/profile.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-console.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-moment-locale.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/plugins.md +0 -80
- package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/intro.md +0 -91
- package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/master-app.md +0 -41
- package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/router.md +0 -32
- package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/state.md +0 -54
- package/en/docusaurus-plugin-content-docs/current/configure/app/security/sri.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/server/base-url.md +0 -33
- package/en/docusaurus-plugin-content-docs/current/configure/app/server/enable-framework-ext.md +0 -47
- package/en/docusaurus-plugin-content-docs/current/configure/app/server/port.md +0 -18
- package/en/docusaurus-plugin-content-docs/current/configure/app/server/public-routes.md +0 -26
- package/en/docusaurus-plugin-content-docs/current/configure/app/server/routes.md +0 -89
- package/en/docusaurus-plugin-content-docs/current/configure/app/server/ssr-by-entries.md +0 -28
- package/en/docusaurus-plugin-content-docs/current/configure/app/server/ssr.md +0 -20
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/alias.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/compile-js-data-uri.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/config-dir.md +0 -23
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/define.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/design-system.md +0 -1150
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/disable-default-entries.md +0 -28
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/disable-entry-dirs.md +0 -38
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/enable-async-entry.md +0 -50
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/entries-dir.md +0 -38
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/entries.md +0 -124
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/exclude.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/global-vars.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/include.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/module-scopes.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/pre-entry.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-extension-prefix.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-main-fields.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/testing/transformer.md +0 -18
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/autoprefixer.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/babel.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-extract.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-loader.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/dev-server.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/esbuild.md +0 -38
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/html-plugin.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/inspector.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/jest.md +0 -39
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/less.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/minify-css.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/postcss.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/pug.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/sass.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/style-loader.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/styled-components.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/swc.md +0 -42
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/tailwindcss.md +0 -41
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/terser.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-checker.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-loader.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack-chain.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/configure/app/usage.md +0 -92
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/bff-proxy.md +0 -27
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/frameworks.md +0 -150
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/function.md +0 -222
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/index.md +0 -20
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/type.md +0 -43
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/code-split.md +0 -77
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/compatibility.md +0 -76
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/eslint.md +0 -145
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/index.md +0 -12
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/low-level.md +0 -46
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssg.md +0 -132
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssr.md +0 -306
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/testing.md +0 -46
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/web-server.md +0 -57
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/alias.md +0 -67
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/builder.md +0 -46
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-in-js.md +0 -38
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-modules.md +0 -86
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/less-sass.md +0 -17
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/postcss.md +0 -81
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/tailwindcss.md +0 -90
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/data-fetch.md +0 -466
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/env-vars.md +0 -166
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/html.md +0 -235
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/mock.md +0 -78
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/proxy.md +0 -60
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/routes.md +0 -268
- package/en/docusaurus-plugin-content-docs/current/guides/concept/entries.md +0 -116
- package/en/docusaurus-plugin-content-docs/current/guides/get-started/quick-start.md +0 -160
- package/en/docusaurus-plugin-content-docs/current/guides/get-started/upgrade.md +0 -78
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/extend.md +0 -162
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook-list.md +0 -803
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook.md +0 -169
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/implement.md +0 -247
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/introduction.md +0 -49
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/lifecycle.md +0 -15
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/plugin-api.md +0 -116
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/relationship.md +0 -118
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/app.md +0 -152
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/ejs.md +0 -56
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/fs.md +0 -54
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/git.md +0 -49
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/handlebars.md +0 -58
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/json.md +0 -59
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/npm.md +0 -49
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/develop.md +0 -52
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/introduce.md +0 -46
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/run-in-js.md +0 -48
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/structure.md +0 -87
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/common.md +0 -106
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/module.md +0 -41
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/monorepo.md +0 -28
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/mwa.md +0 -81
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/abstract.md +0 -26
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/addFile.md +0 -52
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/addManyFile.md +0 -58
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/introduce.md +0 -38
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/updateJSONFile.md +0 -54
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/updateModernConfig.md +0 -26
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/hook/afterForged.md +0 -35
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/hook/onForged.md +0 -36
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/addInputAfter.md +0 -57
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/addInputBefore.md +0 -56
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/setInput.md +0 -42
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/setInputValue.md +0 -30
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/type.md +0 -65
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/introduce.md +0 -91
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/new/createElement.md +0 -33
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/new/createSubProject.md +0 -35
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/new/enableFunc.md +0 -44
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/new/introduce.md +0 -15
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/develop.md +0 -125
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/use.md +0 -61
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/project.md +0 -118
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c01-introduction.md +0 -29
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c02-development.md +0 -191
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c03-main-app.md +0 -246
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c04-communicate.md +0 -54
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c05-mixed-stack.md +0 -24
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/auto-actions.md +0 -90
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/computed-state.md +0 -151
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/define-model.md +0 -66
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/faq.md +0 -43
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/manage-effects.md +0 -259
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/model-communicate.md +0 -219
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/performance.md +0 -173
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/quick-start.md +0 -116
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/redux-integration.md +0 -21
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/test-model.md +0 -43
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/typescript-best-practice.md +0 -71
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/use-model.md +0 -244
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/use-out-of-modernjs.md +0 -51
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c01-start.md +0 -99
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c02-component.md +0 -56
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c03-css.md +0 -323
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c04-routes.md +0 -169
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c05-loader.md +0 -82
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c06-model.md +0 -260
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c07-container.md +0 -282
- package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c08-entries.md +0 -136
- package/en/docusaurus-plugin-content-docs/current/tutorials/foundations/introduction.md +0 -45
- package/en/docusaurus-plugin-content-docs/current.json +0 -254
- package/zh/apis/app/commands/build.md +0 -44
- package/zh/apis/app/commands/dev.md +0 -36
- package/zh/apis/app/commands/index.md +0 -12
- package/zh/apis/app/commands/inspect.md +0 -60
- package/zh/apis/app/commands/lint.md +0 -22
- package/zh/apis/app/commands/new.md +0 -56
- package/zh/apis/app/commands/serve.md +0 -32
- package/zh/apis/app/commands/test.md +0 -36
- package/zh/apis/app/commands/upgrade.md +0 -21
- package/zh/apis/app/hooks/api/framework/lambda.md +0 -54
- package/zh/apis/app/hooks/api/functions/api.md +0 -77
- package/zh/apis/app/hooks/api/functions/app.md +0 -12
- package/zh/apis/app/hooks/api/functions/common.md +0 -8
- package/zh/apis/app/hooks/api/test.md +0 -10
- package/zh/apis/app/hooks/config/html.md +0 -8
- package/zh/apis/app/hooks/config/icon.md +0 -17
- package/zh/apis/app/hooks/config/mock.md +0 -6
- package/zh/apis/app/hooks/config/public.md +0 -28
- package/zh/apis/app/hooks/config/storybook.md +0 -12
- package/zh/apis/app/hooks/config/upload.md +0 -42
- package/zh/apis/app/hooks/index.md +0 -12
- package/zh/apis/app/hooks/modern-config.md +0 -8
- package/zh/apis/app/hooks/server/index_.md +0 -12
- package/zh/apis/app/hooks/server/test.md +0 -12
- package/zh/apis/app/hooks/shared.md +0 -7
- package/zh/apis/app/hooks/src/app.md +0 -45
- package/zh/apis/app/hooks/src/index_.md +0 -36
- package/zh/apis/app/hooks/src/pages.md +0 -182
- package/zh/apis/app/hooks/src/routes.md +0 -89
- package/zh/apis/app/hooks/src/server.md +0 -31
- package/zh/apis/app/hooks/src/stories.md +0 -14
- package/zh/apis/app/hooks/src/test.md +0 -12
- package/zh/apis/app/runtime/app/define-config.md +0 -61
- package/zh/apis/app/runtime/bff/hook.md +0 -43
- package/zh/apis/app/runtime/bff/use-context.md +0 -36
- package/zh/apis/app/runtime/core/bootstrap.md +0 -68
- package/zh/apis/app/runtime/core/create-app.md +0 -30
- package/zh/apis/app/runtime/core/use-loader.md +0 -83
- package/zh/apis/app/runtime/core/use-module-apps.md +0 -134
- package/zh/apis/app/runtime/core/use-runtime-context.md +0 -59
- package/zh/apis/app/runtime/index.md +0 -12
- package/zh/apis/app/runtime/model/Provider.md +0 -34
- package/zh/apis/app/runtime/model/auto-actions.md +0 -120
- package/zh/apis/app/runtime/model/connect.md +0 -137
- package/zh/apis/app/runtime/model/create-app.md +0 -73
- package/zh/apis/app/runtime/model/create-store.md +0 -62
- package/zh/apis/app/runtime/model/handle-effect.md +0 -106
- package/zh/apis/app/runtime/model/model_.md +0 -199
- package/zh/apis/app/runtime/model/use-local-model.md +0 -28
- package/zh/apis/app/runtime/model/use-model.md +0 -86
- package/zh/apis/app/runtime/model/use-static-model.md +0 -47
- package/zh/apis/app/runtime/model/use-store.md +0 -26
- package/zh/apis/app/runtime/router/router.md +0 -290
- package/zh/apis/app/runtime/ssr/no-ssr.md +0 -41
- package/zh/apis/app/runtime/ssr/pre-render.md +0 -91
- package/zh/apis/app/runtime/testing/act.md +0 -34
- package/zh/apis/app/runtime/testing/cleanup.md +0 -38
- package/zh/apis/app/runtime/testing/render.md +0 -72
- package/zh/apis/app/runtime/testing/renderApp.md +0 -31
- package/zh/apis/app/runtime/utility/css-in-js.md +0 -42
- package/zh/apis/app/runtime/utility/head.md +0 -39
- package/zh/apis/app/runtime/utility/loadable.md +0 -83
- package/zh/apis/app/runtime/web-server/hook.md +0 -131
- package/zh/apis/app/runtime/web-server/middleware.md +0 -107
- package/zh/apis/monorepo/commands/bump.md +0 -42
- package/zh/apis/monorepo/commands/change.md +0 -58
- package/zh/apis/monorepo/commands/clear.md +0 -27
- package/zh/apis/monorepo/commands/deploy.md +0 -39
- package/zh/apis/monorepo/commands/gen-release-note.md +0 -35
- package/zh/apis/monorepo/commands/index.md +0 -12
- package/zh/apis/monorepo/commands/lint.md +0 -21
- package/zh/apis/monorepo/commands/new.md +0 -41
- package/zh/apis/monorepo/commands/pre.md +0 -68
- package/zh/apis/monorepo/commands/release.md +0 -20
- package/zh/apis/monorepo/commands/upgrade.md +0 -23
- package/zh/apis/monorepo/hooks/apps.md +0 -12
- package/zh/apis/monorepo/hooks/code-workspace.md +0 -10
- package/zh/apis/monorepo/hooks/examples.md +0 -14
- package/zh/apis/monorepo/hooks/features.md +0 -14
- package/zh/apis/monorepo/hooks/index.md +0 -12
- package/zh/apis/monorepo/hooks/packages.md +0 -14
- package/zh/apis/monorepo/hooks/pnpm-workspace.md +0 -10
- package/zh/apis/monorepo/hooks/pnpmfile.md +0 -10
- package/zh/components/command-tip.md +0 -57
- package/zh/components/enable-bff.md +0 -36
- package/zh/components/enable-micro-frontend.md +0 -13
- package/zh/components/global-proxy-config.md +0 -70
- package/zh/components/global-proxy.md +0 -28
- package/zh/components/init-app.md +0 -44
- package/zh/components/micro-master-manifest-config.md +0 -15
- package/zh/components/micro-runtime-config.md +0 -18
- package/zh/components/prerequisites.md +0 -19
- package/zh/components/reduck-migration.md +0 -1
- package/zh/components/reduck-tip.md +0 -5
- package/zh/components/router-legacy-tip.md +0 -1
- package/zh/configure/app/auto-load-plugin.md +0 -62
- package/zh/configure/app/bff/prefix.md +0 -37
- package/zh/configure/app/bff/proxy.md +0 -71
- package/zh/configure/app/builder-plugins.md +0 -72
- package/zh/configure/app/deploy/microFrontend.md +0 -54
- package/zh/configure/app/dev/asset-prefix.md +0 -12
- package/zh/configure/app/dev/hmr.md +0 -12
- package/zh/configure/app/dev/https.md +0 -12
- package/zh/configure/app/dev/port.md +0 -12
- package/zh/configure/app/dev/progress-bar.md +0 -12
- package/zh/configure/app/dev/proxy.md +0 -10
- package/zh/configure/app/dev/start-url.md +0 -12
- package/zh/configure/app/experiments/lazy-compilation.md +0 -12
- package/zh/configure/app/html/app-icon.md +0 -12
- package/zh/configure/app/html/crossorigin.md +0 -12
- package/zh/configure/app/html/disable-html-folder.md +0 -12
- package/zh/configure/app/html/favicon-by-entries.md +0 -12
- package/zh/configure/app/html/favicon.md +0 -12
- package/zh/configure/app/html/inject-by-entries.md +0 -12
- package/zh/configure/app/html/inject.md +0 -12
- package/zh/configure/app/html/meta-by-entries.md +0 -12
- package/zh/configure/app/html/meta.md +0 -12
- package/zh/configure/app/html/mount-id.md +0 -12
- package/zh/configure/app/html/template-by-entries.md +0 -12
- package/zh/configure/app/html/template-parameters-by-entries.md +0 -12
- package/zh/configure/app/html/template-parameters.md +0 -12
- package/zh/configure/app/html/template.md +0 -12
- package/zh/configure/app/html/title-by-entries.md +0 -12
- package/zh/configure/app/html/title.md +0 -12
- package/zh/configure/app/output/asset-prefix.md +0 -12
- package/zh/configure/app/output/assets-retry.md +0 -12
- package/zh/configure/app/output/charset.md +0 -12
- package/zh/configure/app/output/clean-dist-path.md +0 -12
- package/zh/configure/app/output/convert-to-rem.md +0 -12
- package/zh/configure/app/output/copy.md +0 -12
- package/zh/configure/app/output/css-module-local-ident-name.md +0 -12
- package/zh/configure/app/output/data-uri-limit.md +0 -12
- package/zh/configure/app/output/disable-css-extract.md +0 -12
- package/zh/configure/app/output/disable-css-module-extension.md +0 -12
- package/zh/configure/app/output/disable-filename-hash.md +0 -12
- package/zh/configure/app/output/disable-inline-runtime-chunk.md +0 -12
- package/zh/configure/app/output/disable-minimize.md +0 -12
- package/zh/configure/app/output/disable-node-polyfill.md +0 -22
- package/zh/configure/app/output/disable-source-map.md +0 -12
- package/zh/configure/app/output/disable-ts-checker.md +0 -12
- package/zh/configure/app/output/dist-path.md +0 -12
- package/zh/configure/app/output/enable-asset-fallback.md +0 -12
- package/zh/configure/app/output/enable-asset-manifest.md +0 -12
- package/zh/configure/app/output/enable-css-module-tsdeclaration.md +0 -12
- package/zh/configure/app/output/enable-inline-scripts.md +0 -12
- package/zh/configure/app/output/enable-inline-styles.md +0 -12
- package/zh/configure/app/output/enable-latest-decorators.md +0 -12
- package/zh/configure/app/output/externals.md +0 -12
- package/zh/configure/app/output/filename.md +0 -12
- package/zh/configure/app/output/legal-comments.md +0 -12
- package/zh/configure/app/output/override-browserslist.md +0 -12
- package/zh/configure/app/output/polyfill.md +0 -12
- package/zh/configure/app/output/ssg.md +0 -226
- package/zh/configure/app/output/svg-default-export.md +0 -12
- package/zh/configure/app/performance/build-cache.md +0 -12
- package/zh/configure/app/performance/bundle-analyze.md +0 -12
- package/zh/configure/app/performance/chunk-split.md +0 -12
- package/zh/configure/app/performance/print-file-size.md +0 -12
- package/zh/configure/app/performance/profile.md +0 -12
- package/zh/configure/app/performance/remove-console.md +0 -12
- package/zh/configure/app/performance/remove-moment-locale.md +0 -12
- package/zh/configure/app/plugins.md +0 -80
- package/zh/configure/app/runtime/intro.md +0 -119
- package/zh/configure/app/runtime/master-app.md +0 -42
- package/zh/configure/app/runtime/router.md +0 -35
- package/zh/configure/app/runtime/state.md +0 -55
- package/zh/configure/app/security/sri.md +0 -12
- package/zh/configure/app/server/base-url.md +0 -35
- package/zh/configure/app/server/enable-framework-ext.md +0 -47
- package/zh/configure/app/server/port.md +0 -20
- package/zh/configure/app/server/public-routes.md +0 -28
- package/zh/configure/app/server/routes.md +0 -89
- package/zh/configure/app/server/ssr-by-entries.md +0 -31
- package/zh/configure/app/server/ssr.md +0 -21
- package/zh/configure/app/source/alias.md +0 -12
- package/zh/configure/app/source/compile-js-data-uri.md +0 -12
- package/zh/configure/app/source/config-dir.md +0 -23
- package/zh/configure/app/source/define.md +0 -12
- package/zh/configure/app/source/design-system.md +0 -1146
- package/zh/configure/app/source/disable-default-entries.md +0 -28
- package/zh/configure/app/source/disable-entry-dirs.md +0 -37
- package/zh/configure/app/source/enable-async-entry.md +0 -53
- package/zh/configure/app/source/entries-dir.md +0 -39
- package/zh/configure/app/source/entries.md +0 -123
- package/zh/configure/app/source/exclude.md +0 -12
- package/zh/configure/app/source/global-vars.md +0 -12
- package/zh/configure/app/source/include.md +0 -12
- package/zh/configure/app/source/module-scopes.md +0 -12
- package/zh/configure/app/source/pre-entry.md +0 -12
- package/zh/configure/app/source/resolve-extension-prefix.md +0 -12
- package/zh/configure/app/source/resolve-main-fields.md +0 -12
- package/zh/configure/app/testing/transformer.md +0 -15
- package/zh/configure/app/tools/autoprefixer.md +0 -12
- package/zh/configure/app/tools/babel.md +0 -12
- package/zh/configure/app/tools/css-extract.md +0 -12
- package/zh/configure/app/tools/css-loader.md +0 -12
- package/zh/configure/app/tools/dev-server.md +0 -12
- package/zh/configure/app/tools/esbuild.md +0 -38
- package/zh/configure/app/tools/html-plugin.md +0 -12
- package/zh/configure/app/tools/inspector.md +0 -12
- package/zh/configure/app/tools/jest.md +0 -39
- package/zh/configure/app/tools/less.md +0 -12
- package/zh/configure/app/tools/minify-css.md +0 -12
- package/zh/configure/app/tools/postcss.md +0 -12
- package/zh/configure/app/tools/pug.md +0 -12
- package/zh/configure/app/tools/sass.md +0 -12
- package/zh/configure/app/tools/style-loader.md +0 -12
- package/zh/configure/app/tools/styled-components.md +0 -12
- package/zh/configure/app/tools/swc.md +0 -42
- package/zh/configure/app/tools/tailwindcss.md +0 -41
- package/zh/configure/app/tools/terser.md +0 -12
- package/zh/configure/app/tools/ts-checker.md +0 -12
- package/zh/configure/app/tools/ts-loader.md +0 -12
- package/zh/configure/app/tools/webpack-chain.md +0 -12
- package/zh/configure/app/tools/webpack.md +0 -12
- package/zh/configure/app/usage.md +0 -92
- package/zh/guides/advanced-features/bff/bff-proxy.md +0 -27
- package/zh/guides/advanced-features/bff/frameworks.md +0 -150
- package/zh/guides/advanced-features/bff/function.md +0 -242
- package/zh/guides/advanced-features/bff/index.md +0 -20
- package/zh/guides/advanced-features/bff/type.md +0 -43
- package/zh/guides/advanced-features/code-split.md +0 -76
- package/zh/guides/advanced-features/compatibility.md +0 -74
- package/zh/guides/advanced-features/eslint.md +0 -147
- package/zh/guides/advanced-features/index.md +0 -12
- package/zh/guides/advanced-features/low-level.md +0 -44
- package/zh/guides/advanced-features/ssg.md +0 -131
- package/zh/guides/advanced-features/ssr.md +0 -292
- package/zh/guides/advanced-features/testing.md +0 -47
- package/zh/guides/advanced-features/web-server.md +0 -57
- package/zh/guides/basic-features/alias.md +0 -67
- package/zh/guides/basic-features/builder.md +0 -46
- package/zh/guides/basic-features/css/css-in-js.md +0 -38
- package/zh/guides/basic-features/css/css-modules.md +0 -86
- package/zh/guides/basic-features/css/less-sass.md +0 -16
- package/zh/guides/basic-features/css/postcss.md +0 -81
- package/zh/guides/basic-features/css/tailwindcss.md +0 -101
- package/zh/guides/basic-features/data-fetch.md +0 -459
- package/zh/guides/basic-features/env-vars.md +0 -163
- package/zh/guides/basic-features/html.md +0 -235
- package/zh/guides/basic-features/index.md +0 -12
- package/zh/guides/basic-features/mock.md +0 -78
- package/zh/guides/basic-features/proxy.md +0 -60
- package/zh/guides/basic-features/routes.md +0 -415
- package/zh/guides/concept/entries.md +0 -205
- package/zh/guides/get-started/quick-start.md +0 -132
- package/zh/guides/get-started/upgrade.md +0 -80
- package/zh/guides/topic-detail/changesets/add.md +0 -125
- package/zh/guides/topic-detail/changesets/changelog.md +0 -239
- package/zh/guides/topic-detail/changesets/commit.md +0 -272
- package/zh/guides/topic-detail/changesets/config.md +0 -146
- package/zh/guides/topic-detail/changesets/github.md +0 -168
- package/zh/guides/topic-detail/changesets/introduce.md +0 -57
- package/zh/guides/topic-detail/changesets/release-note.md +0 -262
- package/zh/guides/topic-detail/changesets/release-pre.md +0 -49
- package/zh/guides/topic-detail/changesets/release.md +0 -228
- package/zh/guides/topic-detail/framework-plugin/extend.md +0 -162
- package/zh/guides/topic-detail/framework-plugin/hook-list.md +0 -803
- package/zh/guides/topic-detail/framework-plugin/hook.md +0 -169
- package/zh/guides/topic-detail/framework-plugin/implement.md +0 -247
- package/zh/guides/topic-detail/framework-plugin/introduction.md +0 -49
- package/zh/guides/topic-detail/framework-plugin/lifecycle.md +0 -14
- package/zh/guides/topic-detail/framework-plugin/plugin-api.md +0 -116
- package/zh/guides/topic-detail/framework-plugin/relationship.md +0 -118
- package/zh/guides/topic-detail/generator/codesmith/api/app.md +0 -152
- package/zh/guides/topic-detail/generator/codesmith/api/ejs.md +0 -56
- package/zh/guides/topic-detail/generator/codesmith/api/fs.md +0 -54
- package/zh/guides/topic-detail/generator/codesmith/api/git.md +0 -48
- package/zh/guides/topic-detail/generator/codesmith/api/handlebars.md +0 -56
- package/zh/guides/topic-detail/generator/codesmith/api/json.md +0 -58
- package/zh/guides/topic-detail/generator/codesmith/api/npm.md +0 -45
- package/zh/guides/topic-detail/generator/codesmith/develop.md +0 -52
- package/zh/guides/topic-detail/generator/codesmith/introduce.md +0 -46
- package/zh/guides/topic-detail/generator/codesmith/run-in-js.md +0 -48
- package/zh/guides/topic-detail/generator/codesmith/structure.md +0 -86
- package/zh/guides/topic-detail/generator/config/common.md +0 -106
- package/zh/guides/topic-detail/generator/config/module.md +0 -41
- package/zh/guides/topic-detail/generator/config/monorepo.md +0 -28
- package/zh/guides/topic-detail/generator/config/mwa.md +0 -81
- package/zh/guides/topic-detail/generator/plugin/abstract.md +0 -23
- package/zh/guides/topic-detail/generator/plugin/api/file/addFile.md +0 -52
- package/zh/guides/topic-detail/generator/plugin/api/file/addManyFile.md +0 -55
- package/zh/guides/topic-detail/generator/plugin/api/file/introduce.md +0 -37
- package/zh/guides/topic-detail/generator/plugin/api/file/updateJSONFile.md +0 -53
- package/zh/guides/topic-detail/generator/plugin/api/file/updateModernConfig.md +0 -26
- package/zh/guides/topic-detail/generator/plugin/api/hook/afterForged.md +0 -35
- package/zh/guides/topic-detail/generator/plugin/api/hook/onForged.md +0 -35
- package/zh/guides/topic-detail/generator/plugin/api/info/locale.md +0 -17
- package/zh/guides/topic-detail/generator/plugin/api/input/addInputAfter.md +0 -56
- package/zh/guides/topic-detail/generator/plugin/api/input/addInputBefore.md +0 -56
- package/zh/guides/topic-detail/generator/plugin/api/input/setInput.md +0 -42
- package/zh/guides/topic-detail/generator/plugin/api/input/setInputValue.md +0 -28
- package/zh/guides/topic-detail/generator/plugin/api/input/type.md +0 -65
- package/zh/guides/topic-detail/generator/plugin/api/introduce.md +0 -93
- package/zh/guides/topic-detail/generator/plugin/api/new/createElement.md +0 -33
- package/zh/guides/topic-detail/generator/plugin/api/new/createSubProject.md +0 -35
- package/zh/guides/topic-detail/generator/plugin/api/new/enableFunc.md +0 -44
- package/zh/guides/topic-detail/generator/plugin/api/new/introduce.md +0 -15
- package/zh/guides/topic-detail/generator/plugin/develop.md +0 -124
- package/zh/guides/topic-detail/generator/plugin/use.md +0 -61
- package/zh/guides/topic-detail/generator/project.md +0 -117
- package/zh/guides/topic-detail/micro-frontend/c01-introduction.md +0 -29
- package/zh/guides/topic-detail/micro-frontend/c02-development.md +0 -191
- package/zh/guides/topic-detail/micro-frontend/c03-main-app.md +0 -246
- package/zh/guides/topic-detail/micro-frontend/c04-communicate.md +0 -54
- package/zh/guides/topic-detail/micro-frontend/c05-mixed-stack.md +0 -24
- package/zh/guides/topic-detail/model/auto-actions.md +0 -90
- package/zh/guides/topic-detail/model/computed-state.md +0 -151
- package/zh/guides/topic-detail/model/define-model.md +0 -66
- package/zh/guides/topic-detail/model/faq.md +0 -43
- package/zh/guides/topic-detail/model/manage-effects.md +0 -259
- package/zh/guides/topic-detail/model/model-communicate.md +0 -219
- package/zh/guides/topic-detail/model/performance.md +0 -173
- package/zh/guides/topic-detail/model/quick-start.md +0 -116
- package/zh/guides/topic-detail/model/redux-integration.md +0 -21
- package/zh/guides/topic-detail/model/test-model.md +0 -43
- package/zh/guides/topic-detail/model/typescript-best-practice.md +0 -71
- package/zh/guides/topic-detail/model/use-model.md +0 -244
- package/zh/guides/topic-detail/model/use-out-of-modernjs.md +0 -51
- package/zh/guides/topic-detail/monorepo/create-sub-project.md +0 -64
- package/zh/guides/topic-detail/monorepo/intro.md +0 -15
- package/zh/guides/topic-detail/monorepo/publish.md +0 -68
- package/zh/guides/topic-detail/monorepo/sub-project-interface.md +0 -168
- package/zh/tutorials/first-app/c01-start.md +0 -99
- package/zh/tutorials/first-app/c02-component.md +0 -56
- package/zh/tutorials/first-app/c03-css.md +0 -324
- package/zh/tutorials/first-app/c04-routes.md +0 -169
- package/zh/tutorials/first-app/c05-loader.md +0 -82
- package/zh/tutorials/first-app/c06-model.md +0 -260
- package/zh/tutorials/first-app/c07-container.md +0 -283
- package/zh/tutorials/first-app/c08-entries.md +0 -137
- package/zh/tutorials/foundations/introduction.md +0 -43
@@ -1,292 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: 服务端渲染(SSR)
|
3
|
-
sidebar_position: 3
|
4
|
-
---
|
5
|
-
|
6
|
-
在 Modern.js 中,SSR 也是开箱即用的。开发者无需为 SSR 编写复杂的服务端逻辑,也无需关心 SSR 的运维,或是创建单独的服务。Modern.js 拥有完备的 SSR 降级策略,保证页面能够安全运行。
|
7
|
-
|
8
|
-
启用 SSR 非常简单,只需要设置 [`server.ssr`](/docs/configure/app/server/ssr) 为 `true` 即可:
|
9
|
-
|
10
|
-
```json
|
11
|
-
{
|
12
|
-
"server": {
|
13
|
-
"ssr": true
|
14
|
-
}
|
15
|
-
}
|
16
|
-
```
|
17
|
-
|
18
|
-
## SSR 时的数据获取
|
19
|
-
|
20
|
-
Modern.js 中提供了 Data Loader,方便开发者在 SSR、CSR 下同构的获取数据。每个路由模块,如 `layout.tsx` 和 `page.tsx` 都可以定义自己的 Data Loader:
|
21
|
-
|
22
|
-
```ts title="src/routes/page.tsx"
|
23
|
-
export const loader = () => {
|
24
|
-
return {
|
25
|
-
message: 'Hello World',
|
26
|
-
};
|
27
|
-
};
|
28
|
-
```
|
29
|
-
|
30
|
-
在组件中可以通过 Hooks API 的方式获取 `loader` 函数返回的数据:
|
31
|
-
|
32
|
-
```tsx
|
33
|
-
export default () => {
|
34
|
-
const data = useLoaderData();
|
35
|
-
return <div>{data.message}</div>;
|
36
|
-
}
|
37
|
-
```
|
38
|
-
|
39
|
-
Modern.js 打破传统的 SSR 开发模式,提供了用户无感的 SSR 开发体验。并且提供了优雅的降级处理,一旦 SSR 请求失败,会自动降级在浏览器端重新发起请求。
|
40
|
-
|
41
|
-
不过,开发者仍然需要关注数据的兜底处理,例如 `null` 值或不符合预期的数据返回。避免在 SSR 时产生 React 渲染错误或是返回凌乱的渲染结果。
|
42
|
-
|
43
|
-
:::info 补充信息
|
44
|
-
使用 Data Loader 时,数据获取发生在渲染前,Modern.js 也仍然支持在组件渲染时获取数据。更多相关内容可以查看[数据获取](/docs/guides/basic-features/data-fetch)。
|
45
|
-
:::
|
46
|
-
|
47
|
-
## 保持渲染一致
|
48
|
-
|
49
|
-
有些业务中,通常需要根据当前的运行容器环境特征做不同的 UI 展示,例如 [UA](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) 信息。如果处理不够仔细,此时很有可能出现不符合预期的渲染结果。
|
50
|
-
|
51
|
-
这里通过一个例子,演示当 SSR 与 CSR 渲染不一致时出现的问题,在组件中添加以下代码:
|
52
|
-
|
53
|
-
```tsx
|
54
|
-
{
|
55
|
-
typeof window !== 'undefined' ? (
|
56
|
-
<div>
|
57
|
-
browser content
|
58
|
-
</div>
|
59
|
-
) : null;
|
60
|
-
}
|
61
|
-
```
|
62
|
-
|
63
|
-
启动应用后,访问页面,会发现浏览器控制台抛出警告信息:
|
64
|
-
|
65
|
-
```sh
|
66
|
-
Warning: Expected server HTML to contain a matching <div> in <div>.
|
67
|
-
```
|
68
|
-
|
69
|
-
这是 React 在客户端执行 hydrate 逻辑时,发现渲染结果与 SSR 渲染结果不一致造成的。虽然页面表现正常,但在复杂应用中,很有可能因此出现 DOM 层级混乱、样式混乱等问题。
|
70
|
-
|
71
|
-
:::info 注
|
72
|
-
关于 hydrate (注水)逻辑请参考[这里](https://reactjs.org/docs/react-dom.html#hydrate)。
|
73
|
-
:::
|
74
|
-
|
75
|
-
应用需要保持 SSR 与 CSR 渲染结果的一致性,如果存在不一致的情况,说明这部分内容无需在 SSR 中进行渲染。Modern.js 为这类在 SSR 中不需要渲染的内容提供 [`<NoSSR>` 工具组件](/docs/apis/app/runtime/core/use-runtime-context):
|
76
|
-
|
77
|
-
```ts
|
78
|
-
import { NoSSR } from '@modern-js/runtime/ssr';
|
79
|
-
```
|
80
|
-
|
81
|
-
在不需要进行 SSR 的元素外部,用 `NoSSR` 组件包裹:
|
82
|
-
|
83
|
-
```tsx
|
84
|
-
<NoSSR>
|
85
|
-
<div>
|
86
|
-
client content
|
87
|
-
</div>
|
88
|
-
</NoSSR>
|
89
|
-
```
|
90
|
-
|
91
|
-
修改代码后,刷新页发现之前的 Waring 消失。打开浏览器开发者工具的 Network 窗口,查看返回的 HTML 文档是不包含 `NoSSR` 组件包裹的内容的。
|
92
|
-
|
93
|
-
:::info 补充信息
|
94
|
-
[`useRuntimeContext`](/docs/apis/app/runtime/core/use-runtime-context) 可以获取完整的请求信息,可以利用它保证 SSR 与 CSR 的渲染结果一致。
|
95
|
-
:::
|
96
|
-
|
97
|
-
## 关注内存泄漏
|
98
|
-
|
99
|
-
:::warning 警告
|
100
|
-
在 SSR 场景下,开发者需要特别关注内存泄露问题,即使是微小的内存泄露,在大量的访问后也会对服务造成影响。
|
101
|
-
:::
|
102
|
-
|
103
|
-
SSR 时,浏览器的每次请求,都会触发服务端重新执行一次组件渲染逻辑。所以,需要避免在全局定义任何可能不断增长的数据结构,或在全局进行事件订阅,或创建不会被销毁的流。
|
104
|
-
|
105
|
-
例如以下代码,使用 [redux-observable](https://redux-observable.js.org/) 时,习惯了 CSR 的开发者通常会在组件中这样编码:
|
106
|
-
|
107
|
-
```tsx
|
108
|
-
/* 代码仅作为示例,不可运行 */
|
109
|
-
import { createEpicMiddleware, combineEpics } from 'redux-observable';
|
110
|
-
|
111
|
-
const epicMiddleware = createEpicMiddleware();
|
112
|
-
const rootEpic = combineEpics();
|
113
|
-
|
114
|
-
export default function Test() {
|
115
|
-
epicMiddleware.run(rootEpic);
|
116
|
-
return <div>Hello Modern.js</div>;
|
117
|
-
}
|
118
|
-
```
|
119
|
-
|
120
|
-
在组件外层创建 Middleware 实例 `epicMiddleware`,并在组件内部调用 `epicMiddleware.run`。
|
121
|
-
|
122
|
-
在浏览器端,这段代码不会造成任何问题,但是在 SSR 时,Middleware 实例会一直无法被销毁。每次渲染组件,调用 `epicMiddleware.run(rootEpic)` 时,都会在内部添加新的事件绑定,导致整个对象不断变大,最终对应用性能造成影响。
|
123
|
-
|
124
|
-
CSR 中这类问题不易被发觉,因此从 CSR 切换到 SSR 时,如果不确定应用是否存在这类隐患,可以对应用进行压测。
|
125
|
-
|
126
|
-
## 收敛服务端数据
|
127
|
-
|
128
|
-
为了保持 SSR 阶段请求的数据,可以在浏览器端直接使用,Modern.js 会将渲染过程中收集的数据与状态注入到 HTML 内。但是,CSR 应用常常存在接口数据量大、组件状态未收敛的情况,这时如果直接使用 SSR,渲染得到的 HTML 体积可能会存在过大的问题。此时,SSR 不仅无法为应用带来用户体验上的提升,反而可能起到相反的作用。
|
129
|
-
|
130
|
-
因此,使用 SSR 时,**开发者需要为应用做合理的瘦身**:
|
131
|
-
|
132
|
-
1. 关注首屏,SSR 中可以只请求首屏需要的数据,并在浏览器端渲染剩余的部分。
|
133
|
-
2. 将与渲染无关的数据,从接口返回数据中剔除。
|
134
|
-
|
135
|
-
## Serverless Pre-render
|
136
|
-
|
137
|
-
Modern.js 提供 Serverless Pre-rendering (SPR) 这一特性来提升 SSR 性能。
|
138
|
-
|
139
|
-
SPR 利用预渲染与缓存技术,为 SSR 页面提供静态 Web 的响应性能。它让 SSR 应用拥有静态 Web 页面的响应速度与稳定性,同时还能保持数据的动态更新。
|
140
|
-
|
141
|
-
在 Modern.js 中使用 SPR 非常简单,只需要在组件中新增 `PreRender` 组件,该组件所在的页面就会自动开启 SPR。
|
142
|
-
|
143
|
-
这里模拟一个使用 `useLoaderData` API 的组件,Data Loader 中的请求需要消耗 2s 时间。
|
144
|
-
|
145
|
-
```jsx
|
146
|
-
import { useLoaderData } from '@modern-js/runtime/router';
|
147
|
-
|
148
|
-
export const loader = async () => {
|
149
|
-
await new Promise((resolve, reject) => {
|
150
|
-
setTimeout(() => {
|
151
|
-
resolve(null);
|
152
|
-
}, 2000);
|
153
|
-
});
|
154
|
-
|
155
|
-
return {
|
156
|
-
message: 'Hello Modern.js',
|
157
|
-
};
|
158
|
-
};
|
159
|
-
|
160
|
-
export default () => {
|
161
|
-
const data = useLoaderData();
|
162
|
-
return <div>{data?.message}</div>;
|
163
|
-
};
|
164
|
-
```
|
165
|
-
|
166
|
-
执行 `dev` 命令后,打开页面,可以明显的察觉到页面需要等到 2s 后才返回。
|
167
|
-
|
168
|
-
接下来使用 `PreRender` 组件来进行优化,该组件可以直接从 `@modern-js/runtime/ssr` 中导出:
|
169
|
-
|
170
|
-
```ts
|
171
|
-
import { PreRender } from '@modern-js/runtime/ssr';
|
172
|
-
```
|
173
|
-
|
174
|
-
在路由组件内使用 `PreRender` 组件,并设置参数 `interval`,用于表示该次渲染结果的过期时间为 5s:
|
175
|
-
|
176
|
-
```tsx
|
177
|
-
<PreRender interval={5} />
|
178
|
-
```
|
179
|
-
|
180
|
-
修改后,执行 `pnpm run build && pnpm run serve` 启动应用,并打开页面。
|
181
|
-
|
182
|
-
首次打开时,和之前的渲染并没有什么不同,同样存在 2s 延迟。点击刷新,页面瞬间打开,但此时,页面数据并没有因为刷新发生变化,这是因为缓存还没有过期。
|
183
|
-
|
184
|
-
等待 5s,重新刷新页面,页面的数据仍然没有变化。再一次刷新页面数据发生变化,但是页面仍然几乎是瞬间响应的。
|
185
|
-
这是因为在之前的请求时,SPR 已经在后台异步获取了新的渲染结果,本次请求到的页面是已经缓存在服务器中的版本。
|
186
|
-
|
187
|
-
可以想象,当 `interval` 设置为 1 时,用户可以在感知到实时数据的同时,拥有静态页面的响应体验。
|
188
|
-
|
189
|
-
:::info 补充信息
|
190
|
-
`PreRender` 的详细使用可以参考[这里](/docs/apis/app/runtime/ssr/pre-render)。
|
191
|
-
:::
|
192
|
-
|
193
|
-
## Treeshaking
|
194
|
-
|
195
|
-
开启 SSR 时,Modern.js 会用相同的入口,构建出 SSR Bundle 和 CSR Bundle 两份产物。因此,在 SSR Bundle 中存在 Web API,或是在 CSR Bundle 中存在 Node API 时,都可能导致运行出错。
|
196
|
-
|
197
|
-
在组件中引入 Web API,通常情况下是要做一些全局监听,或是获取浏览器相关的数据,例如:
|
198
|
-
|
199
|
-
```tsx
|
200
|
-
document.addEventListener('load', () => {
|
201
|
-
console.log('document load');
|
202
|
-
});
|
203
|
-
const App = () => {
|
204
|
-
return <div>Hello World</div>
|
205
|
-
}
|
206
|
-
export default App;
|
207
|
-
```
|
208
|
-
|
209
|
-
在组件文件中引入 Node API,通常情况下是因为使用了 Data Loader,例如:
|
210
|
-
|
211
|
-
```ts
|
212
|
-
import fse from 'fs-extra';
|
213
|
-
export const loader = () => {
|
214
|
-
const file = fse.readFileSync('./myfile');
|
215
|
-
return {
|
216
|
-
...
|
217
|
-
};
|
218
|
-
};
|
219
|
-
```
|
220
|
-
|
221
|
-
### 环境变量区分
|
222
|
-
|
223
|
-
对于第一种情况,我们可以直接使用 Modern.js 内置的环境变量 `MODERN_TARGET` 进行判断,在构建时删除无用代码:
|
224
|
-
|
225
|
-
```ts
|
226
|
-
if (process.env.MODERN_TARGET === 'browser') {
|
227
|
-
document.addEventListener('load', () => {
|
228
|
-
console.log('document load');
|
229
|
-
});
|
230
|
-
}
|
231
|
-
```
|
232
|
-
|
233
|
-
:::note
|
234
|
-
更多内容可以查看[环境变量](/docs/guides/basic-features/env-vars)。
|
235
|
-
:::
|
236
|
-
|
237
|
-
### 文件后缀区分
|
238
|
-
|
239
|
-
但例如第二种情况,Treeshaking 的方式并不能保证代码被完全分离。Modern.js 也支持通过 `.node.` 后缀的文件来区分 SSR Bundle 和 CSR Bundle 产物的打包文件。
|
240
|
-
|
241
|
-
例如在代码中引入了 `fs-extra`,这时候直接引用到组件中,会造成 CSR 加载报错。可以创建同名的 `.ts` 和 `.node.ts` 文件做一层代理:
|
242
|
-
|
243
|
-
```ts title="compat.ts"
|
244
|
-
export { readFileSync } from 'fs-extra';
|
245
|
-
```
|
246
|
-
|
247
|
-
```ts title="compat.node.ts"
|
248
|
-
export const readFileSync: any = () => {};
|
249
|
-
```
|
250
|
-
|
251
|
-
在文件中直接引入 `./compat`,此时 SSR 环境下会优先使用 `.node.ts` 后缀的文件,CSR 环境下会使用 `.ts` 后缀的文件。
|
252
|
-
|
253
|
-
```ts title="App.tsx"
|
254
|
-
import { readFileSync } from './compat'
|
255
|
-
|
256
|
-
export const loader = () => {
|
257
|
-
const file = readFileSync('./myfile');
|
258
|
-
return {
|
259
|
-
...
|
260
|
-
};
|
261
|
-
};
|
262
|
-
```
|
263
|
-
|
264
|
-
### 独立文件
|
265
|
-
|
266
|
-
上述两种方式,都会为开发者带来一些心智负担。Modern.js 基于[嵌套路由](/docs/guides/basic-features/routes)开发设计了[更简单的方案](/docs/guides/basic-features/data-fetch)来分离 CSR 和 SSR 的代码。
|
267
|
-
|
268
|
-
## 接口请求
|
269
|
-
|
270
|
-
在 SSR 中发起接口请求时,开发者有时自己封装了同构的请求工具。部分接口需要传递用户 Cookie,开发者可以通过 [`useRuntimeContext`](/docs/guides/basic-features/data-fetch#route-loader) API 获取到请求头来实现。
|
271
|
-
|
272
|
-
需要注意的是,此时获取到的是 HTML 请求的请求头,不一定适用于接口请求,因此**千万不能**透传所有请求头。并且,一些后端接口,或是通用网关,会根据请求头中的信息做校验,全量透传容易出现各种难以排查的问题,推荐**按需透传**。
|
273
|
-
|
274
|
-
如果实在需要透传所有请求头,请务必过滤 `host` 字段。
|
275
|
-
|
276
|
-
## 流式渲染
|
277
|
-
|
278
|
-
Modern.js 支持了 React 18 的流式渲染,可以通过如下配置修改默认的渲染模式:
|
279
|
-
|
280
|
-
```json
|
281
|
-
{
|
282
|
-
"server": {
|
283
|
-
"ssr": {
|
284
|
-
"mode": "stream"
|
285
|
-
}
|
286
|
-
}
|
287
|
-
}
|
288
|
-
```
|
289
|
-
|
290
|
-
:::note
|
291
|
-
目前 Modern.js 内置的数据获取方式还未支持流式渲染,如迫切需要开发者可以按照 React Stream SSR 的 Demo 自建。
|
292
|
-
:::
|
@@ -1,47 +0,0 @@
|
|
1
|
-
---
|
2
|
-
sidebar_position: 10
|
3
|
-
---
|
4
|
-
|
5
|
-
# 测试
|
6
|
-
|
7
|
-
Modern.js 默认继承了 [Jest](https://jestjs.io/) 的测试能力。
|
8
|
-
|
9
|
-
我们首先需要执行 `pnpm run new` 启用「单元测试 / 集成测试」功能:
|
10
|
-
|
11
|
-
```
|
12
|
-
? 请选择你想要的操作: 启用可选功能
|
13
|
-
? 启用可选功能: 启用「单元测试 / 集成测试」功能
|
14
|
-
```
|
15
|
-
|
16
|
-
执行上述命令后,`package.json` 中将会自动生成 `"test": "modern test"` 命令。
|
17
|
-
|
18
|
-
在 `modern.config.ts` 中注册 Test 插件:
|
19
|
-
|
20
|
-
```ts title="modern.config.ts"
|
21
|
-
import TestPlugin from '@modern-js/plugin-testing';
|
22
|
-
// https://modernjs.dev/docs/apis/app/config
|
23
|
-
export default defineConfig({
|
24
|
-
...,
|
25
|
-
plugins: [..., TestPlugin()],
|
26
|
-
});
|
27
|
-
```
|
28
|
-
|
29
|
-
## 测试文件
|
30
|
-
|
31
|
-
Modern.js 默认识别的测试文件路径为:`<rootDir>/src/**/*.test.[jt]s?(x)` 和 `<rootDir>/tests/**/*.test.[jt]s?(x)`。
|
32
|
-
|
33
|
-
如果你需要自定义 test 目录,可通过 [tools.jest](/docs/configure/app/tools/jest) 进行配置。
|
34
|
-
|
35
|
-
## 使用姿势
|
36
|
-
|
37
|
-
Modern.js test 支持使用 [testing-library](https://testing-library.com/docs/) 相关包 API,可直接通过 `@modern-js/runtime/testing` 进行导入:
|
38
|
-
|
39
|
-
```
|
40
|
-
import { render, screen } from '@modern-js/runtime/testing';
|
41
|
-
```
|
42
|
-
|
43
|
-
其他 Modern.js 支持的 testing API 可参考[这里](/docs/apis/app/runtime/testing/cleanup)。
|
44
|
-
|
45
|
-
## transform
|
46
|
-
|
47
|
-
Modern.js 测试默认使用 [babel-jest](https://www.npmjs.com/package/babel-jest) 进行源码编译,如果你需要使用 [ts-jest](https://github.com/kulshekhar/ts-jest),可以通过 [testing.transform](/docs/configure/app/testing/transformer) 进行配置。
|
@@ -1,57 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: 自定义 Web Server
|
3
|
-
sidebar_position: 2
|
4
|
-
---
|
5
|
-
|
6
|
-
Modern.js 作为以客户端为中心的开发框架,对服务端的定制能力较弱。而在有些开发场景下,需要定制特殊的服务端逻辑,例如用户鉴权、请求预处理、添加页面渲染骨架等。
|
7
|
-
|
8
|
-
因此 Modern.js 提供了一种功能,让项目可以在给定的范围内扩展 Modern.js 内置的 Web Server,来实现相应的需求。
|
9
|
-
|
10
|
-
## 创建自定义 Web Server
|
11
|
-
|
12
|
-
在项目根目录执行 `pnpm run new` 命令,按照如下选择,开启「自定义 Web Serve」功能:
|
13
|
-
|
14
|
-
```bash
|
15
|
-
? 请选择你想要的操作 创建工程元素
|
16
|
-
? 创建工程元素 新建「自定义 Web Server」源码目录
|
17
|
-
```
|
18
|
-
|
19
|
-
执行命令后,在 `modern.config.ts` 中注册 Server 插件:
|
20
|
-
|
21
|
-
```ts title="modern.config.ts"
|
22
|
-
import ServerPlugin from '@modern-js/plugin-server';
|
23
|
-
// https://modernjs.dev/docs/apis/app/config
|
24
|
-
export default defineConfig({
|
25
|
-
...,
|
26
|
-
plugins: [..., ServerPlugin()],
|
27
|
-
});
|
28
|
-
```
|
29
|
-
|
30
|
-
项目目录下会新建 `server/index.ts` 文件,自定义逻辑在这个文件中编写。
|
31
|
-
|
32
|
-
## 使用 API 扩展 Web Server
|
33
|
-
|
34
|
-
Modern.js 提供了 **Hook** 与 **Middleware** 两类 API 来扩展 Web Server。
|
35
|
-
|
36
|
-
### Hook
|
37
|
-
|
38
|
-
Hook 可以控制 Web Server 对请求处理的内置逻辑,非 BFF 请求会经过 Hook 的处理。
|
39
|
-
|
40
|
-
Hook 不可以使用运行时框架拓展。
|
41
|
-
|
42
|
-
详细 API 可以查看 [Hook](/docs/apis/app/runtime/web-server/hook)。
|
43
|
-
|
44
|
-
|
45
|
-
### Middleware
|
46
|
-
|
47
|
-
Middleware 可以为 Web Server 添加前置中间件,只有 SSR 请求会经过 Middleware 的处理。
|
48
|
-
|
49
|
-
Middleware 可以使用运行时框架拓展。
|
50
|
-
|
51
|
-
详细 API 可以查看 [Hook](/docs/apis/app/runtime/web-server/middleware)。
|
52
|
-
|
53
|
-
## 完全自定义的 Web Server
|
54
|
-
|
55
|
-
:::note
|
56
|
-
敬请期待
|
57
|
-
:::
|
@@ -1,67 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: 别名
|
3
|
-
sidebar_position: 8
|
4
|
-
---
|
5
|
-
|
6
|
-
Modern.js 允许在 JS 和 CSS 中使用别名导入自定义目录下的模块,并内置了以下别名:
|
7
|
-
|
8
|
-
```js
|
9
|
-
{
|
10
|
-
'@': '<appDirectory>/src',
|
11
|
-
'@shared': '<appDirectory>/shared',
|
12
|
-
}
|
13
|
-
```
|
14
|
-
|
15
|
-
:::info 注
|
16
|
-
在开启可选功能时,生成器也会动态的添加内置别名,例如启用 BFF 时默认会添加 `@api` 别名。
|
17
|
-
:::
|
18
|
-
|
19
|
-
例如从 `src/App.tsx` 文件中导入 `src/common` 目录下的模块:
|
20
|
-
|
21
|
-
```bash
|
22
|
-
.
|
23
|
-
├── common
|
24
|
-
│ ├── styles
|
25
|
-
│ │ └── base.css
|
26
|
-
│ └── utils
|
27
|
-
│ └── index.ts
|
28
|
-
├── App.tsx
|
29
|
-
```
|
30
|
-
|
31
|
-
`src/App.tsx` 中写法如下:
|
32
|
-
|
33
|
-
```ts
|
34
|
-
import utils from '@/src/common/utils';
|
35
|
-
import '@/src/common/styles/base.css';
|
36
|
-
```
|
37
|
-
|
38
|
-
Modern.js 也提供了自定义别名的方式,以添加 `@common` 别名为例,对于 TypeScript 项目,只需要在项目根目录 `tsconfig.json` 下配置 `compilerOptions.paths` 如下:
|
39
|
-
|
40
|
-
```json
|
41
|
-
{
|
42
|
-
"compilerOptions": {
|
43
|
-
"paths": {
|
44
|
-
"@/*": [
|
45
|
-
"./src/*"
|
46
|
-
],
|
47
|
-
"@/common/*": [
|
48
|
-
"./src/common/*"
|
49
|
-
]
|
50
|
-
}
|
51
|
-
},
|
52
|
-
}
|
53
|
-
```
|
54
|
-
|
55
|
-
JavaScript 项目可以在 `modern.config.js` 中配置 [`source.alias`](/docs/configure/app/source/alias):
|
56
|
-
|
57
|
-
```typescript title="modern.config.ts"
|
58
|
-
export default defineConfig({
|
59
|
-
source: {
|
60
|
-
alias: {
|
61
|
-
'@common': './src/common'
|
62
|
-
}
|
63
|
-
}
|
64
|
-
});
|
65
|
-
```
|
66
|
-
|
67
|
-
具体别名配置可以参考 【[API 资料 - source.alias](/docs/configure/app/source/alias)】。
|
@@ -1,46 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: 构建能力
|
3
|
-
sidebar_position: 2
|
4
|
-
---
|
5
|
-
|
6
|
-
**Modern.js 的构建能力由 [Modern.js Builder](https://modernjs.dev/builder) 提供。**
|
7
|
-
|
8
|
-
Modern.js Builder 是 Modern.js 体系的核心组件之一,它是一个面向现代 Web 开发场景的构建引擎,可以脱离 Modern.js 被独立使用。Modern.js Builder 同时支持 webpack 和 rspack 等多种打包工具,默认情况下使用最成熟的 webpack 进行打包。
|
9
|
-
|
10
|
-
## 构建架构
|
11
|
-
|
12
|
-
从构建的角度看,Modern.js 分为三层架构,从上到下依次是:
|
13
|
-
|
14
|
-
- 上层研发框架:Modern.js。
|
15
|
-
- 通用构建引擎:Modern.js Builder。
|
16
|
-
- 底层打包工具:webpack 和 rspack。
|
17
|
-
|
18
|
-
<img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/builder-layers-1117.png" style={{ maxWidth: '540px' }} />
|
19
|
-
|
20
|
-
## 构建文档
|
21
|
-
|
22
|
-
由于 Modern.js Builder 是一个可独立使用的模块,我们为它提供了单独的文档,文档地址为:[modernjs.dev/builder](https://modernjs.dev/builder)。
|
23
|
-
|
24
|
-
在该文档中,你可以了解到 Modern.js Builder 的详细介绍,同时也可以找到各个构建能力的完整使用指南。当你遇到构建方面的需求或问题时,建议你优先阅读 Modern.js Builder 文档来解决。
|
25
|
-
|
26
|
-
## 构建配置
|
27
|
-
|
28
|
-
Modern.js 的配置继承自 Modern.js Builder,因此你可以在 Modern.js 中使用 Modern.js Builder 提供的所有构建配置。
|
29
|
-
|
30
|
-
以 Modern.js Builder 的 `html.title` 配置项为例,你可以直接在 `modern.config.ts` 文件中使用该配置项,它会被自动传递给 Modern.js Builder。
|
31
|
-
|
32
|
-
```ts title="modern.config.js"
|
33
|
-
export default defineConfig({
|
34
|
-
html: {
|
35
|
-
title: 'example',
|
36
|
-
},
|
37
|
-
});
|
38
|
-
```
|
39
|
-
|
40
|
-
关于构建配置的详细说明,请参考 [「Modern.js Builder - Builder 配置」](https://modernjs.dev/builder/zh/guide/basic/builder-config.html)。
|
41
|
-
|
42
|
-
## 构建能力
|
43
|
-
|
44
|
-
Modern.js Builder 提供了丰富的构建能力,包括 JavaScript 编译、CSS 编译、静态资源处理、代码热更新、代码压缩、TS 类型检查等几十种能力。
|
45
|
-
|
46
|
-
我们推荐你阅读 [「Modern.js Builder - 功能导航」](https://modernjs.dev/builder/zh/guide/features.html) 来了解 Modern.js Builder 提供的所有构建能力。
|
@@ -1,38 +0,0 @@
|
|
1
|
-
---
|
2
|
-
sidebar_position: 1
|
3
|
-
---
|
4
|
-
|
5
|
-
# CSS-in-JS
|
6
|
-
|
7
|
-
CSS-in-JS 是一种可以将 CSS 样式写在 JS 文件里的技术。Modern.js 集成了社区常用的 CSS-in-JS 实现库 [styled-components](https://styled-components.com/),它使用 JavaScript 的新特性 [Tagged template](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) 编写组件的 CSS 样式。可以直接从 `@modern-js/runtime/styled` 引入 [styled-components](https://styled-components.com/) 的 API 进行使用。
|
8
|
-
|
9
|
-
当需要编写一个内部字体为红色的 `div` 组件时,可以如下实现:
|
10
|
-
|
11
|
-
```js
|
12
|
-
import styled from '@modern-js/runtime/styled'
|
13
|
-
|
14
|
-
const RedDiv = styled.div`
|
15
|
-
color: red;
|
16
|
-
`
|
17
|
-
```
|
18
|
-
|
19
|
-
当需要根据组件的 `props` 动态设置组件样式时,例如 `props` 的属性 `primary` 为 `true` 时,按钮的颜色为白色,其他情况为红色,实现代码如下:
|
20
|
-
|
21
|
-
```js
|
22
|
-
import styled from '@modern-js/runtime/styled'
|
23
|
-
|
24
|
-
const Button = styled.button`
|
25
|
-
color: ${props => props.primary ? "white" : "red"};
|
26
|
-
font-size: 1em;
|
27
|
-
`
|
28
|
-
```
|
29
|
-
|
30
|
-
关于 styled-components 的更多用法,请参考【[styled-components 官网](https://styled-components.com/)】。
|
31
|
-
|
32
|
-
:::info 补充信息
|
33
|
-
Modern.js 内部使用了 Babel 插件 [babel-plugin-styled-components](https://github.com/styled-components/babel-plugin-styled-components),可以通过 [`tools.styledComponents`](/docs/configure/app/tools/styled-components) 对插件进行配置。
|
34
|
-
:::
|
35
|
-
|
36
|
-
:::tip 提示
|
37
|
-
如果需要使用 [styled-jsx](https://www.npmjs.com/package/styled-jsx)、[Emotion](https://emotion.sh/) 等其他 CSS-in-JS 库,需要先安装对应库的依赖。具体使用方式请参考对应库的官网。
|
38
|
-
:::
|
@@ -1,86 +0,0 @@
|
|
1
|
-
---
|
2
|
-
sidebar_position: 5
|
3
|
-
---
|
4
|
-
|
5
|
-
# CSS Modules
|
6
|
-
|
7
|
-
Modern.js 为 [CSS Modules](https://github.com/css-modules/css-modules) 提供了开箱即用的支持。
|
8
|
-
|
9
|
-
## 文件后缀形式 CSS Modules
|
10
|
-
|
11
|
-
默认情况下,以 `.module.(css|scss|sass|less)` 结尾的文件会作为 CSS Modules 文件处理,例如:
|
12
|
-
|
13
|
-
```css title="button.module.css"
|
14
|
-
.redColor {
|
15
|
-
color: red;
|
16
|
-
}
|
17
|
-
```
|
18
|
-
|
19
|
-
```js title="Button.jsx"
|
20
|
-
import styles from './button.module.css';
|
21
|
-
|
22
|
-
export default function Button() {
|
23
|
-
return (
|
24
|
-
<button type="button" className={styles.redColor}>
|
25
|
-
red button
|
26
|
-
</button>
|
27
|
-
);
|
28
|
-
}
|
29
|
-
```
|
30
|
-
|
31
|
-
最终将被编译为
|
32
|
-
|
33
|
-
```js
|
34
|
-
<button type="button" className="button_redColor__1-RBg">
|
35
|
-
red button
|
36
|
-
</button>;
|
37
|
-
```
|
38
|
-
|
39
|
-
## 全面启用 CSS Modules
|
40
|
-
|
41
|
-
如果想去掉文件名中 `.module` 后缀,可以设置 [`output.disableCssModuleExtension`](/docs/configure/app/output/disable-css-module-extension)。
|
42
|
-
|
43
|
-
设置后,除了 `node_modules/` 目录下的样式文件和文件名称格式为 `[name].global.(css|scss|sass|less)` 之外的所有样式文件,都会作为 CSS Modules 处理。
|
44
|
-
|
45
|
-
如果此时需要全局样式,可以通过创建文件名称格式为 `[name].global.(css|less|scss|sass)` 的样式文件来解决, 例如:
|
46
|
-
|
47
|
-
```css title="app.global.css"
|
48
|
-
.bg-blue {
|
49
|
-
background-color: blue;
|
50
|
-
}
|
51
|
-
```
|
52
|
-
|
53
|
-
```css title="button.css"
|
54
|
-
.redColor {
|
55
|
-
color: red;
|
56
|
-
}
|
57
|
-
```
|
58
|
-
|
59
|
-
```js title="App.jsx"
|
60
|
-
import './app.global.css';
|
61
|
-
import styles from './button.css';
|
62
|
-
|
63
|
-
export default function Button() {
|
64
|
-
return (
|
65
|
-
<button type="button" className={`${styles.redColor} bg-blue`}>
|
66
|
-
button
|
67
|
-
</button>
|
68
|
-
);
|
69
|
-
}
|
70
|
-
```
|
71
|
-
|
72
|
-
最终将被编译为:
|
73
|
-
|
74
|
-
```js
|
75
|
-
<button type="button" className="button__redColor--JsFYl bg-blue">
|
76
|
-
button
|
77
|
-
</button>;
|
78
|
-
```
|
79
|
-
|
80
|
-
最终效果如下:
|
81
|
-
|
82
|
-

|
83
|
-
|
84
|
-
:::tip 提示
|
85
|
-
使用 [babel-plugin-react-css-modules](https://github.com/gajus/babel-plugin-react-css-modules) 时需要注意,该插件的配置选项 `generateScopedName` 需要和 [`output.cssModuleLocalIdentName`](/docs/configure/app/output/css-module-local-ident-name) 保持一致。
|
86
|
-
:::
|
@@ -1,16 +0,0 @@
|
|
1
|
-
---
|
2
|
-
sidebar_position: 4
|
3
|
-
---
|
4
|
-
|
5
|
-
# Less 和 Sass
|
6
|
-
|
7
|
-
[Less](https://lesscss.org/) 和 [Sass](https://sass-lang.com/) 是常用的两种 CSS 预处理器,Modern.js 内置了 Less 和 Sass 编译能力的支持。
|
8
|
-
|
9
|
-
## 自定义配置
|
10
|
-
|
11
|
-
- 如果需要自定义 [less-loader](https://github.com/webpack-contrib/less-loader) 的配置,请参考 [tools.less](/docs/configure/app/tools/less) 配置项。
|
12
|
-
- 如果需要自定义 [sass-loader](https://github.com/webpack-contrib/sass-loader) 的配置,请参考 [tools.less](/docs/configure/app/tools/sass) 配置项。
|
13
|
-
|
14
|
-
:::tip 提示
|
15
|
-
经过 Less 和 Sass 预编译后的 CSS 文件,仍然会经过 Modern.js 内置的 [PostCSS](https://postcss.org/) 的转换,具备良好的浏览器兼容性。相关内容请参考【[PostCSS](/docs/guides/basic-features/css/postcss)】。
|
16
|
-
:::
|