@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.99 → 3.8.1-ultramodern.1
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/builder/generator/getBuilderEnvironments.js +73 -11
- package/dist/cjs/bundleDocs.js +114 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +1 -1
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.js +94 -18
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +1 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +14 -0
- package/dist/cjs/ultramodern-release-envelope/framework-output.js +109 -57
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +63 -10
- package/dist/esm/bundleDocs.mjs +62 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +93 -18
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +1 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +14 -0
- package/dist/esm/ultramodern-release-envelope/framework-output.mjs +107 -58
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +63 -10
- package/dist/esm-node/bundleDocs.mjs +63 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +93 -18
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +1 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +14 -0
- package/dist/esm-node/ultramodern-release-envelope/framework-output.mjs +107 -58
- package/dist/types/builder/generator/getBuilderEnvironments.d.ts +29 -0
- package/dist/types/bundleDocs.d.ts +20 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.d.ts +1 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.d.mts +1 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.d.mts +13 -0
- package/dist/types/ultramodern-release-envelope/framework-output.d.ts +1 -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} +16 -22
- 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.md +22 -0
- 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} +16 -33
- 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} +38 -31
- package/docs/guides/get-started/{upgrade.mdx → upgrade.md} +26 -22
- 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 +33 -15
- 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/rsc.mdx +0 -30
- 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
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
"app/usage",
|
|
3
|
-
{
|
|
4
|
-
"type": "dir",
|
|
5
|
-
"name": "app/dev",
|
|
6
|
-
"label": "dev",
|
|
7
|
-
"collapsed": true
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"type": "dir",
|
|
11
|
-
"name": "app/bff",
|
|
12
|
-
"label": "bff",
|
|
13
|
-
"collapsed": true
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "dir",
|
|
17
|
-
"name": "app/html",
|
|
18
|
-
"label": "html",
|
|
19
|
-
"collapsed": true
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"type": "dir",
|
|
23
|
-
"name": "app/tools",
|
|
24
|
-
"label": "tools",
|
|
25
|
-
"collapsed": true
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"type": "dir",
|
|
29
|
-
"name": "app/source",
|
|
30
|
-
"label": "source",
|
|
31
|
-
"collapsed": true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"type": "dir",
|
|
35
|
-
"name": "app/resolve",
|
|
36
|
-
"label": "resolve",
|
|
37
|
-
"collapsed": true
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"type": "dir",
|
|
41
|
-
"name": "app/server",
|
|
42
|
-
"label": "server",
|
|
43
|
-
"collapsed": true
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"type": "dir",
|
|
47
|
-
"name": "app/output",
|
|
48
|
-
"label": "output",
|
|
49
|
-
"collapsed": true
|
|
50
|
-
},
|
|
51
|
-
"app/plugins",
|
|
52
|
-
{
|
|
53
|
-
"type": "dir",
|
|
54
|
-
"name": "app/security",
|
|
55
|
-
"label": "security",
|
|
56
|
-
"collapsed": true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"type": "dir",
|
|
60
|
-
"name": "app/runtime",
|
|
61
|
-
"label": "runtime",
|
|
62
|
-
"collapsed": true
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"type": "dir",
|
|
66
|
-
"name": "app/performance",
|
|
67
|
-
"label": "performance",
|
|
68
|
-
"collapsed": true
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"type": "dir",
|
|
72
|
-
"name": "app/experiments",
|
|
73
|
-
"label": "experiments",
|
|
74
|
-
"collapsed": true
|
|
75
|
-
},
|
|
76
|
-
"app/builder-plugins",
|
|
77
|
-
"app/split-chunks"
|
|
78
|
-
]
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: hmr
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# dev.hmr
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean`
|
|
8
|
-
- **Default:** `true`
|
|
9
|
-
|
|
10
|
-
Whether to enable Hot Module Replacement.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="dev.hmr" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: liveReload
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# dev.liveReload
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean`
|
|
8
|
-
- **Default:** `true`
|
|
9
|
-
|
|
10
|
-
Whether to reload the page when source files are changed.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="dev.liveReload" />
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: progressBar
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# dev.progressBar
|
|
6
|
-
|
|
7
|
-
- **Type:**
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
type ProgressBar =
|
|
11
|
-
| boolean
|
|
12
|
-
| {
|
|
13
|
-
id?: string;
|
|
14
|
-
};
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
- **Default:** true
|
|
18
|
-
|
|
19
|
-
Whether to display progress bar during compilation.
|
|
20
|
-
|
|
21
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
22
|
-
|
|
23
|
-
<RsbuildConfig configName="dev.progressBar" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: inject
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# html.inject
|
|
6
|
-
|
|
7
|
-
- **Type:** `'head' | 'body' | boolean | Function`
|
|
8
|
-
- **Default:** `'head'`
|
|
9
|
-
|
|
10
|
-
Set the inject position of the `<script>` tag.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="html.inject" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: outputStructure
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# html.outputStructure
|
|
6
|
-
|
|
7
|
-
- **Type:** `'flat' | 'nested'`
|
|
8
|
-
- **Default:** `'nested'`
|
|
9
|
-
|
|
10
|
-
Define the directory structure of the HTML output files.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="html.outputStructure" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: scriptLoading
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# html.scriptLoading
|
|
6
|
-
|
|
7
|
-
- **Type:** `'defer' | 'blocking' | 'module'`
|
|
8
|
-
- **Default:** `'defer'`
|
|
9
|
-
|
|
10
|
-
Used to set how `<script>` tags are loaded.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="html.scriptLoading" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: template
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# html.template
|
|
6
|
-
|
|
7
|
-
- **Type:** `string | Function`
|
|
8
|
-
- **Default:**
|
|
9
|
-
|
|
10
|
-
Specifies the file path for the HTML template, which can be a relative or absolute path.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="html.template" />
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: title
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# html.title
|
|
6
|
-
|
|
7
|
-
- **Type:** `string | Function`
|
|
8
|
-
- **Default:** `''`
|
|
9
|
-
|
|
10
|
-
Set the title tag of the HTML page, for example:
|
|
11
|
-
|
|
12
|
-
```js
|
|
13
|
-
export default {
|
|
14
|
-
html: {
|
|
15
|
-
title: 'example',
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
21
|
-
|
|
22
|
-
<RsbuildConfig configName="html.title" />
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: assetPrefix
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# output.assetPrefix
|
|
6
|
-
|
|
7
|
-
- **Type:** `string | 'auto'`
|
|
8
|
-
- **Default:** `'/'`
|
|
9
|
-
|
|
10
|
-
In production mode, use this option to set the URL prefix for static assets, such as setting it to a CDN URL.
|
|
11
|
-
|
|
12
|
-
import OutputAssetPrefixExtend from '@site-docs-en/components/output-asset-prefix-extend';
|
|
13
|
-
|
|
14
|
-
<OutputAssetPrefixExtend />
|
|
15
|
-
|
|
16
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
17
|
-
|
|
18
|
-
<RsbuildConfig configName="output.assetPrefix" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: filenameHash
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# output.filenameHash
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean | string`
|
|
8
|
-
- **Default:** `true`
|
|
9
|
-
|
|
10
|
-
Whether to add a hash value to the filename after the production build.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="output.filenameHash" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: injectStyles
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# output.injectStyles
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean`
|
|
8
|
-
- **Default:** `false`
|
|
9
|
-
|
|
10
|
-
Whether to inject styles into DOM.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="output.injectStyles" />
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: polyfill
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# output.polyfill
|
|
6
|
-
|
|
7
|
-
- **Type:** `'entry' | 'usage' | 'ua' | 'off'`
|
|
8
|
-
- **Default:** `'entry'`
|
|
9
|
-
|
|
10
|
-
Via `output.polyfill` you can configure how the polyfill is injected.
|
|
11
|
-
|
|
12
|
-
import OutputPolyfillExtend from '@site-docs-en/components/output-polyfill-extend';
|
|
13
|
-
|
|
14
|
-
<OutputPolyfillExtend />
|
|
15
|
-
|
|
16
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
17
|
-
|
|
18
|
-
<RsbuildConfig configName="output.polyfill" />
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: preconnect
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# performance.preconnect
|
|
6
|
-
|
|
7
|
-
- **Type:** `undefined | Array<string | PreconnectOption>`
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
interface PreconnectOption {
|
|
11
|
-
href: string;
|
|
12
|
-
crossorigin?: boolean;
|
|
13
|
-
}
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
- **Default:** `undefined`
|
|
17
|
-
|
|
18
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
19
|
-
|
|
20
|
-
<RsbuildConfig configName="performance.preconnect" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: profile
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# performance.profile
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean`
|
|
8
|
-
- **Default:** `false`
|
|
9
|
-
|
|
10
|
-
Whether capture timing information for each module, same as the [profile](https://rspack.rs/config/other-options#profile) config of Rspack.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="performance.profile" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: removeConsole
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# performance.removeConsole
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean | ConsoleType[]`
|
|
8
|
-
- **Default:** `false`
|
|
9
|
-
|
|
10
|
-
Whether to remove `console.[methodName]` in production build.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="performance.removeConsole" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: removeMomentLocale
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# performance.removeMomentLocale
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean`
|
|
8
|
-
- **Default:** `false`
|
|
9
|
-
|
|
10
|
-
Whether to remove the locales of [moment.js](https://momentjs.com/).
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="performance.removeMomentLocale" />
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: alias
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# resolve.alias
|
|
6
|
-
|
|
7
|
-
- **Type:** `string[]`
|
|
8
|
-
|
|
9
|
-
Create aliases for module paths to simplify import paths or redirect module references.
|
|
10
|
-
|
|
11
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
12
|
-
|
|
13
|
-
<RsbuildConfig configName="resolve.alias" />
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: rsc
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# server.rsc
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean`
|
|
8
|
-
- **Default:** `false`
|
|
9
|
-
|
|
10
|
-
Enable React Server Components (RSC) configuration.
|
|
11
|
-
|
|
12
|
-
When set to `true`, enables React Server Components support in Modern.js. This allows components to be rendered on the server, providing better performance and developer experience.
|
|
13
|
-
|
|
14
|
-
```ts title="modern.config.ts"
|
|
15
|
-
export default defineConfig({
|
|
16
|
-
server: {
|
|
17
|
-
rsc: true,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
:::tip Prerequisites
|
|
23
|
-
Before enabling RSC, ensure:
|
|
24
|
-
1. React and React DOM are upgraded to version 19 (recommended 19.2.4 or above)
|
|
25
|
-
2. Install the `react-server-dom-rspack@0.0.2` dependency
|
|
26
|
-
|
|
27
|
-
:::
|
|
28
|
-
|
|
29
|
-
For more information about using RSC, see the [React Server Components guide](/guides/basic-features/render/rsc).
|
|
30
|
-
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ssr
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# server.ssr
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean` | `Object`
|
|
8
|
-
- **Default:** `false`
|
|
9
|
-
|
|
10
|
-
Enable SSR configuration.
|
|
11
|
-
|
|
12
|
-
### Boolean Type
|
|
13
|
-
|
|
14
|
-
When the value type is `boolean`, it indicates whether to enable SSR deployment mode. The default is `false` to disable it.
|
|
15
|
-
|
|
16
|
-
```ts title="modern.config.ts"
|
|
17
|
-
export default defineConfig({
|
|
18
|
-
server: {
|
|
19
|
-
ssr: true,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Object Type
|
|
25
|
-
|
|
26
|
-
When the value type is `Object`, the following properties can be configured:
|
|
27
|
-
|
|
28
|
-
| Name | Type | Default | Description |
|
|
29
|
-
| ---------------- | ------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------- |
|
|
30
|
-
| mode | `string` | `stream` | which defaults to using streaming rendering. Configure `string` to use `renderToString` for rendering |
|
|
31
|
-
| forceCSR | `boolean` | `false` | which is off by default for forcing CSR rendering. Configure `true` to force CSR by adding `?csr=true` or adding `x-modern-ssr-fallback` header when accessing the page |
|
|
32
|
-
| unsafeHeaders | `string[]` | `[]` | For safety reasons, Modern.js does not add excessive content to SSR_DATA. Developers can use this configuration to specify the headers that need to be injected |
|
|
33
|
-
| loaderFailureMode| `clientRender \| errorBoundary` | `errorBoundary` | The default configuration is `'errorBoundary'`, when an error occurs in [data loader](/en/guides/basic-features/data/data-fetch.html#data-loader-recommended), it will default to rendering the [`Error`](/guides/basic-features/routes/routes#error-handling) component of the route. When configured as `'clientRender'`, if a loader throws an error, it switch to client-side rendering,you can use it with [Client Loader](/en/guides/basic-features/data/data-fetch.html#client-loader) |
|
|
34
|
-
| moduleFederationAppSSR | `boolean` | `false` | Enables app-level Module Federation SSR contract handshake. Enable this in both host and remote apps when using app-level MF SSR |
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```ts title="modern.config.ts"
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
server: {
|
|
40
|
-
ssr: {
|
|
41
|
-
forceCSR: true,
|
|
42
|
-
mode: 'stream',
|
|
43
|
-
unsafeHeaders: ['User-Agent'],
|
|
44
|
-
moduleFederationAppSSR: true,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Active Fallback
|
|
51
|
-
|
|
52
|
-
In a production environment, there are scenarios where it is necessary to actively fallback an SSR project to CSR. Examples include
|
|
53
|
-
|
|
54
|
-
1. When the SSR fails, a fallback to the CSR is required to ensure product availability.
|
|
55
|
-
|
|
56
|
-
2. When the SSR is working normally, but there are rendering failures during csr, debugging is required.
|
|
57
|
-
|
|
58
|
-
3. When the SSR server is under heavy load, it may be necessary to fallback some traffic directly to the CSR to avoid service downtime.
|
|
59
|
-
|
|
60
|
-
By configuring `server.ssr.forceCSR` to `true` in the project, you can control this behavior through query strings or request headers.
|
|
61
|
-
|
|
62
|
-
For example, in a custom Web Server middleware, you can actively fallback when traffic exceeds a certain threshold:
|
|
63
|
-
|
|
64
|
-
```ts title="server/modern.server.ts"
|
|
65
|
-
import {
|
|
66
|
-
defineServerConfig,
|
|
67
|
-
type MiddlewareHandler,
|
|
68
|
-
} from '@modern-js/server-runtime';
|
|
69
|
-
|
|
70
|
-
export const handler: MiddlewareHandler = async (c, next) => {
|
|
71
|
-
if (condition) {
|
|
72
|
-
c.set('forceCSR', '1');
|
|
73
|
-
}
|
|
74
|
-
await next();
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export default defineServerConfig({
|
|
78
|
-
middlewares: [
|
|
79
|
-
{
|
|
80
|
-
name: 'request-middleware',
|
|
81
|
-
handler,
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
});
|
|
85
|
-
```
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: enableAsyncEntry
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# source.enableAsyncEntry
|
|
6
|
-
|
|
7
|
-
- **Type:** `boolean`
|
|
8
|
-
- **Default:** `false`
|
|
9
|
-
|
|
10
|
-
This option is used for Rspack Module Federation scenario.
|
|
11
|
-
|
|
12
|
-
When this option is enabled, Modern.js will wrap the automatically generated entry files with dynamic import (Asynchronous Boundaries), allowing page code to consume remote modules generated by Module Federation.
|
|
13
|
-
|
|
14
|
-
## Background
|
|
15
|
-
|
|
16
|
-
import ModuleFederation from '@site-docs-en/components/module-federation.mdx';
|
|
17
|
-
|
|
18
|
-
<ModuleFederation />
|
|
19
|
-
|
|
20
|
-
## Example
|
|
21
|
-
|
|
22
|
-
First, enable this option in the configuration file:
|
|
23
|
-
|
|
24
|
-
```ts title="modern.config.ts"
|
|
25
|
-
export default defineConfig({
|
|
26
|
-
source: {
|
|
27
|
-
enableAsyncEntry: true,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Then run the `dev` or `build` command, and you will see that the files automatically generated by Modern.js have the following structure:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
node_modules
|
|
36
|
-
└─ .modern-js
|
|
37
|
-
└─ main
|
|
38
|
-
├─ bootstrap.jsx # asynchronous entry file
|
|
39
|
-
├─ index.js # real entry code
|
|
40
|
-
└─ index.html
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
The contents of `bootstrap.js` are as follows:
|
|
44
|
-
|
|
45
|
-
```js
|
|
46
|
-
import('./index.jsx');
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
At this point, you can consume any remote module in the current page.
|
|
50
|
-
|
|
51
|
-
:::info
|
|
52
|
-
Modern.js does not have ModuleFederationPlugin plugin built in. Please configure the ModuleFederationPlugin yourself via [tools.bundlerChain](/configure/app/tools/bundler-chain).
|
|
53
|
-
|
|
54
|
-
:::
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: rspack
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# tools.rspack
|
|
6
|
-
|
|
7
|
-
- **Type:** `Rspack.Configuration | Function | undefined`
|
|
8
|
-
- **Default:** `undefined`
|
|
9
|
-
|
|
10
|
-
`tools.rspack` is used to configure [Rspack](https://rspack.rs/).
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="tools.rspack" />
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: styleLoader
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# tools.styleLoader
|
|
6
|
-
|
|
7
|
-
- **Type:** `Object | Function`
|
|
8
|
-
- **Default:** `{}`
|
|
9
|
-
|
|
10
|
-
The config of [style-loader](https://github.com/webpack-contrib/style-loader) can be set through `tools.styleLoader`.
|
|
11
|
-
|
|
12
|
-
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';
|
|
13
|
-
|
|
14
|
-
<RsbuildConfig configName="tools.styleLoader" />
|
package/docs/guides/_meta.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "dir",
|
|
4
|
-
"name": "get-started",
|
|
5
|
-
"label": "gettingStarted"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"type": "dir",
|
|
9
|
-
"name": "concept",
|
|
10
|
-
"label": "concept"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "dir",
|
|
14
|
-
"name": "basic-features",
|
|
15
|
-
"label": "basic"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "dir",
|
|
19
|
-
"name": "advanced-features",
|
|
20
|
-
"label": "advanced"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"type": "dir",
|
|
24
|
-
"name": "topic-detail",
|
|
25
|
-
"label": "topic"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"type": "dir",
|
|
29
|
-
"name": "troubleshooting",
|
|
30
|
-
"label": "troubleshooting"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"type": "dir",
|
|
34
|
-
"name": "upgrade",
|
|
35
|
-
"label": "Upgrade"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "dir",
|
|
4
|
-
"name": "bff",
|
|
5
|
-
"label": "use-bff",
|
|
6
|
-
"collapsed": true
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
"type": "dir",
|
|
11
|
-
"name": "page-performance",
|
|
12
|
-
"label": "page-performance",
|
|
13
|
-
"collapsed": true
|
|
14
|
-
},
|
|
15
|
-
"build-performance",
|
|
16
|
-
"compatibility",
|
|
17
|
-
"low-level",
|
|
18
|
-
"source-build",
|
|
19
|
-
{
|
|
20
|
-
"type": "dir",
|
|
21
|
-
"name": "server-monitor",
|
|
22
|
-
"label": "server-monitor",
|
|
23
|
-
"collapsed": true
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"type": "dir",
|
|
27
|
-
"name": "international",
|
|
28
|
-
"label": "Internationalization",
|
|
29
|
-
"collapsed": true
|
|
30
|
-
},
|
|
31
|
-
"web-server"
|
|
32
|
-
]
|