@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.99 → 3.8.1-ultramodern.2
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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Enable SSR
|
|
6
6
|
|
|
7
|
-
Using the application created in [Using Module Federation](/guides/topic-detail/module-federation/usage) as an example, you only need to add the `server.ssr` configuration to both the producer and the consumer:
|
|
7
|
+
Using the application created in [Using Module Federation](/guides/topic-detail/module-federation/usage.md) as an example, you only need to add the `server.ssr` configuration to both the producer and the consumer:
|
|
8
8
|
|
|
9
9
|
```ts title="modern.config.ts"
|
|
10
10
|
import { appTools, defineConfig } from '@modern-js/app-tools';
|
|
@@ -74,14 +74,19 @@ Before enabling this for broad production traffic, verify the following scenario
|
|
|
74
74
|
## Example Rollout Scenarios
|
|
75
75
|
|
|
76
76
|
1. Baseline enablement (host + remote):
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
|
|
78
|
+
- Configure both sides with `server.ssr.mode: 'stream'` and `moduleFederationAppSSR: true`.
|
|
79
|
+
- Verify SSR HTML contains either remote shell markers or an explicit typed fallback contract that names the client-hydrated remotes.
|
|
80
|
+
|
|
79
81
|
2. Remote unavailable fallback:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
|
|
83
|
+
- Keep host flag enabled, stop one remote service, request a remote route.
|
|
84
|
+
- Verify response is still `200`, fallback boundary renders, and server does not crash.
|
|
85
|
+
|
|
82
86
|
3. Timeout and contract-error drill:
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
|
|
88
|
+
- Inject a delayed remote/data response and a malformed payload in CI.
|
|
89
|
+
- Verify deterministic fallback UI and matching telemetry reason codes.
|
|
85
90
|
|
|
86
91
|
## Data Fetching
|
|
87
92
|
|
|
@@ -2,15 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
To use Module Federation in Modern.js, we recommend using the official plugin `@module-federation/modern-js-v3`.
|
|
4
4
|
|
|
5
|
-
This section will introduce how to set up both producer and consumer applications using the official plugin. First, create two applications by following the [Modern.js Quick Start](/guides/get-started/quick-start).
|
|
5
|
+
This section will introduce how to set up both producer and consumer applications using the official plugin. First, create two applications by following the [Modern.js Quick Start](/guides/get-started/quick-start.md).
|
|
6
6
|
|
|
7
7
|
## Install the Plugin
|
|
8
8
|
|
|
9
9
|
After creating the applications, install the plugin for both projects:
|
|
10
10
|
|
|
11
|
-
import { PackageManagerTabs } from '@theme';
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
```sh [npm]
|
|
13
|
+
npm add @module-federation/modern-js-v3
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```sh [yarn]
|
|
17
|
+
yarn add @module-federation/modern-js-v3
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```sh [pnpm]
|
|
21
|
+
pnpm add @module-federation/modern-js-v3
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```sh [bun]
|
|
25
|
+
bun add @module-federation/modern-js-v3
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```sh [deno]
|
|
29
|
+
deno add npm:@module-federation/modern-js-v3
|
|
30
|
+
```
|
|
14
31
|
|
|
15
32
|
## Register the Plugin
|
|
16
33
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 3
|
|
3
|
-
---
|
|
4
|
-
|
|
5
1
|
# Build FAQ
|
|
6
2
|
|
|
7
3
|
If you encounter any build-related issues, you can refer to the current document for troubleshooting.
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
***
|
|
10
6
|
|
|
11
7
|
### Rsbuild FAQ
|
|
12
8
|
|
|
@@ -16,7 +12,7 @@ Modern.js is internally based on [Rsbuild](https://v2.rsbuild.rs/) and encapsula
|
|
|
16
12
|
- [Rsbuild - Exceptions FAQ](https://v2.rsbuild.rs/guide/faq/exceptions)
|
|
17
13
|
- [Rsbuild - HMR FAQ](https://v2.rsbuild.rs/guide/faq/hmr)
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
***
|
|
20
16
|
|
|
21
17
|
### How to view the final generated Rspack configuration?
|
|
22
18
|
|
|
@@ -31,7 +27,7 @@ Inspect config succeed, open following files to view the content:
|
|
|
31
27
|
- Rspack Config (web): /root/my-project/dist/rspack.config.web.mjs
|
|
32
28
|
```
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
***
|
|
35
31
|
|
|
36
32
|
### Failed import other modules in Monorepo?
|
|
37
33
|
|
|
@@ -41,24 +37,24 @@ Therefore, when you reference the source code of other sub-projects, you may enc
|
|
|
41
37
|
|
|
42
38
|
There are several solutions to this problem:
|
|
43
39
|
|
|
44
|
-
1. You can enable the source code build mode to compile other sub-projects within the monorepo. Please refer to [Source Code Build Mode](/guides/advanced-features/source-build.
|
|
45
|
-
2. You can add the `source.include` configuration option to specify the directories or modules that need to be additionally compiled. Please refer to [Usage of source.include](/configure/app/source/include.
|
|
40
|
+
1. You can enable the source code build mode to compile other sub-projects within the monorepo. Please refer to [Source Code Build Mode](/guides/advanced-features/source-build.md) for more information.
|
|
41
|
+
2. You can add the `source.include` configuration option to specify the directories or modules that need to be additionally compiled. Please refer to [Usage of source.include](/configure/app/source/include.md) for more information.
|
|
46
42
|
3. You can pre-build the sub-projects that need to be referenced, generate the corresponding build artifacts, and then reference the build artifacts in the current project instead of referencing the source code.
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
***
|
|
49
45
|
|
|
50
46
|
### Find `exports is not defined` runtime error?
|
|
51
47
|
|
|
52
48
|
If the compilation is succeed, but the `exports is not defined` error appears after opening the page, it is usually because a CommonJS module is compiled by Babel.
|
|
53
49
|
|
|
54
|
-
Under normal circumstances, Modern.js will not use Babel to compile CommonJS modules. If the [source.include](/
|
|
50
|
+
Under normal circumstances, Modern.js will not use Babel to compile CommonJS modules. If the [source.include](/configure/app/source/include.md) configuration option is used in the project, some CommonJS modules may be added to the Babel compilation.
|
|
55
51
|
|
|
56
52
|
There are two workarounds for this problem:
|
|
57
53
|
|
|
58
54
|
1. Avoid adding CommonJS modules to Babel compilation.
|
|
59
55
|
2. Set Babel's `sourceType` configuration to `unambiguous`.
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
***
|
|
62
58
|
|
|
63
59
|
### Compile error "Error: ES Modules may not assign module.exports or exports.\*, Use ESM export syntax"?
|
|
64
60
|
|
|
@@ -70,7 +66,7 @@ Error: ES Modules may not assign module.exports or exports.*, Use ESM export syn
|
|
|
70
66
|
|
|
71
67
|
For more information, please refer to issue: [babel#12731](https://github.com/babel/babel/issues/12731).
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
***
|
|
74
70
|
|
|
75
71
|
### The compilation progress bar is stuck, but there is no Error log in the terminal?
|
|
76
72
|
|
|
@@ -83,7 +79,7 @@ If this problem occurs after you modify the Babel config, it is recommended to c
|
|
|
83
79
|
1. You have configured a plugin or preset that does not exist, maybe the name is misspelled, or it is not installed correctly.
|
|
84
80
|
2. Whether multiple babel-plugin-imports are configured, but the name of each babel-plugin-import is not declared in the third item of the array.
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
***
|
|
87
83
|
|
|
88
84
|
### Compilation error after referencing a type from lodash
|
|
89
85
|
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 1
|
|
3
|
-
---
|
|
4
|
-
|
|
5
1
|
# Dependencies FAQ
|
|
6
2
|
|
|
7
3
|
### How to check the actual installed version of a dependency in the project?
|
|
@@ -34,7 +30,7 @@ devDependencies:
|
|
|
34
30
|
└── @modern-js/plugin x.y.z
|
|
35
31
|
```
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
***
|
|
38
34
|
|
|
39
35
|
### Getting "The engine "node" is incompatible" error during dependency installation?
|
|
40
36
|
|
|
@@ -65,7 +61,7 @@ nvm alias default 22
|
|
|
65
61
|
|
|
66
62
|
For local development environments, it is recommended to use [fnm](https://github.com/Schniz/fnm), which has better performance than nvm and has similar usage.
|
|
67
63
|
|
|
68
|
-
|
|
64
|
+
***
|
|
69
65
|
|
|
70
66
|
### Getting a ReactNode type error after upgrading dependencies?
|
|
71
67
|
|
|
@@ -88,9 +84,9 @@ The solution is to lock the `@types/react` and `@types/react-dom` in the project
|
|
|
88
84
|
}
|
|
89
85
|
```
|
|
90
86
|
|
|
91
|
-
For methods of locking dependency versions, please refer to [Lock nested dependency](/guides/get-started/upgrade.
|
|
87
|
+
For methods of locking dependency versions, please refer to [Lock nested dependency](/guides/get-started/upgrade.md#lock-nested-dependency).
|
|
92
88
|
|
|
93
|
-
|
|
89
|
+
***
|
|
94
90
|
|
|
95
91
|
### Getting peer dependencies warnings in the console after running `pnpm install`?
|
|
96
92
|
|
|
@@ -98,7 +94,7 @@ The reason for this warning is that the version range of peer dependencies decla
|
|
|
98
94
|
|
|
99
95
|
In most cases, peer dependencies warnings will not affect the project operation and do not need to be processed separately. Please ignore the relevant warnings.
|
|
100
96
|
|
|
101
|
-
|
|
97
|
+
***
|
|
102
98
|
|
|
103
99
|
### What is the minimum supported version of React for the Modern.js framework?
|
|
104
100
|
|
|
@@ -107,7 +103,7 @@ In most cases, peer dependencies warnings will not affect the project operation
|
|
|
107
103
|
- **If you are using Modern.js runtime capabilities** (including SSR, Streaming SSR, data loading, routing, etc.), you must use React 18 or higher. React 16 and React 17 are no longer supported.
|
|
108
104
|
- **If you are only using Modern.js build capabilities** (without runtime), React 16 or React 17 may theoretically work, but it is strongly recommended to upgrade to React 18 or higher for the best experience and full feature support.
|
|
109
105
|
|
|
110
|
-
|
|
106
|
+
***
|
|
111
107
|
|
|
112
108
|
### Type error in Modern.js configuration file?
|
|
113
109
|
|
|
@@ -120,4 +116,4 @@ When you use the Modern.js framework, the above error occurs in the configuratio
|
|
|
120
116
|
|
|
121
117
|
In the monorepo, the above error may also occur due to inconsistent versions of the Modern.js framework used by different sub-projects.
|
|
122
118
|
|
|
123
|
-
For information on how to unify and upgrade dependency versions, please refer to the [Upgrading](/guides/get-started/upgrade) documentation.
|
|
119
|
+
For information on how to unify and upgrade dependency versions, please refer to the [Upgrading](/guides/get-started/upgrade.md) documentation.
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 4
|
|
3
|
-
---
|
|
4
|
-
|
|
5
1
|
# HMR FAQ
|
|
6
2
|
|
|
7
3
|
### How to troubleshooting HMR ineffective issues?
|
|
@@ -27,7 +23,7 @@ Open the browser console and check for the presence of the `[HMR] connected.` lo
|
|
|
27
23
|
- If it is present, the WebSocket connection is working correctly. You can continue with the following steps.
|
|
28
24
|
- If it is not present, open the Network panel in Chrome and check the status of the `ws://[host]:[port]/webpack-hmr` request. If the request is failed, this indicates that the HMR failed because the WebSocket connection was not successfully established.
|
|
29
25
|
|
|
30
|
-
There can be various reasons why the WebSocket connection fails to establish, such as using a network proxy that prevents the WebSocket request from reaching the development server. You can check whether the WebSocket request address matches your development server address. If it does not match, you can configure the WebSocket request address using [tools.devServer.client](/configure/app/tools/dev-server.
|
|
26
|
+
There can be various reasons why the WebSocket connection fails to establish, such as using a network proxy that prevents the WebSocket request from reaching the development server. You can check whether the WebSocket request address matches your development server address. If it does not match, you can configure the WebSocket request address using [tools.devServer.client](/configure/app/tools/dev-server.md#client).
|
|
31
27
|
|
|
32
28
|
#### 2. Check the hot-update Requests
|
|
33
29
|
|
|
@@ -41,7 +37,7 @@ If the content of the request is incorrect, it is likely due to a network proxy.
|
|
|
41
37
|
|
|
42
38
|
If the above two steps do not reveal any issues, it is possible that other factors are causing the HMR to fail. For example, it could be that the code does not meet React's requirements for HMR. You can refer to the following questions for further troubleshooting.
|
|
43
39
|
|
|
44
|
-
|
|
40
|
+
***
|
|
45
41
|
|
|
46
42
|
### HMR not working when external React?
|
|
47
43
|
|
|
@@ -64,7 +60,7 @@ To solve this problem, you need to reference the development builds of React or
|
|
|
64
60
|
|
|
65
61
|
If you are unsure about the type of React build you are using, you can refer to the [React documentation - Use the Production Build](https://legacy.reactjs.org/docs/optimizing-performance.html#use-the-production-build).
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
***
|
|
68
64
|
|
|
69
65
|
### HMR not working when setting filename hash in development mode?
|
|
70
66
|
|
|
@@ -99,7 +95,7 @@ export default {
|
|
|
99
95
|
};
|
|
100
96
|
```
|
|
101
97
|
|
|
102
|
-
|
|
98
|
+
***
|
|
103
99
|
|
|
104
100
|
### HMR not working when updating React components?
|
|
105
101
|
|
|
@@ -133,7 +129,7 @@ const MyComponent = () => <div>Hello World</div>;
|
|
|
133
129
|
export default MyComponent;
|
|
134
130
|
```
|
|
135
131
|
|
|
136
|
-
|
|
132
|
+
***
|
|
137
133
|
|
|
138
134
|
### HMR not working when use https?
|
|
139
135
|
|
|
@@ -334,7 +334,7 @@ export default {
|
|
|
334
334
|
|
|
335
335
|
### tools.rsdoctor
|
|
336
336
|
|
|
337
|
-
**Change**: This configuration has been deprecated. In v3, use [`performance.rsdoctor`](/configure/app/performance/rsdoctor) to opt in to Rsdoctor diagnostics.
|
|
337
|
+
**Change**: This configuration has been deprecated. In v3, use [`performance.rsdoctor`](/configure/app/performance/rsdoctor.md) to opt in to Rsdoctor diagnostics.
|
|
338
338
|
|
|
339
339
|
**Migration Example**:
|
|
340
340
|
|
|
@@ -409,7 +409,7 @@ export default {
|
|
|
409
409
|
|
|
410
410
|
### tools.tailwindcss
|
|
411
411
|
|
|
412
|
-
**Change**: This configuration has been deprecated, please refer to [Tailwind Plugin Changes](/guides/upgrade/tailwindcss) and use Rsbuild's approach to integrate Tailwind CSS.
|
|
412
|
+
**Change**: This configuration has been deprecated, please refer to [Tailwind Plugin Changes](/guides/upgrade/tailwindcss.md) and use Rsbuild's approach to integrate Tailwind CSS.
|
|
413
413
|
|
|
414
414
|
### tools.tsLoader
|
|
415
415
|
|
|
@@ -580,9 +580,12 @@ server: {
|
|
|
580
580
|
|
|
581
581
|
If none of the above exist, create a `.browserslistrc` file with the following content for browsers supporting ES6:
|
|
582
582
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
583
|
+
```yaml title=".browserslistrc"
|
|
584
|
+
chrome >= 87
|
|
585
|
+
edge >= 88
|
|
586
|
+
firefox >= 78
|
|
587
|
+
safari >= 14
|
|
588
|
+
```
|
|
586
589
|
|
|
587
590
|
### output.enableAssetFallback
|
|
588
591
|
|
|
@@ -45,7 +45,7 @@ src/
|
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
:::tip
|
|
48
|
-
You can modify the entry scanning directory through the [source.entriesDir](/configure/app/source/entries-dir) configuration.
|
|
48
|
+
You can modify the entry scanning directory through the [source.entriesDir](/configure/app/source/entries-dir.md) configuration.
|
|
49
49
|
:::
|
|
50
50
|
|
|
51
51
|
## Migration Steps
|
|
@@ -456,8 +456,8 @@ export default defineRuntimeConfig(entryName => {
|
|
|
456
456
|
|
|
457
457
|
## Related Links
|
|
458
458
|
|
|
459
|
-
- [Page Entries](/guides/concept/entries)
|
|
460
|
-
- [Runtime Configuration](/configure/app/runtime/0-intro)
|
|
461
|
-
- [Runtime Plugins](/plugin/introduction.
|
|
462
|
-
- [source.entries Configuration](/configure/app/source/entries)
|
|
463
|
-
- [source.entriesDir Configuration](/configure/app/source/entries-dir)
|
|
459
|
+
- [Page Entries](/guides/concept/entries.md)
|
|
460
|
+
- [Runtime Configuration](/configure/app/runtime/0-intro.md)
|
|
461
|
+
- [Runtime Plugins](/plugin/introduction.md#runtime-插件)
|
|
462
|
+
- [source.entries Configuration](/configure/app/source/entries.md)
|
|
463
|
+
- [source.entriesDir Configuration](/configure/app/source/entries-dir.md)
|
|
@@ -22,10 +22,10 @@ If your project's deployment configuration specifies a particular entry file nam
|
|
|
22
22
|
|
|
23
23
|
Modern.js 3.0 has adjusted some runtime paths, and related import paths need to be updated. The path mapping is as follows:
|
|
24
24
|
|
|
25
|
-
| Old Path
|
|
26
|
-
|
|
27
|
-
| `@modern-js/runtime/bff`
|
|
28
|
-
| `@modern-js/runtime/server` | `@modern-js/server-runtime`
|
|
25
|
+
| Old Path | New Path | Description |
|
|
26
|
+
| --------------------------- | ------------------------------- | ------------------------ |
|
|
27
|
+
| `@modern-js/runtime/bff` | `@modern-js/plugin-bff/runtime` | BFF runtime path |
|
|
28
|
+
| `@modern-js/runtime/server` | `@modern-js/server-runtime` | Server-side runtime path |
|
|
29
29
|
|
|
30
30
|
## useRuntimeContext Deprecated
|
|
31
31
|
|
|
@@ -67,13 +67,13 @@ function App() {
|
|
|
67
67
|
- `context` structure simplified: only contains `request` and `response`, no longer includes `logger`, `metrics`, etc.
|
|
68
68
|
- Return value includes new properties: `initialData`, `routes`, etc.
|
|
69
69
|
|
|
70
|
-
For detailed API documentation, please refer to the [RuntimeContext documentation](/apis/app/runtime/core/runtime-context).
|
|
70
|
+
For detailed API documentation, please refer to the [RuntimeContext documentation](/apis/app/runtime/core/runtime-context.md).
|
|
71
71
|
|
|
72
72
|
## Pages Directory Convention-Based Routing No Longer Supported
|
|
73
73
|
|
|
74
74
|
Modern.js 3.0 no longer supports the `pages` directory convention-based routing introduced in Modern.js 1.0, and now uniformly uses the `routes` directory convention-based routing.
|
|
75
75
|
|
|
76
|
-
If your project uses the `pages` directory, you need to rename the `src/pages` directory to `src/routes` and update all import paths in the project that reference the `pages` directory. For detailed migration steps, please refer to the [Convention-Based Routing documentation](/guides/basic-features/routes/routes).
|
|
76
|
+
If your project uses the `pages` directory, you need to rename the `src/pages` directory to `src/routes` and update all import paths in the project that reference the `pages` directory. For detailed migration steps, please refer to the [Convention-Based Routing documentation](/guides/basic-features/routes/routes.md).
|
|
77
77
|
|
|
78
78
|
## SSR Mode Default Value Change
|
|
79
79
|
|
|
@@ -112,9 +112,9 @@ Modern.js 3.0 removed the `modern new` and `modern upgrade` commands, and you ne
|
|
|
112
112
|
|
|
113
113
|
**Handling**:
|
|
114
114
|
|
|
115
|
-
- **Adding Entries**: You need to manually create entry directories and files according to the documentation. For detailed steps, please refer to the [Page Entries documentation](/guides/concept/entries).
|
|
115
|
+
- **Adding Entries**: You need to manually create entry directories and files according to the documentation. For detailed steps, please refer to the [Page Entries documentation](/guides/concept/entries.md).
|
|
116
116
|
- **Enabling Features**: You need to manually install dependencies and configure according to the corresponding feature documentation. For example, to enable BFF functionality, you need to install the `@modern-js/plugin-bff` plugin and configure it in `modern.config.ts`.
|
|
117
|
-
- **Upgrading Dependencies**: You need to manually update the versions of all `@modern-js/**` packages in `package.json`, then reinstall dependencies. For detailed steps, please refer to the [Version Upgrade documentation](/guides/get-started/upgrade).
|
|
117
|
+
- **Upgrading Dependencies**: You need to manually update the versions of all `@modern-js/**` packages in `package.json`, then reinstall dependencies. For detailed steps, please refer to the [Version Upgrade documentation](/guides/get-started/upgrade.md).
|
|
118
118
|
|
|
119
119
|
:::info Note
|
|
120
120
|
The purpose of removing these commands is to make the documentation more aligned with the default implementation approach of AI Agents, not encapsulating operations, so that developers can more clearly understand the specific steps of each operation, and it is also convenient for AI Agents to directly execute corresponding operations according to the documentation.
|
|
@@ -9,10 +9,10 @@ Modern.js 3.0 brings significant improvements and changes, including:
|
|
|
9
9
|
- **Build Tool Upgrade**: Default use of [Rspack](https://rspack.dev) for building, no longer supporting Webpack. Build configuration is aligned with [Rsbuild](https://v2.rsbuild.rs).
|
|
10
10
|
- **React Ecosystem Upgrade**: Full support for [React 19](https://react.dev/blog/2024/04/25/react-19) and [React Router v7](https://reactrouter.com).
|
|
11
11
|
- **Plugin System Refactoring**: Redesigned plugin API, supporting custom plugins at CLI, Runtime, and Server layers to extend framework capabilities.
|
|
12
|
-
- **React Server Component**: Support for using React Server Component in [CSR](/guides/get-started/glossary#csr) and [SSR](/guides/basic-features/render/ssr) projects.
|
|
13
|
-
- **Internationalization Enhancement**: Provides out-of-the-box [i18n plugin](/guides/advanced-features/international) to simplify internationalization development workflow.
|
|
14
|
-
- **SSG Capability Improvement**: Provides complete [Static Site Generation (SSG)](/guides/basic-features/render/ssg) support.
|
|
15
|
-
- **Route Configuration Enhancement**: Supports [config-based routing](/guides/basic-features/routes/config-routes), which can be used alone or combined with [convention-based routing](/guides/basic-features/routes/routes), providing more flexible route definition.
|
|
12
|
+
- **React Server Component**: Support for using React Server Component in [CSR](/guides/get-started/glossary.md#csr) and [SSR](/guides/basic-features/render/ssr.md) projects.
|
|
13
|
+
- **Internationalization Enhancement**: Provides out-of-the-box [i18n plugin](/guides/advanced-features/international.md) to simplify internationalization development workflow.
|
|
14
|
+
- **SSG Capability Improvement**: Provides complete [Static Site Generation (SSG)](/guides/basic-features/render/ssg.md) support.
|
|
15
|
+
- **Route Configuration Enhancement**: Supports [config-based routing](/guides/basic-features/routes/config-routes.md), which can be used alone or combined with [convention-based routing](/guides/basic-features/routes/routes.md), providing more flexible route definition.
|
|
16
16
|
|
|
17
17
|
## Pre-upgrade Checklist
|
|
18
18
|
|
|
@@ -53,17 +53,17 @@ const middleware: MiddlewareHandler = async (c, next) => {
|
|
|
53
53
|
|
|
54
54
|
### Context API Comparison
|
|
55
55
|
|
|
56
|
-
| Legacy API
|
|
57
|
-
| -------------------- | ---------------------- |
|
|
58
|
-
| `c.request.cookie` | `getCookie(c, 'key')` | Cookie reading
|
|
59
|
-
| `c.req.cookie()` | `getCookie(c, 'key')` | Hono v4 deprecated
|
|
60
|
-
| `c.request.pathname` | `c.req.path` | Request path
|
|
61
|
-
| `c.request.host` | `c.req.header('Host')` | Request host
|
|
62
|
-
| `c.request.query` | `c.req.query()` | Query parameters
|
|
63
|
-
| `c.request.headers` | `c.req.header()` | Request headers
|
|
64
|
-
| `c.response.status` | `c.status()` | Response status code
|
|
65
|
-
| `c.response.set` | `c.res.headers.set` | Set response headers
|
|
66
|
-
| `c.response.raw` | `c.text` / `c.json` | Response body
|
|
56
|
+
| Legacy API | New API | Description |
|
|
57
|
+
| -------------------- | ---------------------- | -------------------- |
|
|
58
|
+
| `c.request.cookie` | `getCookie(c, 'key')` | Cookie reading |
|
|
59
|
+
| `c.req.cookie()` | `getCookie(c, 'key')` | Hono v4 deprecated |
|
|
60
|
+
| `c.request.pathname` | `c.req.path` | Request path |
|
|
61
|
+
| `c.request.host` | `c.req.header('Host')` | Request host |
|
|
62
|
+
| `c.request.query` | `c.req.query()` | Query parameters |
|
|
63
|
+
| `c.request.headers` | `c.req.header()` | Request headers |
|
|
64
|
+
| `c.response.status` | `c.status()` | Response status code |
|
|
65
|
+
| `c.response.set` | `c.res.headers.set` | Set response headers |
|
|
66
|
+
| `c.response.raw` | `c.text` / `c.json` | Response body |
|
|
67
67
|
|
|
68
68
|
## afterRender Hook
|
|
69
69
|
|
package/docs/index.md
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
[NEWUltraModern.js 3.0 is ready for SuperApps→](/guides/get-started/ultramodern)
|
|
2
|
+
|
|
3
|
+
# UltraModern.js 3.0The SuperApp framework for Effect, TanStack, SSR, BFF, and Micro Verticals
|
|
4
|
+
|
|
5
|
+
[UltraModern Guide](/guides/get-started/ultramodern)[Start Building](/guides/get-started/quick-start)
|
|
6
|
+
|
|
7
|
+
[Rust BundlerBuilt with Rspack bundler for faster build speed.](/guides/concept/builder)[Integrated BFFDevelop BFF code in the same project, enjoy simple function calls.](/guides/advanced-features/bff/index)[Nested RoutesFile-as-route, comes with lots performance optimizations.](/guides/basic-features/routes/routes)[Multi-Rendering ModeRSC, SSR, SSG, all out of the box for you.](/guides/basic-features/render/ssr)[CSS SolutionsCSS Modules, CSS-in-JS, Tailwind CSS, take your pick.](/guides/basic-features/css/css)[Easy to ConfigureLaunch with zero configuration, then everything is configurable.](/configure/app/usage)
|
|
8
|
+
|
|
9
|
+
Guide
|
|
10
|
+
|
|
11
|
+
- [Start Building](/guides/get-started/quick-start)
|
|
12
|
+
- [Core Concept](/guides/concept/entries)
|
|
13
|
+
- [Basic Features](/guides/basic-features/routes)
|
|
14
|
+
- [Advanced Features](/guides/advanced-features/bff)
|
|
15
|
+
|
|
16
|
+
API
|
|
17
|
+
|
|
18
|
+
- [Configuration](/configure/app/usage)
|
|
19
|
+
- [Command](/apis/app/commands)
|
|
20
|
+
- [Runtime](/apis/app/runtime/core/bootstrap)
|
|
21
|
+
- [Conventions](/apis/app/hooks/src/app)
|
|
22
|
+
|
|
23
|
+
Topic
|
|
24
|
+
|
|
25
|
+
- [Module Federation](/guides/topic-detail/module-federation/introduce)
|
|
26
|
+
- [Plugin System](/plugin/plugin-system)
|
|
27
|
+
|
|
28
|
+
Help
|
|
29
|
+
|
|
30
|
+
- [Changelog](https://github.com/BleedingDev/ultramodern.js/releases)
|
|
31
|
+
- [GitHub Issues](https://github.com/BleedingDev/ultramodern.js/issues)
|
|
32
|
+
- [Github Discussion](https://github.com/BleedingDev/ultramodern.js/discussions)
|
|
33
|
+
|