@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.100 → 3.5.0-ultramodern.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/modern-bundle-docs.js +7 -0
- package/dist/cjs/bundleDocs.js +114 -0
- package/dist/esm/bundleDocs.mjs +62 -0
- package/dist/esm-node/bundleDocs.mjs +63 -0
- package/dist/types/bundleDocs.d.ts +20 -0
- package/docs/apis/app/{commands.mdx → commands.md} +35 -9
- package/docs/apis/app/hooks/api/{lambda.mdx → lambda.md} +2 -6
- package/docs/apis/app/hooks/config/{favicon.mdx → favicon.md} +1 -6
- package/docs/apis/app/hooks/config/{html.mdx → html.md} +1 -5
- package/docs/apis/app/hooks/config/{icon.mdx → icon.md} +1 -6
- package/docs/apis/app/hooks/config/{mock.mdx → mock.md} +1 -5
- package/docs/apis/app/hooks/config/{public.mdx → public.md} +0 -4
- package/docs/apis/app/hooks/config/{upload.mdx → upload.md} +3 -7
- package/docs/apis/app/hooks/{modern-config.mdx → modern-config.md} +1 -5
- package/docs/apis/app/hooks/server/{server.mdx → server.md} +1 -6
- package/docs/apis/app/hooks/{shared.mdx → shared.md} +0 -4
- package/docs/apis/app/hooks/src/{app.mdx → app.md} +2 -2
- package/docs/apis/app/hooks/src/{entry.mdx → entry.md} +1 -6
- package/docs/apis/app/hooks/src/{entry.server.mdx → entry.server.md} +0 -5
- package/docs/apis/app/hooks/src/{modern.runtime.mdx → modern.runtime.md} +1 -5
- package/docs/apis/app/hooks/src/{routes.mdx → routes.md} +3 -7
- package/docs/apis/app/hooks/src/{server.mdx → server.md} +1 -5
- package/docs/apis/app/runtime/bff/{use-backend-context.mdx → use-backend-context.md} +0 -3
- package/docs/apis/app/runtime/core/{create-root.mdx → create-root.md} +0 -3
- package/docs/apis/app/runtime/core/{render.mdx → render.md} +1 -4
- package/docs/apis/app/runtime/core/{runtime-context.mdx → runtime-context.md} +0 -4
- package/docs/apis/app/runtime/router/{router.mdx → router.md} +1 -6
- package/docs/apis/app/runtime/ssr/{no-ssr.mdx → no-ssr.md} +0 -3
- package/docs/apis/app/runtime/ssr/{renderStreaming.mdx → renderStreaming.md} +0 -4
- package/docs/apis/app/runtime/ssr/{renderString.mdx → renderString.md} +0 -4
- package/docs/apis/app/runtime/ssr/{requestHandler.mdx → requestHandler.md} +0 -4
- package/docs/apis/app/runtime/utility/{css-in-js.mdx → css-in-js.md} +0 -4
- package/docs/apis/app/runtime/utility/{head.mdx → head.md} +0 -3
- package/docs/apis/app/runtime/utility/{loadable.mdx → loadable.md} +0 -3
- package/docs/community/blog/2022-0708-updates.md +91 -0
- package/docs/community/blog/2022-0910-updates.md +76 -0
- package/docs/community/blog/overview.md +63 -0
- package/docs/community/blog/v2-release-note.md +238 -0
- package/docs/community/blog/v3-release-note.md +622 -0
- package/docs/community/contributing-guide.md +252 -0
- package/docs/community/releases.md +23 -0
- package/docs/community/showcase.md +24 -0
- package/docs/community/team.md +14 -0
- package/docs/configure/app/bff/{cross-project.mdx → cross-project.md} +4 -8
- package/docs/configure/app/bff/{effect.mdx → effect.md} +3 -7
- package/docs/configure/app/bff/{prefix.mdx → prefix.md} +3 -7
- package/docs/configure/app/bff/{runtime-framework.mdx → runtime-framework.md} +3 -7
- package/docs/configure/app/{builder-plugins.mdx → builder-plugins.md} +4 -8
- package/docs/configure/app/dev/{asset-prefix.mdx → asset-prefix.md} +4 -9
- package/docs/configure/app/dev/{before-start-url.mdx → before-start-url.md} +0 -4
- package/docs/configure/app/dev/{client.mdx → client.md} +3 -7
- package/docs/configure/app/dev/hmr.md +10 -0
- package/docs/configure/app/dev/{host.mdx → host.md} +0 -4
- package/docs/configure/app/dev/{https.mdx → https.md} +0 -4
- package/docs/configure/app/dev/{lazy-compilation.mdx → lazy-compilation.md} +2 -8
- package/docs/configure/app/dev/live-reload.md +10 -0
- package/docs/configure/app/dev/{mock-dir.mdx → mock-dir.md} +0 -4
- package/docs/configure/app/dev/progress-bar.md +19 -0
- package/docs/configure/app/dev/{server.mdx → server.md} +0 -4
- package/docs/configure/app/dev/{setup-middlewares.mdx → setup-middlewares.md} +3 -7
- package/docs/configure/app/dev/{start-url.mdx → start-url.md} +0 -5
- package/docs/configure/app/dev/{watch-files.mdx → watch-files.md} +3 -7
- package/docs/configure/app/dev/{write-to-disk.mdx → write-to-disk.md} +3 -7
- package/docs/configure/app/experiments/{source-build.mdx → source-build.md} +1 -3
- package/docs/configure/app/html/{app-icon.mdx → app-icon.md} +3 -7
- package/docs/configure/app/html/{crossorigin.mdx → crossorigin.md} +3 -7
- package/docs/configure/app/html/{favicon.mdx → favicon.md} +3 -7
- package/docs/configure/app/html/inject.md +10 -0
- package/docs/configure/app/html/{meta.mdx → meta.md} +3 -7
- package/docs/configure/app/html/{mount-id.mdx → mount-id.md} +3 -7
- package/docs/configure/app/html/output-structure.md +10 -0
- package/docs/configure/app/html/script-loading.md +10 -0
- package/docs/configure/app/html/{tags.mdx → tags.md} +3 -7
- package/docs/configure/app/html/{template-parameters.mdx → template-parameters.md} +3 -7
- package/docs/configure/app/html/template.md +10 -0
- package/docs/configure/app/html/title.md +18 -0
- package/docs/configure/app/output/asset-prefix.md +11 -0
- package/docs/configure/app/output/{assets-retry.mdx → assets-retry.md} +1 -5
- package/docs/configure/app/output/{charset.mdx → charset.md} +3 -7
- package/docs/configure/app/output/{clean-dist-path.mdx → clean-dist-path.md} +0 -4
- package/docs/configure/app/output/{convert-to-rem.mdx → convert-to-rem.md} +12 -16
- package/docs/configure/app/output/{copy.mdx → copy.md} +3 -7
- package/docs/configure/app/output/{css-modules.mdx → css-modules.md} +3 -7
- package/docs/configure/app/output/{data-uri-limit.mdx → data-uri-limit.md} +3 -7
- package/docs/configure/app/output/{disable-css-module-extension.mdx → disable-css-module-extension.md} +3 -7
- package/docs/configure/app/output/{disable-inline-runtime-chunk.mdx → disable-inline-runtime-chunk.md} +0 -4
- package/docs/configure/app/output/{disable-svgr.mdx → disable-svgr.md} +0 -4
- package/docs/configure/app/output/{disable-ts-checker.mdx → disable-ts-checker.md} +0 -4
- package/docs/configure/app/output/{dist-path.mdx → dist-path.md} +3 -11
- package/docs/configure/app/output/{enable-asset-manifest.mdx → enable-asset-manifest.md} +0 -4
- package/docs/configure/app/output/{enable-css-module-tsdeclaration.mdx → enable-css-module-tsdeclaration.md} +0 -4
- package/docs/configure/app/output/{enable-inline-route-manifests.mdx → enable-inline-route-manifests.md} +0 -4
- package/docs/configure/app/output/{externals.mdx → externals.md} +3 -7
- package/docs/configure/app/output/filename-hash.md +10 -0
- package/docs/configure/app/output/{filename.mdx → filename.md} +3 -7
- package/docs/configure/app/output/inject-styles.md +10 -0
- package/docs/configure/app/output/{inline-scripts.mdx → inline-scripts.md} +4 -8
- package/docs/configure/app/output/{inline-styles.mdx → inline-styles.md} +4 -8
- package/docs/configure/app/output/{legal-comments.mdx → legal-comments.md} +3 -7
- package/docs/configure/app/output/{minify.mdx → minify.md} +3 -7
- package/docs/configure/app/output/{override-browserslist.mdx → override-browserslist.md} +4 -8
- package/docs/configure/app/output/polyfill.md +12 -0
- package/docs/configure/app/output/{source-map.mdx → source-map.md} +3 -7
- package/docs/configure/app/output/{split-route-chunks.mdx → split-route-chunks.md} +0 -4
- package/docs/configure/app/output/{ssg.mdx → ssg.md} +3 -7
- package/docs/configure/app/output/{ssgByEntries.mdx → ssgByEntries.md} +1 -4
- package/docs/configure/app/output/{svg-default-export.mdx → svg-default-export.md} +0 -4
- package/docs/configure/app/output/{temp-dir.mdx → temp-dir.md} +0 -4
- package/docs/configure/app/performance/{build-cache.mdx → build-cache.md} +3 -7
- package/docs/configure/app/performance/{chunk-split.mdx → chunk-split.md} +3 -7
- package/docs/configure/app/performance/{dns-prefetch.mdx → dns-prefetch.md} +3 -7
- package/docs/configure/app/performance/preconnect.md +16 -0
- package/docs/configure/app/performance/{prefetch.mdx → prefetch.md} +3 -7
- package/docs/configure/app/performance/{preload.mdx → preload.md} +3 -7
- package/docs/configure/app/performance/{print-file-size.mdx → print-file-size.md} +3 -7
- package/docs/configure/app/performance/profile.md +10 -0
- package/docs/configure/app/performance/remove-console.md +10 -0
- package/docs/configure/app/performance/remove-moment-locale.md +10 -0
- package/docs/configure/app/performance/{rsdoctor.mdx → rsdoctor.md} +0 -4
- package/docs/configure/app/{plugins.mdx → plugins.md} +4 -4
- package/docs/configure/app/resolve/{alias-strategy.mdx → alias-strategy.md} +3 -7
- package/docs/configure/app/resolve/alias.md +9 -0
- package/docs/configure/app/resolve/{condition-names.mdx → condition-names.md} +3 -8
- package/docs/configure/app/resolve/{dedupe.mdx → dedupe.md} +3 -7
- package/docs/configure/app/resolve/{extensions.mdx → extensions.md} +3 -8
- package/docs/configure/app/runtime/{0-intro.mdx → 0-intro.md} +1 -4
- package/docs/configure/app/runtime/{plugins.mdx → plugins.md} +1 -1
- package/docs/configure/app/runtime/{router.mdx → router.md} +3 -7
- package/docs/configure/app/security/{check-syntax.mdx → check-syntax.md} +0 -4
- package/docs/configure/app/security/{nonce.mdx → nonce.md} +3 -7
- package/docs/configure/app/security/{sri.mdx → sri.md} +0 -4
- package/docs/configure/app/server/{base-url.mdx → base-url.md} +0 -4
- package/docs/configure/app/server/{port.mdx → port.md} +3 -7
- package/docs/configure/app/server/{public-routes.mdx → public-routes.md} +0 -4
- package/docs/configure/app/server/{routes.mdx → routes.md} +1 -5
- package/docs/configure/app/server/{rsc.mdx → rsc.md} +2 -6
- package/docs/configure/app/server/{ssr-by-entries.mdx → ssr-by-entries.md} +1 -5
- package/docs/configure/app/server/ssr.md +80 -0
- package/docs/configure/app/server/{tsconfig-path.mdx → tsconfig-path.md} +0 -4
- package/docs/configure/app/source/{alias-strategy.mdx → alias-strategy.md} +4 -8
- package/docs/configure/app/source/{alias.mdx → alias.md} +4 -8
- package/docs/configure/app/source/{config-dir.mdx → config-dir.md} +1 -5
- package/docs/configure/app/source/{decorators.mdx → decorators.md} +0 -4
- package/docs/configure/app/source/{define.mdx → define.md} +3 -7
- package/docs/configure/app/source/{disable-default-entries.mdx → disable-default-entries.md} +2 -6
- package/docs/{components/module-federation.mdx → configure/app/source/enable-async-entry.md} +47 -0
- package/docs/configure/app/source/{enable-async-pre-entry.mdx → enable-async-pre-entry.md} +0 -4
- package/docs/configure/app/source/{entries-dir.mdx → entries-dir.md} +0 -4
- package/docs/configure/app/source/{entries.mdx → entries.md} +1 -5
- package/docs/configure/app/source/{exclude.mdx → exclude.md} +4 -8
- package/docs/configure/app/source/{global-vars.mdx → global-vars.md} +0 -4
- package/docs/configure/app/source/{include.mdx → include.md} +4 -8
- package/docs/configure/app/source/{main-entry-name.mdx → main-entry-name.md} +0 -4
- package/docs/configure/app/source/{pre-entry.mdx → pre-entry.md} +3 -7
- package/docs/configure/app/source/{react-compiler.mdx → react-compiler.md} +0 -4
- package/docs/configure/app/source/{transform-import.mdx → transform-import.md} +3 -7
- package/docs/configure/app/{split-chunks.mdx → split-chunks.md} +3 -3
- package/docs/configure/app/tools/{autoprefixer.mdx → autoprefixer.md} +0 -4
- package/docs/configure/app/tools/{bundler-chain.mdx → bundler-chain.md} +0 -4
- package/docs/configure/app/tools/{css-extract.mdx → css-extract.md} +3 -7
- package/docs/configure/app/tools/{css-loader.mdx → css-loader.md} +3 -7
- package/docs/configure/app/tools/{dev-server.mdx → dev-server.md} +0 -4
- package/docs/configure/app/tools/{html-plugin.mdx → html-plugin.md} +3 -7
- package/docs/configure/app/tools/{less.mdx → less.md} +0 -4
- package/docs/configure/app/tools/{lightningcss-loader.mdx → lightningcss-loader.md} +3 -7
- package/docs/configure/app/tools/{minify-css.mdx → minify-css.md} +0 -4
- package/docs/configure/app/tools/{postcss.mdx → postcss.md} +3 -7
- package/docs/configure/app/tools/rspack.md +10 -0
- package/docs/configure/app/tools/{sass.mdx → sass.md} +0 -4
- package/docs/configure/app/tools/style-loader.md +10 -0
- package/docs/configure/app/tools/{swc.mdx → swc.md} +4 -8
- package/docs/configure/app/tools/{ts-checker.mdx → ts-checker.md} +20 -7
- package/docs/configure/app/{usage.mdx → usage.md} +1 -1
- package/docs/guides/advanced-features/bff/{cross-project.mdx → cross-project.md} +1 -2
- package/docs/guides/advanced-features/bff/{data-platform.mdx → data-platform.md} +0 -4
- package/docs/guides/advanced-features/bff/{extend-server.mdx → extend-server.md} +1 -1
- package/docs/guides/advanced-features/bff/frameworks.md +243 -0
- package/docs/guides/advanced-features/bff/{function.mdx → function.md} +60 -7
- package/docs/guides/advanced-features/bff/{operators.mdx → operators.md} +2 -77
- package/docs/{components/bff-upload.mdx → guides/advanced-features/bff/upload.md} +4 -0
- package/docs/guides/advanced-features/{bff.mdx → bff.md} +0 -4
- package/docs/guides/advanced-features/{build-performance.mdx → build-performance.md} +3 -7
- package/docs/guides/advanced-features/{compatibility.mdx → compatibility.md} +54 -15
- package/docs/guides/advanced-features/international/{advanced.mdx → advanced.md} +0 -4
- package/docs/guides/advanced-features/international/{api.mdx → api.md} +16 -20
- package/docs/guides/advanced-features/international/{best-practices.mdx → best-practices.md} +0 -4
- package/docs/guides/advanced-features/international/configuration.md +228 -0
- package/docs/guides/advanced-features/international/{locale-detection.mdx → locale-detection.md} +25 -29
- package/docs/guides/advanced-features/international/{quick-start.mdx → quick-start.md} +29 -13
- package/docs/guides/advanced-features/international/{resource-loading.mdx → resource-loading.md} +11 -15
- package/docs/guides/advanced-features/international/{routing.mdx → routing.md} +12 -16
- package/docs/guides/advanced-features/international.md +27 -0
- package/docs/guides/advanced-features/{low-level.mdx → low-level.md} +17 -21
- package/docs/guides/advanced-features/page-performance/{code-split.mdx → code-split.md} +2 -6
- package/docs/guides/advanced-features/page-performance/{inline-assets.mdx → inline-assets.md} +3 -7
- package/docs/guides/advanced-features/page-performance/{optimize-bundle.mdx → optimize-bundle.md} +4 -8
- package/docs/{components/internal-logger.mdx → guides/advanced-features/server-monitor/logger.md} +16 -0
- package/docs/guides/advanced-features/server-monitor/metrics.md +58 -0
- package/docs/guides/advanced-features/server-monitor/{monitors.mdx → monitors.md} +3 -3
- package/docs/guides/advanced-features/{source-build.mdx → source-build.md} +1 -5
- package/docs/guides/advanced-features/{web-server.mdx → web-server.md} +1 -9
- package/docs/guides/basic-features/{alias.mdx → alias.md} +3 -7
- package/docs/guides/basic-features/css/{css-in-js.mdx → css-in-js.md} +12 -9
- package/docs/guides/basic-features/css/{css-modules.mdx → css-modules.md} +3 -3
- package/docs/guides/basic-features/css/{css.mdx → css.md} +2 -6
- package/docs/guides/basic-features/data/{data-cache.mdx → data-cache.md} +1 -6
- package/docs/guides/basic-features/data/{data-fetch.mdx → data-fetch.md} +4 -8
- package/docs/guides/basic-features/data/{data-write.mdx → data-write.md} +6 -9
- package/docs/guides/basic-features/debug/{mock.mdx → mock.md} +1 -5
- package/docs/guides/basic-features/debug/{proxy.mdx → proxy.md} +1 -5
- package/docs/guides/basic-features/debug/{using-storybook.mdx → using-storybook.md} +20 -8
- package/docs/guides/basic-features/{deploy.mdx → deploy.md} +23 -13
- package/docs/guides/basic-features/{env-vars.mdx → env-vars.md} +8 -12
- package/docs/guides/basic-features/{html.mdx → html.md} +3 -7
- package/docs/guides/basic-features/{output-files.mdx → output-files.md} +6 -10
- package/docs/guides/basic-features/render/{before-render.mdx → before-render.md} +1 -1
- package/docs/guides/basic-features/render/overview.md +47 -0
- package/docs/guides/basic-features/render/{rsc.mdx → rsc.md} +12 -20
- package/docs/guides/basic-features/render/{ssg.mdx → ssg.md} +71 -10
- package/docs/guides/basic-features/render/{ssr-cache.mdx → ssr-cache.md} +5 -5
- package/docs/guides/basic-features/render/{ssr.mdx → ssr.md} +10 -12
- package/docs/guides/basic-features/render/{streaming-ssr.mdx → streaming-ssr.md} +5 -8
- package/docs/guides/basic-features/routes/{config-routes.mdx → config-routes.md} +10 -11
- package/docs/guides/basic-features/routes/{routes.mdx → routes.md} +8 -16
- package/docs/guides/basic-features/static-assets/{json-files.mdx → json-files.md} +0 -4
- package/docs/guides/basic-features/static-assets/{svg-assets.mdx → svg-assets.md} +3 -7
- package/docs/guides/basic-features/static-assets/{wasm-assets.mdx → wasm-assets.md} +1 -5
- package/docs/guides/basic-features/{static-assets.mdx → static-assets.md} +10 -14
- package/docs/guides/basic-features/testing/{playwright.mdx → playwright.md} +12 -3
- package/docs/guides/basic-features/testing/{rstest.mdx → rstest.md} +70 -11
- package/docs/guides/concept/{builder.mdx → builder.md} +3 -26
- package/docs/guides/concept/{entries.mdx → entries.md} +11 -17
- package/docs/guides/concept/{server.mdx → server.md} +3 -3
- package/docs/guides/get-started/{ai-coding-agents.mdx → ai-coding-agents.md} +4 -9
- package/docs/guides/get-started/glossary.md +63 -0
- package/docs/guides/get-started/{introduction.mdx → introduction.md} +1 -6
- package/docs/guides/get-started/quick-start.md +269 -0
- package/docs/guides/get-started/{tech-stack.mdx → tech-stack.md} +9 -15
- package/docs/guides/get-started/{ultramodern.mdx → ultramodern.md} +19 -24
- package/docs/guides/get-started/{upgrade.mdx → upgrade.md} +21 -12
- package/docs/guides/topic-detail/module-federation/{application.mdx → application.md} +3 -3
- package/docs/guides/topic-detail/module-federation/{deploy.mdx → deploy.md} +2 -2
- package/docs/guides/topic-detail/module-federation/{i18n.mdx → i18n.md} +14 -14
- package/docs/guides/topic-detail/module-federation/{introduce.mdx → introduce.md} +2 -3
- package/docs/guides/topic-detail/module-federation/{ssr.mdx → ssr.md} +12 -7
- package/docs/guides/topic-detail/module-federation/{usage.mdx → usage.md} +20 -3
- package/docs/guides/troubleshooting/{builder.mdx → builder.md} +10 -14
- package/docs/guides/troubleshooting/{cli.mdx → cli.md} +0 -4
- package/docs/guides/troubleshooting/{dependencies.mdx → dependencies.md} +7 -11
- package/docs/guides/troubleshooting/{hmr.mdx → hmr.md} +5 -9
- package/docs/guides/upgrade/{config.mdx → config.md} +8 -5
- package/docs/guides/upgrade/{entry.mdx → entry.md} +6 -6
- package/docs/guides/upgrade/{other.mdx → other.md} +8 -8
- package/docs/guides/upgrade/{overview.mdx → overview.md} +4 -4
- package/docs/guides/upgrade/{tailwindcss.mdx → tailwindcss.md} +0 -1
- package/docs/guides/upgrade/web-server.md +11 -11
- package/docs/index.md +33 -4
- package/docs/llms.txt +290 -0
- package/docs/plugin/cli-plugins/api.md +573 -0
- package/docs/plugin/cli-plugins/life-cycle.md +2 -0
- package/docs/plugin/introduction.md +152 -0
- package/docs/plugin/official/cli-plugins/plugin-bff.md +5 -0
- package/docs/plugin/official/cli-plugins/plugin-ssg.md +5 -0
- package/docs/plugin/official/cli-plugins/plugin-styled-components.md +5 -0
- package/docs/plugin/official/cli-plugins.md +4 -0
- package/docs/plugin/plugin-system.md +238 -0
- package/docs/plugin/runtime-plugins/api.md +194 -0
- package/docs/plugin/runtime-plugins/life-cycle.md +2 -0
- package/docs/plugin/server-plugins/api.md +209 -0
- package/docs/plugin/server-plugins/life-cycle.md +13 -0
- package/docs/tutorials/examples/csr-auth.md +9 -0
- package/docs/tutorials/foundations/introduction.md +16 -0
- package/package.json +32 -14
- package/docs/_nav.json +0 -36
- package/docs/apis/_meta.json +0 -13
- package/docs/apis/app/hooks/_meta.json +0 -28
- package/docs/apis/app/hooks/config/_meta.json +0 -1
- package/docs/apis/app/runtime/_meta.json +0 -32
- package/docs/components/auto-upgrade.mdx +0 -0
- package/docs/components/build-output.mdx +0 -45
- package/docs/components/bundler.mdx +0 -3
- package/docs/components/convention-routing-motivation.mdx +0 -0
- package/docs/components/debug-app.mdx +0 -15
- package/docs/components/default-browserslist.mdx +0 -7
- package/docs/components/deploy-command.mdx +0 -14
- package/docs/components/deploy.mdx +0 -1
- package/docs/components/enable-bff-caution.mdx +0 -3
- package/docs/components/enable-bff.mdx +0 -56
- package/docs/components/enable-ssg.mdx +0 -49
- package/docs/components/entry-mode.mdx +0 -0
- package/docs/components/entry-scan-logic.mdx +0 -7
- package/docs/components/extend-bff-function.mdx +0 -3
- package/docs/components/hono.mdx +0 -120
- package/docs/components/init-app.mdx +0 -93
- package/docs/components/init-rspack-app.mdx +0 -5
- package/docs/components/internal-metrics.mdx +0 -20
- package/docs/components/international/custom-instance-code.mdx +0 -16
- package/docs/components/international/init-options-desc.mdx +0 -1
- package/docs/components/international/install-command.mdx +0 -10
- package/docs/components/international/instance-code.mdx +0 -16
- package/docs/components/international/introduce.mdx +0 -5
- package/docs/components/international/platform-support.mdx +0 -0
- package/docs/components/language-config.mdx +0 -9
- package/docs/components/micro-frontend.mdx +0 -6
- package/docs/components/micro-master-manifest-config.mdx +0 -15
- package/docs/components/micro-runtime-config.mdx +0 -17
- package/docs/components/new-entry-tooltip.mdx +0 -0
- package/docs/components/nodeVersion.mdx +0 -28
- package/docs/components/other-plugins.mdx +0 -0
- package/docs/components/output-asset-prefix-extend.mdx +0 -0
- package/docs/components/output-distpath-warning.mdx +0 -0
- package/docs/components/output-polyfill-extend.mdx +0 -1
- package/docs/components/prerequisites.mdx +0 -18
- package/docs/components/release-note.mdx +0 -1
- package/docs/components/routes-practice.mdx +0 -0
- package/docs/components/rsbuild-config-tooltip.mdx +0 -5
- package/docs/components/rsbuild.mdx +0 -3
- package/docs/components/rsc-deploy-tip.mdx +0 -1
- package/docs/components/rspack.mdx +0 -3
- package/docs/components/rspackTip.mdx +0 -7
- package/docs/components/runtime-cli-config.mdx +0 -0
- package/docs/components/serve-command.mdx +0 -22
- package/docs/components/ssr-monitor.mdx +0 -3
- package/docs/components/stream-ssr-performance.mdx +0 -0
- package/docs/components/swc.mdx +0 -3
- package/docs/components/tech-stack-node-framework.mdx +0 -1
- package/docs/components/turtorials-example-list.mdx +0 -2
- package/docs/components/ua-polyfill.mdx +0 -44
- package/docs/components/upgrade-browserslist.mdx +0 -0
- package/docs/components/upgrade-config-deploy.mdx +0 -0
- package/docs/components/upgrade-faq.mdx +0 -0
- package/docs/configure/_meta.json +0 -78
- package/docs/configure/app/dev/hmr.mdx +0 -14
- package/docs/configure/app/dev/live-reload.mdx +0 -14
- package/docs/configure/app/dev/progress-bar.mdx +0 -23
- package/docs/configure/app/html/inject.mdx +0 -14
- package/docs/configure/app/html/output-structure.mdx +0 -14
- package/docs/configure/app/html/script-loading.mdx +0 -14
- package/docs/configure/app/html/template.mdx +0 -14
- package/docs/configure/app/html/title.mdx +0 -22
- package/docs/configure/app/output/asset-prefix.mdx +0 -18
- package/docs/configure/app/output/filename-hash.mdx +0 -14
- package/docs/configure/app/output/inject-styles.mdx +0 -14
- package/docs/configure/app/output/polyfill.mdx +0 -18
- package/docs/configure/app/performance/preconnect.mdx +0 -20
- package/docs/configure/app/performance/profile.mdx +0 -14
- package/docs/configure/app/performance/remove-console.mdx +0 -14
- package/docs/configure/app/performance/remove-moment-locale.mdx +0 -14
- package/docs/configure/app/resolve/alias.mdx +0 -13
- package/docs/configure/app/server/ssr.mdx +0 -85
- package/docs/configure/app/source/enable-async-entry.mdx +0 -54
- package/docs/configure/app/tools/rspack.mdx +0 -14
- package/docs/configure/app/tools/style-loader.mdx +0 -14
- package/docs/guides/_meta.json +0 -37
- package/docs/guides/advanced-features/_meta.json +0 -32
- package/docs/guides/advanced-features/bff/_meta.json +0 -10
- package/docs/guides/advanced-features/bff/frameworks.mdx +0 -131
- package/docs/guides/advanced-features/bff/upload.mdx +0 -7
- package/docs/guides/advanced-features/international/_meta.json +0 -10
- package/docs/guides/advanced-features/international/configuration.mdx +0 -222
- package/docs/guides/advanced-features/international.mdx +0 -29
- package/docs/guides/advanced-features/page-performance/_meta.json +0 -1
- package/docs/guides/advanced-features/server-monitor/_meta.json +0 -1
- package/docs/guides/advanced-features/server-monitor/logger.mdx +0 -19
- package/docs/guides/advanced-features/server-monitor/metrics.mdx +0 -41
- package/docs/guides/basic-features/_meta.json +0 -49
- package/docs/guides/basic-features/css/_meta.json +0 -1
- package/docs/guides/basic-features/data/_meta.json +0 -1
- package/docs/guides/basic-features/debug/_meta.json +0 -1
- package/docs/guides/basic-features/render/_meta.json +0 -1
- package/docs/guides/basic-features/render/overview.mdx +0 -51
- package/docs/guides/basic-features/routes/_meta.json +0 -1
- package/docs/guides/basic-features/static-assets/_meta.json +0 -1
- package/docs/guides/basic-features/testing/_meta.json +0 -1
- package/docs/guides/concept/_meta.json +0 -1
- package/docs/guides/get-started/_meta.json +0 -9
- package/docs/guides/get-started/glossary.mdx +0 -63
- package/docs/guides/get-started/quick-start.mdx +0 -92
- package/docs/guides/topic-detail/_meta.json +0 -8
- package/docs/guides/topic-detail/module-federation/_meta.json +0 -1
- package/docs/guides/troubleshooting/_meta.json +0 -1
- package/docs/guides/upgrade/_meta.json +0 -1
- package/scripts/copy-main-doc.mjs +0 -50
- /package/docs/guides/advanced-features/bff/{sdk.mdx → sdk.md} +0 -0
- /package/docs/guides/advanced-features/page-performance/{react-compiler.mdx → react-compiler.md} +0 -0
- /package/docs/guides/basic-features/css/{tailwindcss.mdx → tailwindcss.md} +0 -0
- /package/docs/guides/basic-features/debug/{rsdoctor.mdx → rsdoctor.md} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The CLI body lives in the compiled ESM output; a CommonJS shim keeps the
|
|
3
|
+
// shebang and stays executable on any Node without a loader.
|
|
4
|
+
const path = require('path');
|
|
5
|
+
import('../dist/esm-node/bundleDocs.mjs').then(m =>
|
|
6
|
+
m.runBundleDocsCli(path.resolve(__dirname, '..')),
|
|
7
|
+
);
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
(()=>{
|
|
25
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
26
|
+
})();
|
|
27
|
+
(()=>{
|
|
28
|
+
__webpack_require__.r = (exports1)=>{
|
|
29
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
30
|
+
value: 'Module'
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
33
|
+
value: true
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
var __webpack_exports__ = {};
|
|
38
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
+
bundleDocs: ()=>bundleDocs,
|
|
41
|
+
runBundleDocsCli: ()=>runBundleDocsCli
|
|
42
|
+
});
|
|
43
|
+
const external_node_fs_namespaceObject = require("node:fs");
|
|
44
|
+
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
45
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
46
|
+
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
47
|
+
const DEFAULT_INDEX_FILE = 'llms.txt';
|
|
48
|
+
const DEFAULT_EXCLUDED_DIRS = [
|
|
49
|
+
'zh'
|
|
50
|
+
];
|
|
51
|
+
function bundleDocs({ source, target, indexFile = DEFAULT_INDEX_FILE, excludedDirs = DEFAULT_EXCLUDED_DIRS }) {
|
|
52
|
+
if (!external_node_fs_default().existsSync(source)) {
|
|
53
|
+
console.warn(`[bundle-docs] docs build output not found: ${source}`);
|
|
54
|
+
console.warn('[bundle-docs] skipping the bundled docs — build the docs site first if you need them');
|
|
55
|
+
return 0;
|
|
56
|
+
}
|
|
57
|
+
external_node_fs_default().rmSync(target, {
|
|
58
|
+
recursive: true,
|
|
59
|
+
force: true
|
|
60
|
+
});
|
|
61
|
+
const isBundled = (rel)=>rel === indexFile || rel.endsWith('.md') && !excludedDirs.some((dir)=>rel.startsWith(`${dir}${external_node_path_default().sep}`));
|
|
62
|
+
let count = 0;
|
|
63
|
+
for (const entry of external_node_fs_default().readdirSync(source, {
|
|
64
|
+
recursive: true,
|
|
65
|
+
withFileTypes: true
|
|
66
|
+
})){
|
|
67
|
+
if (!entry.isFile()) continue;
|
|
68
|
+
const from = external_node_path_default().join(entry.parentPath ?? entry.path, entry.name);
|
|
69
|
+
const rel = external_node_path_default().relative(source, from);
|
|
70
|
+
if (!isBundled(rel)) continue;
|
|
71
|
+
const to = external_node_path_default().join(target, rel);
|
|
72
|
+
external_node_fs_default().mkdirSync(external_node_path_default().dirname(to), {
|
|
73
|
+
recursive: true
|
|
74
|
+
});
|
|
75
|
+
external_node_fs_default().copyFileSync(from, to);
|
|
76
|
+
count++;
|
|
77
|
+
}
|
|
78
|
+
if (0 === count) throw new Error(`[bundle-docs] no files copied from ${source}`);
|
|
79
|
+
return count;
|
|
80
|
+
}
|
|
81
|
+
function parseArgs(argv) {
|
|
82
|
+
const options = {};
|
|
83
|
+
for(let i = 0; i < argv.length; i += 2){
|
|
84
|
+
const key = argv[i]?.replace(/^--/, '');
|
|
85
|
+
const value = argv[i + 1];
|
|
86
|
+
if (key && value) options[key] = value;
|
|
87
|
+
}
|
|
88
|
+
return options;
|
|
89
|
+
}
|
|
90
|
+
function runBundleDocsCli(pkgRoot) {
|
|
91
|
+
const args = parseArgs(process.argv.slice(2));
|
|
92
|
+
const source = args.source ? external_node_path_default().resolve(process.cwd(), args.source) : external_node_path_default().resolve(pkgRoot, '../../document/doc_build');
|
|
93
|
+
const target = args.target ? external_node_path_default().resolve(process.cwd(), args.target) : external_node_path_default().resolve(pkgRoot, 'docs');
|
|
94
|
+
try {
|
|
95
|
+
const count = bundleDocs({
|
|
96
|
+
source,
|
|
97
|
+
target,
|
|
98
|
+
indexFile: args.index
|
|
99
|
+
});
|
|
100
|
+
if (count > 0) console.log(`[bundle-docs] bundled ${count} doc files into docs`);
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error(error.message);
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.bundleDocs = __webpack_exports__.bundleDocs;
|
|
107
|
+
exports.runBundleDocsCli = __webpack_exports__.runBundleDocsCli;
|
|
108
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
109
|
+
"bundleDocs",
|
|
110
|
+
"runBundleDocsCli"
|
|
111
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
112
|
+
Object.defineProperty(exports, '__esModule', {
|
|
113
|
+
value: true
|
|
114
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import node_fs from "node:fs";
|
|
2
|
+
import node_path from "node:path";
|
|
3
|
+
const DEFAULT_INDEX_FILE = 'llms.txt';
|
|
4
|
+
const DEFAULT_EXCLUDED_DIRS = [
|
|
5
|
+
'zh'
|
|
6
|
+
];
|
|
7
|
+
function bundleDocs({ source, target, indexFile = DEFAULT_INDEX_FILE, excludedDirs = DEFAULT_EXCLUDED_DIRS }) {
|
|
8
|
+
if (!node_fs.existsSync(source)) {
|
|
9
|
+
console.warn(`[bundle-docs] docs build output not found: ${source}`);
|
|
10
|
+
console.warn('[bundle-docs] skipping the bundled docs — build the docs site first if you need them');
|
|
11
|
+
return 0;
|
|
12
|
+
}
|
|
13
|
+
node_fs.rmSync(target, {
|
|
14
|
+
recursive: true,
|
|
15
|
+
force: true
|
|
16
|
+
});
|
|
17
|
+
const isBundled = (rel)=>rel === indexFile || rel.endsWith('.md') && !excludedDirs.some((dir)=>rel.startsWith(`${dir}${node_path.sep}`));
|
|
18
|
+
let count = 0;
|
|
19
|
+
for (const entry of node_fs.readdirSync(source, {
|
|
20
|
+
recursive: true,
|
|
21
|
+
withFileTypes: true
|
|
22
|
+
})){
|
|
23
|
+
if (!entry.isFile()) continue;
|
|
24
|
+
const from = node_path.join(entry.parentPath ?? entry.path, entry.name);
|
|
25
|
+
const rel = node_path.relative(source, from);
|
|
26
|
+
if (!isBundled(rel)) continue;
|
|
27
|
+
const to = node_path.join(target, rel);
|
|
28
|
+
node_fs.mkdirSync(node_path.dirname(to), {
|
|
29
|
+
recursive: true
|
|
30
|
+
});
|
|
31
|
+
node_fs.copyFileSync(from, to);
|
|
32
|
+
count++;
|
|
33
|
+
}
|
|
34
|
+
if (0 === count) throw new Error(`[bundle-docs] no files copied from ${source}`);
|
|
35
|
+
return count;
|
|
36
|
+
}
|
|
37
|
+
function parseArgs(argv) {
|
|
38
|
+
const options = {};
|
|
39
|
+
for(let i = 0; i < argv.length; i += 2){
|
|
40
|
+
const key = argv[i]?.replace(/^--/, '');
|
|
41
|
+
const value = argv[i + 1];
|
|
42
|
+
if (key && value) options[key] = value;
|
|
43
|
+
}
|
|
44
|
+
return options;
|
|
45
|
+
}
|
|
46
|
+
function runBundleDocsCli(pkgRoot) {
|
|
47
|
+
const args = parseArgs(process.argv.slice(2));
|
|
48
|
+
const source = args.source ? node_path.resolve(process.cwd(), args.source) : node_path.resolve(pkgRoot, '../../document/doc_build');
|
|
49
|
+
const target = args.target ? node_path.resolve(process.cwd(), args.target) : node_path.resolve(pkgRoot, 'docs');
|
|
50
|
+
try {
|
|
51
|
+
const count = bundleDocs({
|
|
52
|
+
source,
|
|
53
|
+
target,
|
|
54
|
+
indexFile: args.index
|
|
55
|
+
});
|
|
56
|
+
if (count > 0) console.log(`[bundle-docs] bundled ${count} doc files into docs`);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(error.message);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export { bundleDocs, runBundleDocsCli };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import node_fs from "node:fs";
|
|
3
|
+
import node_path from "node:path";
|
|
4
|
+
const DEFAULT_INDEX_FILE = 'llms.txt';
|
|
5
|
+
const DEFAULT_EXCLUDED_DIRS = [
|
|
6
|
+
'zh'
|
|
7
|
+
];
|
|
8
|
+
function bundleDocs({ source, target, indexFile = DEFAULT_INDEX_FILE, excludedDirs = DEFAULT_EXCLUDED_DIRS }) {
|
|
9
|
+
if (!node_fs.existsSync(source)) {
|
|
10
|
+
console.warn(`[bundle-docs] docs build output not found: ${source}`);
|
|
11
|
+
console.warn('[bundle-docs] skipping the bundled docs — build the docs site first if you need them');
|
|
12
|
+
return 0;
|
|
13
|
+
}
|
|
14
|
+
node_fs.rmSync(target, {
|
|
15
|
+
recursive: true,
|
|
16
|
+
force: true
|
|
17
|
+
});
|
|
18
|
+
const isBundled = (rel)=>rel === indexFile || rel.endsWith('.md') && !excludedDirs.some((dir)=>rel.startsWith(`${dir}${node_path.sep}`));
|
|
19
|
+
let count = 0;
|
|
20
|
+
for (const entry of node_fs.readdirSync(source, {
|
|
21
|
+
recursive: true,
|
|
22
|
+
withFileTypes: true
|
|
23
|
+
})){
|
|
24
|
+
if (!entry.isFile()) continue;
|
|
25
|
+
const from = node_path.join(entry.parentPath ?? entry.path, entry.name);
|
|
26
|
+
const rel = node_path.relative(source, from);
|
|
27
|
+
if (!isBundled(rel)) continue;
|
|
28
|
+
const to = node_path.join(target, rel);
|
|
29
|
+
node_fs.mkdirSync(node_path.dirname(to), {
|
|
30
|
+
recursive: true
|
|
31
|
+
});
|
|
32
|
+
node_fs.copyFileSync(from, to);
|
|
33
|
+
count++;
|
|
34
|
+
}
|
|
35
|
+
if (0 === count) throw new Error(`[bundle-docs] no files copied from ${source}`);
|
|
36
|
+
return count;
|
|
37
|
+
}
|
|
38
|
+
function parseArgs(argv) {
|
|
39
|
+
const options = {};
|
|
40
|
+
for(let i = 0; i < argv.length; i += 2){
|
|
41
|
+
const key = argv[i]?.replace(/^--/, '');
|
|
42
|
+
const value = argv[i + 1];
|
|
43
|
+
if (key && value) options[key] = value;
|
|
44
|
+
}
|
|
45
|
+
return options;
|
|
46
|
+
}
|
|
47
|
+
function runBundleDocsCli(pkgRoot) {
|
|
48
|
+
const args = parseArgs(process.argv.slice(2));
|
|
49
|
+
const source = args.source ? node_path.resolve(process.cwd(), args.source) : node_path.resolve(pkgRoot, '../../document/doc_build');
|
|
50
|
+
const target = args.target ? node_path.resolve(process.cwd(), args.target) : node_path.resolve(pkgRoot, 'docs');
|
|
51
|
+
try {
|
|
52
|
+
const count = bundleDocs({
|
|
53
|
+
source,
|
|
54
|
+
target,
|
|
55
|
+
indexFile: args.index
|
|
56
|
+
});
|
|
57
|
+
if (count > 0) console.log(`[bundle-docs] bundled ${count} doc files into docs`);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error(error.message);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export { bundleDocs, runBundleDocsCli };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface BundleDocsOptions {
|
|
2
|
+
/** Docs site build output (e.g. `doc_build`). */
|
|
3
|
+
source: string;
|
|
4
|
+
/** Directory to write the bundle to. */
|
|
5
|
+
target: string;
|
|
6
|
+
/** Index file to ship alongside the pages. */
|
|
7
|
+
indexFile?: string;
|
|
8
|
+
/** Top-level directories to skip. */
|
|
9
|
+
excludedDirs?: string[];
|
|
10
|
+
}
|
|
11
|
+
/** @returns files copied, or 0 when the source is absent */
|
|
12
|
+
export declare function bundleDocs({ source, target, indexFile, excludedDirs, }: BundleDocsOptions): number;
|
|
13
|
+
/**
|
|
14
|
+
* `modern-bundle-docs --source <doc_build> --target <pkg>/docs`; both default
|
|
15
|
+
* to this repo's layout.
|
|
16
|
+
*
|
|
17
|
+
* @param pkgRoot supplied by the bin shim — the compiled module cannot know
|
|
18
|
+
* its own package root portably across output formats.
|
|
19
|
+
*/
|
|
20
|
+
export declare function runBundleDocsCli(pkgRoot: string): void;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 1
|
|
3
|
-
---
|
|
4
|
-
|
|
5
1
|
# Commands
|
|
6
2
|
|
|
7
3
|
UltraModern.js has some built-in commands that can help you quickly start a development server, build production environment code, and more.
|
|
@@ -69,7 +65,7 @@ modern dev --entry foo,bar
|
|
|
69
65
|
|
|
70
66
|
## modern build
|
|
71
67
|
|
|
72
|
-
The `modern build` command will build production-ready artifacts in the `dist/` directory by default. You can specify the output directory by modifying the configuration [`output.distPath`](/configure/app/output/dist-path).
|
|
68
|
+
The `modern build` command will build production-ready artifacts in the `dist/` directory by default. You can specify the output directory by modifying the configuration [`output.distPath`](/configure/app/output/dist-path.md).
|
|
73
69
|
|
|
74
70
|
```bash
|
|
75
71
|
Usage: modern build [options]
|
|
@@ -134,9 +130,28 @@ The request body always includes `appName`, `reason`, and `phase`. It includes `
|
|
|
134
130
|
modern runtime fallback-signal --app crm-shell --reason remote_load_failed --phase load --json
|
|
135
131
|
```
|
|
136
132
|
|
|
137
|
-
|
|
133
|
+
## modern serve
|
|
134
|
+
|
|
135
|
+
The `modern serve` command is used to start an UltraModern.js project in the production environment. It can also be used to preview the artifacts built for the production environment locally. Please note that you need to execute the [`build`](/apis/app/commands.md#modern-build) command beforehand to generate the corresponding artifacts.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
Usage: modern serve [options]
|
|
139
|
+
|
|
140
|
+
Options:
|
|
141
|
+
-c --config <config> specify the configuration file, which can be a relative or absolute path
|
|
142
|
+
-h, --help show command help
|
|
143
|
+
--api-only only run API service
|
|
144
|
+
```
|
|
138
145
|
|
|
139
|
-
|
|
146
|
+
By default, the project will run in `localhost:8080`, you can modify the server port number with `server.port`:
|
|
147
|
+
|
|
148
|
+
```js
|
|
149
|
+
export default defineConfig({
|
|
150
|
+
server: {
|
|
151
|
+
port: 8081,
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
```
|
|
140
155
|
|
|
141
156
|
## modern inspect
|
|
142
157
|
|
|
@@ -200,6 +215,17 @@ Inspect config succeed, open following files to view the content:
|
|
|
200
215
|
- Modern.js Config: /root/my-project/dist/modern.js.config.mjs
|
|
201
216
|
```
|
|
202
217
|
|
|
203
|
-
|
|
218
|
+
## modern deploy
|
|
219
|
+
|
|
220
|
+
The `modern deploy` command is used to generate artifacts required for the deployment platform.
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
Usage: modern deploy [options]
|
|
224
|
+
|
|
225
|
+
Options:
|
|
226
|
+
-c --config <config> Specify configuration file path, either relative or absolute
|
|
227
|
+
-s --skip-build Skip the build stage
|
|
228
|
+
-h, --help Display command help
|
|
229
|
+
```
|
|
204
230
|
|
|
205
|
-
|
|
231
|
+
For more details, refer to [Deploy Application](/guides/basic-features/deploy.md).
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
title: lambda/*.ts
|
|
3
|
-
sidebar_position: 3
|
|
4
|
-
---
|
|
5
|
-
# lambda/*.ts
|
|
1
|
+
# lambda/\*.ts
|
|
6
2
|
|
|
7
3
|
After enabling BFF, the files under the `lambda/` directory will be registered as BFF routes according to conventions.
|
|
8
4
|
|
|
@@ -10,4 +6,4 @@ After enabling BFF, the files under the `lambda/` directory will be registered a
|
|
|
10
6
|
The files can be written in `js` or `ts` languages, but they must use `esm` syntax to export functions.
|
|
11
7
|
:::
|
|
12
8
|
|
|
13
|
-
For detailed information, refer to [BFF API Routes](/guides/advanced-features/bff/function.
|
|
9
|
+
For detailed information, refer to [BFF API Routes](/guides/advanced-features/bff/function.md#api-routes).
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: favicon.*
|
|
3
|
-
sidebar_position: 3
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# Favicon
|
|
7
2
|
|
|
8
|
-
When there is a `favicon.*` file in the `config` directory at the root of the project, Modern.js will automatically set the file to the [html.favicon](/configure/app/html/favicon) configuration option for generating the favicon icon on the page:
|
|
3
|
+
When there is a `favicon.*` file in the `config` directory at the root of the project, Modern.js will automatically set the file to the [html.favicon](/configure/app/html/favicon.md) configuration option for generating the favicon icon on the page:
|
|
9
4
|
|
|
10
5
|
```
|
|
11
6
|
./config
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: html/
|
|
3
|
-
sidebar_position: 1
|
|
4
|
-
---
|
|
5
1
|
# html/
|
|
6
2
|
|
|
7
3
|
You can inject custom HTML fragments at different locations of the default internal HTML template through the `config/html` directory.
|
|
8
4
|
|
|
9
|
-
For specific usage, please refer to: [Custom HTML](/guides/basic-features/html).
|
|
5
|
+
For specific usage, please refer to: [Custom HTML](/guides/basic-features/html.md).
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: icon.*
|
|
3
|
-
sidebar_position: 2
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# Apple Touch Icon
|
|
7
2
|
|
|
8
|
-
When there is an `icon.*` file in the `config` directory at the root of the project, Modern.js will automatically set the file to the [html.appIcon](/configure/app/html/app-icon) configuration option for generating the Apple Touch Icon icon under the iOS system.
|
|
3
|
+
When there is an `icon.*` file in the `config` directory at the root of the project, Modern.js will automatically set the file to the [html.appIcon](/configure/app/html/app-icon.md) configuration option for generating the Apple Touch Icon icon under the iOS system.
|
|
9
4
|
|
|
10
5
|
```
|
|
11
6
|
./config
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: mock/
|
|
3
|
-
sidebar_position: 5
|
|
4
|
-
---
|
|
5
1
|
# mock/
|
|
6
2
|
|
|
7
3
|
When there is a `config/mock/index.ts` or `config/mock/index.js` file in the
|
|
8
4
|
project directory, Modern.js will automatically enable the Mock service during
|
|
9
|
-
development. Use [`dev.mockDir`](/configure/app/dev/mock-dir) to customize
|
|
5
|
+
development. Use [`dev.mockDir`](/configure/app/dev/mock-dir.md) to customize
|
|
10
6
|
this directory.
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: upload/
|
|
3
|
-
sidebar_position: 4
|
|
4
|
-
---
|
|
5
1
|
# upload/
|
|
6
2
|
|
|
7
3
|
Any static assets can be placed in the `upload/` directory.
|
|
@@ -26,7 +22,7 @@ If the file ends with `.min.js`, it will not be compressed.
|
|
|
26
22
|
|
|
27
23
|
## More Usage
|
|
28
24
|
|
|
29
|
-
In React components, you can add this prefix through [Environment Variables](/guides/basic-features/env-vars.
|
|
25
|
+
In React components, you can add this prefix through [Environment Variables](/guides/basic-features/env-vars.md#asset_prefix):
|
|
30
26
|
|
|
31
27
|
```tsx
|
|
32
28
|
export default () => {
|
|
@@ -36,13 +32,13 @@ export default () => {
|
|
|
36
32
|
};
|
|
37
33
|
```
|
|
38
34
|
|
|
39
|
-
In addition, whether it is in [Custom HTML](/guides/basic-features/html) or any HTML file under [`config/public/`](/apis/app/hooks/config/public), you can directly use HTML tags to reference resources in the `config/upload/` directory:
|
|
35
|
+
In addition, whether it is in [Custom HTML](/guides/basic-features/html.md) or any HTML file under [`config/public/`](/apis/app/hooks/config/public.md), you can directly use HTML tags to reference resources in the `config/upload/` directory:
|
|
40
36
|
|
|
41
37
|
```html
|
|
42
38
|
<script src="/upload/index.js"></script>
|
|
43
39
|
```
|
|
44
40
|
|
|
45
|
-
If you set the [`dev.assetPrefix`](/configure/app/dev/asset-prefix) or [`output.assetPrefix`](/configure/app/output/asset-prefix) prefix, you can also use template syntax to add the prefix directly:
|
|
41
|
+
If you set the [`dev.assetPrefix`](/configure/app/dev/asset-prefix.md) or [`output.assetPrefix`](/configure/app/output/asset-prefix.md) prefix, you can also use template syntax to add the prefix directly:
|
|
46
42
|
|
|
47
43
|
```html
|
|
48
44
|
<script src="<%=assetPrefix %>/upload/index.js"></script>
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: modern.config.ts
|
|
3
|
-
sidebar_position: 8
|
|
4
|
-
---
|
|
5
1
|
# modern.config.ts
|
|
6
2
|
|
|
7
3
|
The Modern.js configuration file. Through this file, you can personalize the configuration of various aspects of the current project.
|
|
8
4
|
|
|
9
|
-
To learn more about how to use the configuration, please refer to [Configuration Usage](/configure/app/usage).
|
|
5
|
+
To learn more about how to use the configuration, please refer to [Configuration Usage](/configure/app/usage.md).
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: modern.server.ts
|
|
3
|
-
sidebar_position: 1
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# modern.server.ts
|
|
7
2
|
|
|
8
|
-
This file extends the Modern.js Server. In this file, you can configure [Middleware](/guides/advanced-features/web-server.
|
|
3
|
+
This file extends the Modern.js Server. In this file, you can configure [Middleware](/guides/advanced-features/web-server.md#middleware), [RenderMiddleware](/guides/advanced-features/web-server.md#rendermiddleware), or [Plugin](/guides/advanced-features/web-server.md#plugin) for the Server that starts with the Modern.js project.
|
|
9
4
|
|
|
10
5
|
You can intercept and handle requests and responses, perform authentication and role checks, preprocess requests, and handle exceptions, etc. You can also insert specific business logic into the built-in processing logic (including route matching, resource addressing, header injection, page rendering, and static web hosting).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# App.tsx
|
|
2
2
|
|
|
3
|
-
The entry identifier when using [Self-controlled Routing](/guides/concept/entries.
|
|
3
|
+
The entry identifier when using [Self-controlled Routing](/guides/concept/entries.md#self-controlled-routing) in the application.
|
|
4
4
|
|
|
5
5
|
`App.tsx` is not the actual application entry; Modern.js will automatically generate the real entry file, which is roughly as follows:
|
|
6
6
|
|
|
@@ -26,5 +26,5 @@ render(<ModernRoot />, 'root');
|
|
|
26
26
|
When `createRoot` is executed, it will retrieve the registered Global App and generate the actual React component.
|
|
27
27
|
|
|
28
28
|
:::note
|
|
29
|
-
In scenarios with multiple entry points, each entry can have its own independent `App.tsx`. For more details, see [Entry Points](/guides/concept/entries).
|
|
29
|
+
In scenarios with multiple entry points, each entry can have its own independent `App.tsx`. For more details, see [Entry Points](/guides/concept/entries.md).
|
|
30
30
|
:::
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: entry.ts
|
|
3
|
-
sidebar_position: 4
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# entry.tsx
|
|
7
2
|
|
|
8
|
-
Normally, the [`routes/`](/apis/app/hooks/src/routes.
|
|
3
|
+
Normally, the [`routes/`](/apis/app/hooks/src/routes.md) and [`App.tsx`](/apis/app/hooks/src/app.md) hook files can meet our needs. When we need to add custom behavior before component rendering or take full control of the Rspack packaging entry, we can create `entry.ts` file in the src or entry directory. Here are two cases for discussion。
|
|
9
4
|
|
|
10
5
|
## Add custom behavior before Render
|
|
11
6
|
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: modern.runtime.ts
|
|
3
|
-
sidebar_position: 4
|
|
4
|
-
---
|
|
5
1
|
# modern.runtime.ts
|
|
6
2
|
|
|
7
3
|
The Modern.js Runtime configuration file allows for personalized configuration of the Runtime capabilities for the current project.
|
|
8
4
|
|
|
9
|
-
For specific usage of the configuration, please refer to [Runtime Configuration](/configure/app/runtime/0-intro.
|
|
5
|
+
For specific usage of the configuration, please refer to [Runtime Configuration](/configure/app/runtime/0-intro.md).
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: routes/
|
|
3
|
-
sidebar_position: 2
|
|
4
|
-
---
|
|
5
1
|
# routes/
|
|
6
2
|
|
|
7
|
-
The identifier for the entry point when the application uses [Conventional Routing](/guides/basic-features/routes/routes#conventional-routing).
|
|
3
|
+
The identifier for the entry point when the application uses [Conventional Routing](/guides/basic-features/routes/routes.md#conventional-routing).
|
|
8
4
|
|
|
9
5
|
Conventional routing uses `routes/` as the convention for the entry point and analyzes the files in the `src/routes` directory to obtain the client-side routing configuration.
|
|
10
6
|
|
|
@@ -52,9 +48,9 @@ If the directory name of the route file is named with `[]`, the generated route
|
|
|
52
48
|
|
|
53
49
|
The `routes/[id]/page.tsx` file will be converted to the `/:id` route. Except for the `/blog` route that can be matched exactly, all other `/xxx` routes will be matched to this route.
|
|
54
50
|
|
|
55
|
-
In the component, you can use [useParams](/apis/app/runtime/router/router#useparams) to obtain the corresponding named parameter.
|
|
51
|
+
In the component, you can use [useParams](/apis/app/runtime/router/router.md#useparams) to obtain the corresponding named parameter.
|
|
56
52
|
|
|
57
|
-
When using the [loader](/guides/basic-features/data/data-fetch#the-loader-function) function to obtain data, `params` will be passed as an input parameter to the `loader` function, and the corresponding parameter can be obtained through the attribute of `params`.
|
|
53
|
+
When using the [loader](/guides/basic-features/data/data-fetch.md#the-loader-function) function to obtain data, `params` will be passed as an input parameter to the `loader` function, and the corresponding parameter can be obtained through the attribute of `params`.
|
|
58
54
|
|
|
59
55
|
## Layout Component
|
|
60
56
|
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
title: '*.[server|node].tsx'
|
|
3
|
-
sidebar_position: 8
|
|
4
|
-
---
|
|
5
|
-
# *.[server|node].tsx
|
|
1
|
+
# \*.\[server|node].tsx
|
|
6
2
|
|
|
7
3
|
Used in the application project to place server-side code. When `*.tsx` and `*.[server|node].tsx` coexist, SSR will prefer to use the `*.[server|node].tsx` file instead of the `*.tsx` file when rendering on the server.
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: render
|
|
3
|
-
---
|
|
4
1
|
# render
|
|
5
2
|
|
|
6
3
|
It is used to render project components.
|
|
@@ -21,7 +18,7 @@ export function render(App: React.ReactElement, id?: HTMLElement | string): Prom
|
|
|
21
18
|
|
|
22
19
|
### Parameters
|
|
23
20
|
|
|
24
|
-
- `App`:An instance of ReactElement created through [`createRoot`](
|
|
21
|
+
- `App`:An instance of ReactElement created through [`createRoot`](/apis/app/runtime/core/create-root.md).
|
|
25
22
|
- `id`:The id of the DOM root element to be mounted, such as "root".
|
|
26
23
|
|
|
27
24
|
## Example
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: RuntimeContext
|
|
3
|
-
---
|
|
4
1
|
# RuntimeContext
|
|
5
2
|
|
|
6
3
|
`RuntimeContext` is a React Context used to get Runtime context information in components. This Context can be accessed through React's `use` or `useContext` API.
|
|
@@ -157,4 +154,3 @@ export default function MyComponent() {
|
|
|
157
154
|
return <div>{message}</div>;
|
|
158
155
|
}
|
|
159
156
|
```
|
|
160
|
-
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: router
|
|
3
|
-
sidebar_position: 1
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# router
|
|
7
2
|
|
|
8
3
|
:::info
|
|
9
4
|
The router solution based on [react-router](https://reactrouter.com/).
|
|
10
5
|
|
|
11
|
-
This page documents the React Router runtime export (`@modern-js/runtime/router`)
|
|
6
|
+
This page documents the React Router runtime export (`@modern-js/runtime/router`).\
|
|
12
7
|
If your app uses TanStack Router (`--router tanstack`), use `@modern-js/plugin-tanstack/runtime` and refer to TanStack Router API docs.
|
|
13
8
|
|
|
14
9
|
:::
|