@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.1 → 3.5.0-ultramodern.100
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.js +0 -0
- package/dist/cjs/builder/generator/createBuilderProviderConfig.js +5 -1
- package/dist/cjs/builder/generator/getBuilderEnvironments.js +20 -16
- package/dist/cjs/builder/shared/builderPlugins/adapterPrecompress.js +13 -4
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +14 -11
- package/dist/cjs/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.js +72 -0
- package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +28 -11
- package/dist/cjs/builder/shared/bundlerPlugins/index.js +13 -6
- package/dist/cjs/builder/shared/lazyCompilation.js +2 -10
- package/dist/cjs/commands/build.js +2 -1
- package/dist/cjs/commands/deploy.js +4 -2
- package/dist/cjs/commands/index.js +0 -8
- package/dist/cjs/config/build-environment.js +268 -0
- package/dist/cjs/config/default.js +2 -0
- package/dist/cjs/config/index.js +11 -4
- package/dist/cjs/config/public.js +46 -0
- package/dist/cjs/index.js +93 -75
- package/dist/cjs/plugins/analyze/getServerRoutes.js +19 -0
- package/dist/cjs/plugins/analyze/index.js +22 -14
- package/dist/cjs/plugins/analyze/utils.js +3 -2
- package/dist/cjs/plugins/backend-federation/codegen.js +255 -0
- package/dist/cjs/plugins/backend-federation/config.js +204 -0
- package/dist/cjs/plugins/backend-federation/emit.js +148 -0
- package/dist/cjs/plugins/backendFederationBuild.js +53 -0
- package/dist/cjs/plugins/deploy/index.js +4 -4
- package/dist/cjs/plugins/deploy/platforms/cloudflare/artifacts.js +127 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/constants.js +141 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/delivery-unit.js +139 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/i18n-worker.js +135 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/index.js +150 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/security-policies.js +205 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/types.js +18 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/utils.js +66 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/worker-manifest.js +208 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare/wrangler-config.js +204 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-contract.js +108 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-plan.js +93 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/identity.js +83 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +188 -0
- package/dist/cjs/{baseline.js → plugins/deploy/platforms/cloudflare-output-verifier/issues.js} +19 -10
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/manifest.js +89 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.js +151 -0
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.js +302 -0
- package/dist/cjs/plugins/deploy/platforms/node.js +20 -2
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
- package/dist/cjs/plugins/deploy/utils/npmAliases.js +226 -0
- package/dist/cjs/plugins/initialize/index.js +4 -3
- package/dist/cjs/plugins/serverBuild.js +3 -2
- package/dist/cjs/plugins/ultramodernReleaseEnvelope.js +100 -0
- package/dist/cjs/presetUltramodern.js +33 -2
- package/dist/cjs/ultramodern-release-envelope/canonical.js +68 -0
- package/dist/cjs/ultramodern-release-envelope/framework-output.js +597 -0
- package/dist/cjs/ultramodern-release-envelope/index.js +399 -0
- package/dist/cjs/ultramodern-release-envelope/types.js +51 -0
- package/dist/cjs/ultramodern-release-identity.js +110 -0
- package/dist/esm/builder/generator/createBuilderProviderConfig.mjs +5 -1
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +19 -15
- package/dist/esm/builder/shared/builderPlugins/adapterPrecompress.mjs +13 -4
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +15 -12
- package/dist/esm/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +30 -0
- package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.mjs +24 -10
- package/dist/esm/builder/shared/bundlerPlugins/index.mjs +1 -0
- package/dist/esm/builder/shared/lazyCompilation.mjs +1 -3
- package/dist/esm/commands/build.mjs +2 -1
- package/dist/esm/commands/deploy.mjs +4 -2
- package/dist/esm/commands/index.mjs +0 -5
- package/dist/esm/config/build-environment.mjs +224 -0
- package/dist/esm/config/default.mjs +2 -0
- package/dist/esm/config/index.mjs +1 -0
- package/dist/esm/config/public.mjs +1 -0
- package/dist/esm/index.mjs +20 -5
- package/dist/esm/plugins/analyze/getHtmlTemplate.mjs +2 -2
- package/dist/esm/plugins/analyze/getServerRoutes.mjs +17 -1
- package/dist/esm/plugins/analyze/index.mjs +22 -14
- package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +2 -2
- package/dist/esm/plugins/analyze/utils.mjs +3 -2
- package/dist/esm/plugins/backend-federation/codegen.mjs +204 -0
- package/dist/esm/plugins/backend-federation/config.mjs +128 -0
- package/dist/esm/plugins/backend-federation/emit.mjs +97 -0
- package/dist/esm/plugins/backendFederationBuild.mjs +1 -0
- package/dist/esm/plugins/deploy/index.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare/artifacts.mjs +64 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/constants.mjs +34 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +88 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +97 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/index.mjs +102 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/security-policies.mjs +167 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/types.mjs +0 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/utils.mjs +12 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +148 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +150 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-contract.mjs +31 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-plan.mjs +45 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +45 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +133 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +10 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +51 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +99 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +238 -0
- package/dist/esm/plugins/deploy/platforms/node.mjs +20 -2
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
- package/dist/esm/plugins/deploy/utils/npmAliases.mjs +174 -0
- package/dist/esm/plugins/initialize/index.mjs +4 -3
- package/dist/esm/plugins/serverBuild.mjs +3 -2
- package/dist/esm/plugins/ultramodernReleaseEnvelope.mjs +52 -0
- package/dist/esm/presetUltramodern.mjs +33 -2
- package/dist/esm/ultramodern-release-envelope/canonical.mjs +21 -0
- package/dist/esm/ultramodern-release-envelope/framework-output.mjs +524 -0
- package/dist/esm/ultramodern-release-envelope/index.mjs +335 -0
- package/dist/esm/ultramodern-release-envelope/types.mjs +7 -0
- package/dist/esm/ultramodern-release-identity.mjs +66 -0
- package/dist/esm-node/builder/generator/createBuilderProviderConfig.mjs +5 -1
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +21 -17
- package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.mjs +2 -2
- package/dist/esm-node/builder/shared/builderPlugins/adapterPrecompress.mjs +13 -4
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +15 -12
- package/dist/esm-node/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +31 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.mjs +24 -10
- package/dist/esm-node/builder/shared/bundlerPlugins/index.mjs +1 -0
- package/dist/esm-node/builder/shared/lazyCompilation.mjs +1 -3
- package/dist/esm-node/commands/build.mjs +2 -1
- package/dist/esm-node/commands/deploy.mjs +4 -2
- package/dist/esm-node/commands/index.mjs +0 -5
- package/dist/esm-node/config/build-environment.mjs +225 -0
- package/dist/esm-node/config/default.mjs +2 -0
- package/dist/esm-node/config/index.mjs +1 -0
- package/dist/esm-node/config/public.mjs +2 -0
- package/dist/esm-node/index.mjs +20 -5
- package/dist/esm-node/plugins/analyze/getHtmlTemplate.mjs +2 -2
- package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +17 -1
- package/dist/esm-node/plugins/analyze/index.mjs +22 -14
- package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +2 -2
- package/dist/esm-node/plugins/analyze/utils.mjs +3 -2
- package/dist/esm-node/plugins/backend-federation/codegen.mjs +205 -0
- package/dist/esm-node/plugins/backend-federation/config.mjs +129 -0
- package/dist/esm-node/plugins/backend-federation/emit.mjs +98 -0
- package/dist/esm-node/plugins/backendFederationBuild.mjs +2 -0
- package/dist/esm-node/plugins/deploy/index.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/artifacts.mjs +65 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/constants.mjs +35 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +89 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +98 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/index.mjs +103 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/security-policies.mjs +168 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/types.mjs +1 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/utils.mjs +13 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +149 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +151 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-contract.mjs +32 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-plan.mjs +46 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +46 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +134 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +11 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +52 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +100 -0
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +239 -0
- package/dist/esm-node/plugins/deploy/platforms/node.mjs +20 -2
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
- package/dist/esm-node/plugins/deploy/utils/index.mjs +5 -5
- package/dist/esm-node/plugins/deploy/utils/npmAliases.mjs +175 -0
- package/dist/esm-node/plugins/initialize/index.mjs +4 -3
- package/dist/esm-node/plugins/serverBuild.mjs +3 -2
- package/dist/esm-node/plugins/ultramodernReleaseEnvelope.mjs +53 -0
- package/dist/esm-node/presetUltramodern.mjs +33 -2
- package/dist/esm-node/ultramodern-release-envelope/canonical.mjs +22 -0
- package/dist/esm-node/ultramodern-release-envelope/framework-output.mjs +525 -0
- package/dist/esm-node/ultramodern-release-envelope/index.mjs +336 -0
- package/dist/esm-node/ultramodern-release-envelope/types.mjs +8 -0
- package/dist/esm-node/ultramodern-release-identity.mjs +67 -0
- package/dist/types/builder/generator/createCopyPattern.d.ts +7 -5
- package/dist/types/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.d.ts +6 -0
- package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +1 -0
- package/dist/types/builder/shared/bundlerPlugins/index.d.ts +1 -0
- package/dist/types/builder/shared/lazyCompilation.d.ts +2 -4
- package/dist/types/commands/deploy.d.ts +2 -1
- package/dist/types/commands/index.d.ts +0 -1
- package/dist/types/config/build-environment.d.ts +22 -0
- package/dist/types/config/index.d.ts +1 -0
- package/dist/types/config/public.d.ts +2 -0
- package/dist/types/index.d.ts +4 -3
- package/dist/types/plugins/analyze/getServerRoutes.d.ts +1 -0
- package/dist/types/plugins/analyze/utils.d.ts +1 -1
- package/dist/types/plugins/backend-federation/codegen.d.ts +83 -0
- package/dist/types/plugins/backend-federation/config.d.ts +103 -0
- package/dist/types/plugins/backend-federation/emit.d.ts +13 -0
- package/dist/types/plugins/backendFederationBuild.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/artifacts.d.ts +15 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/constants.d.ts +24 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/delivery-unit.d.ts +23 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/i18n-worker.d.ts +22 -0
- package/dist/types/plugins/deploy/platforms/{cloudflare.d.ts → cloudflare/index.d.ts} +1 -1
- package/dist/types/plugins/deploy/platforms/cloudflare/security-policies.d.ts +51 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/types.d.ts +5 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/utils.d.ts +6 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/worker-manifest.d.ts +122 -0
- package/dist/types/plugins/deploy/platforms/cloudflare/wrangler-config.d.ts +46 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-contract.d.ts +14 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-plan.d.ts +34 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/identity.d.ts +4 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/index.d.ts +18 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/issues.d.ts +14 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/manifest.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.d.ts +14 -0
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.d.ts +20 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.d.mts +1 -0
- package/dist/types/plugins/deploy/utils/npmAliases.d.ts +14 -0
- package/dist/types/plugins/ultramodernReleaseEnvelope.d.ts +3 -0
- package/dist/types/presetUltramodern.d.ts +10 -0
- package/dist/types/run/index.d.ts +1 -1
- package/dist/types/types/config/cloudflareDeploy.d.ts +41 -0
- package/dist/types/types/config/deploy.d.ts +15 -2
- package/dist/types/types/config/dev.d.ts +6 -0
- package/dist/types/ultramodern-release-envelope/canonical.d.ts +5 -0
- package/dist/types/ultramodern-release-envelope/framework-output.d.ts +31 -0
- package/dist/types/ultramodern-release-envelope/index.d.ts +6 -0
- package/dist/types/ultramodern-release-envelope/types.d.ts +62 -0
- package/dist/types/ultramodern-release-identity.d.ts +16 -0
- package/docs/_nav.json +36 -0
- package/docs/apis/_meta.json +13 -0
- package/docs/apis/app/commands.mdx +205 -0
- package/docs/apis/app/hooks/_meta.json +28 -0
- package/docs/apis/app/hooks/api/lambda.mdx +13 -0
- package/docs/apis/app/hooks/config/_meta.json +1 -0
- package/docs/apis/app/hooks/config/favicon.mdx +29 -0
- package/docs/apis/app/hooks/config/html.mdx +9 -0
- package/docs/apis/app/hooks/config/icon.mdx +29 -0
- package/docs/apis/app/hooks/config/mock.mdx +10 -0
- package/docs/apis/app/hooks/config/public.mdx +30 -0
- package/docs/apis/app/hooks/config/upload.mdx +54 -0
- package/docs/apis/app/hooks/modern-config.mdx +9 -0
- package/docs/apis/app/hooks/server/server.mdx +10 -0
- package/docs/apis/app/hooks/shared.mdx +7 -0
- package/docs/apis/app/hooks/src/app.mdx +30 -0
- package/docs/apis/app/hooks/src/entry.mdx +39 -0
- package/docs/apis/app/hooks/src/entry.server.mdx +56 -0
- package/docs/apis/app/hooks/src/modern.runtime.mdx +9 -0
- package/docs/apis/app/hooks/src/routes.mdx +90 -0
- package/docs/apis/app/hooks/src/server.mdx +7 -0
- package/docs/apis/app/runtime/_meta.json +32 -0
- package/docs/apis/app/runtime/bff/use-backend-context.mdx +30 -0
- package/docs/apis/app/runtime/core/create-root.mdx +22 -0
- package/docs/apis/app/runtime/core/render.mdx +42 -0
- package/docs/apis/app/runtime/core/runtime-context.mdx +160 -0
- package/docs/apis/app/runtime/router/router.mdx +288 -0
- package/docs/apis/app/runtime/ssr/no-ssr.mdx +38 -0
- package/docs/apis/app/runtime/ssr/renderStreaming.mdx +71 -0
- package/docs/apis/app/runtime/ssr/renderString.mdx +64 -0
- package/docs/apis/app/runtime/ssr/requestHandler.mdx +48 -0
- package/docs/apis/app/runtime/utility/css-in-js.mdx +44 -0
- package/docs/apis/app/runtime/utility/head.mdx +38 -0
- package/docs/apis/app/runtime/utility/loadable.mdx +85 -0
- package/docs/components/auto-upgrade.mdx +0 -0
- package/docs/components/bff-upload.mdx +97 -0
- package/docs/components/build-output.mdx +45 -0
- package/docs/components/bundler.mdx +3 -0
- package/docs/components/convention-routing-motivation.mdx +0 -0
- package/docs/components/debug-app.mdx +15 -0
- package/docs/components/default-browserslist.mdx +7 -0
- package/docs/components/deploy-command.mdx +14 -0
- package/docs/components/deploy.mdx +1 -0
- package/docs/components/enable-bff-caution.mdx +3 -0
- package/docs/components/enable-bff.mdx +56 -0
- package/docs/components/enable-ssg.mdx +49 -0
- package/docs/components/entry-mode.mdx +0 -0
- package/docs/components/entry-scan-logic.mdx +7 -0
- package/docs/components/extend-bff-function.mdx +3 -0
- package/docs/components/hono.mdx +120 -0
- package/docs/components/init-app.mdx +93 -0
- package/docs/components/init-rspack-app.mdx +5 -0
- package/docs/components/internal-logger.mdx +25 -0
- package/docs/components/internal-metrics.mdx +20 -0
- package/docs/components/international/custom-instance-code.mdx +16 -0
- package/docs/components/international/init-options-desc.mdx +1 -0
- package/docs/components/international/install-command.mdx +10 -0
- package/docs/components/international/instance-code.mdx +16 -0
- package/docs/components/international/introduce.mdx +5 -0
- package/docs/components/international/platform-support.mdx +0 -0
- package/docs/components/language-config.mdx +9 -0
- package/docs/components/micro-frontend.mdx +6 -0
- package/docs/components/micro-master-manifest-config.mdx +15 -0
- package/docs/components/micro-runtime-config.mdx +17 -0
- package/docs/components/module-federation.mdx +7 -0
- package/docs/components/new-entry-tooltip.mdx +0 -0
- package/docs/components/nodeVersion.mdx +28 -0
- 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 +1 -0
- package/docs/components/prerequisites.mdx +18 -0
- package/docs/components/release-note.mdx +1 -0
- package/docs/components/routes-practice.mdx +0 -0
- package/docs/components/rsbuild-config-tooltip.mdx +5 -0
- package/docs/components/rsbuild.mdx +3 -0
- package/docs/components/rsc-deploy-tip.mdx +1 -0
- package/docs/components/rspack.mdx +3 -0
- package/docs/components/rspackTip.mdx +7 -0
- package/docs/components/runtime-cli-config.mdx +0 -0
- package/docs/components/serve-command.mdx +22 -0
- package/docs/components/ssr-monitor.mdx +3 -0
- package/docs/components/stream-ssr-performance.mdx +0 -0
- package/docs/components/swc.mdx +3 -0
- package/docs/components/tech-stack-node-framework.mdx +1 -0
- package/docs/components/turtorials-example-list.mdx +2 -0
- package/docs/components/ua-polyfill.mdx +44 -0
- 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 +78 -0
- package/docs/configure/app/bff/cross-project.mdx +24 -0
- package/docs/configure/app/bff/effect.mdx +319 -0
- package/docs/configure/app/bff/prefix.mdx +33 -0
- package/docs/configure/app/bff/runtime-framework.mdx +30 -0
- package/docs/configure/app/builder-plugins.mdx +70 -0
- package/docs/configure/app/dev/asset-prefix.mdx +18 -0
- package/docs/configure/app/dev/before-start-url.mdx +21 -0
- package/docs/configure/app/dev/client.mdx +45 -0
- package/docs/configure/app/dev/hmr.mdx +14 -0
- package/docs/configure/app/dev/host.mdx +22 -0
- package/docs/configure/app/dev/https.mdx +81 -0
- package/docs/configure/app/dev/lazy-compilation.mdx +45 -0
- package/docs/configure/app/dev/live-reload.mdx +14 -0
- package/docs/configure/app/dev/mock-dir.mdx +35 -0
- package/docs/configure/app/dev/progress-bar.mdx +23 -0
- package/docs/configure/app/dev/server.mdx +128 -0
- package/docs/configure/app/dev/setup-middlewares.mdx +36 -0
- package/docs/configure/app/dev/start-url.mdx +53 -0
- package/docs/configure/app/dev/watch-files.mdx +31 -0
- package/docs/configure/app/dev/write-to-disk.mdx +14 -0
- package/docs/configure/app/experiments/source-build.mdx +33 -0
- package/docs/configure/app/html/app-icon.mdx +32 -0
- package/docs/configure/app/html/crossorigin.mdx +14 -0
- package/docs/configure/app/html/favicon.mdx +20 -0
- package/docs/configure/app/html/inject.mdx +14 -0
- package/docs/configure/app/html/meta.mdx +28 -0
- package/docs/configure/app/html/mount-id.mdx +14 -0
- package/docs/configure/app/html/output-structure.mdx +14 -0
- package/docs/configure/app/html/script-loading.mdx +14 -0
- package/docs/configure/app/html/tags.mdx +19 -0
- package/docs/configure/app/html/template-parameters.mdx +37 -0
- package/docs/configure/app/html/template.mdx +14 -0
- package/docs/configure/app/html/title.mdx +22 -0
- package/docs/configure/app/output/asset-prefix.mdx +18 -0
- package/docs/configure/app/output/assets-retry.mdx +81 -0
- package/docs/configure/app/output/charset.mdx +14 -0
- package/docs/configure/app/output/clean-dist-path.mdx +20 -0
- package/docs/configure/app/output/convert-to-rem.mdx +83 -0
- package/docs/configure/app/output/copy.mdx +14 -0
- package/docs/configure/app/output/css-modules.mdx +52 -0
- package/docs/configure/app/output/data-uri-limit.mdx +30 -0
- package/docs/configure/app/output/disable-css-module-extension.mdx +59 -0
- package/docs/configure/app/output/disable-inline-runtime-chunk.mdx +45 -0
- package/docs/configure/app/output/disable-svgr.mdx +22 -0
- package/docs/configure/app/output/disable-ts-checker.mdx +53 -0
- package/docs/configure/app/output/dist-path.mdx +51 -0
- package/docs/configure/app/output/enable-asset-manifest.mdx +40 -0
- package/docs/configure/app/output/enable-css-module-tsdeclaration.mdx +32 -0
- package/docs/configure/app/output/enable-inline-route-manifests.mdx +20 -0
- package/docs/configure/app/output/externals.mdx +24 -0
- package/docs/configure/app/output/filename-hash.mdx +14 -0
- package/docs/configure/app/output/filename.mdx +59 -0
- package/docs/configure/app/output/inject-styles.mdx +14 -0
- package/docs/configure/app/output/inline-scripts.mdx +33 -0
- package/docs/configure/app/output/inline-styles.mdx +33 -0
- package/docs/configure/app/output/legal-comments.mdx +22 -0
- package/docs/configure/app/output/minify.mdx +26 -0
- package/docs/configure/app/output/override-browserslist.mdx +26 -0
- package/docs/configure/app/output/polyfill.mdx +18 -0
- package/docs/configure/app/output/source-map.mdx +34 -0
- package/docs/configure/app/output/split-route-chunks.mdx +20 -0
- package/docs/configure/app/output/ssg.mdx +85 -0
- package/docs/configure/app/output/ssgByEntries.mdx +93 -0
- package/docs/configure/app/output/svg-default-export.mdx +34 -0
- package/docs/configure/app/output/temp-dir.mdx +24 -0
- package/docs/configure/app/performance/build-cache.mdx +48 -0
- package/docs/configure/app/performance/chunk-split.mdx +44 -0
- package/docs/configure/app/performance/dns-prefetch.mdx +19 -0
- package/docs/configure/app/performance/preconnect.mdx +20 -0
- package/docs/configure/app/performance/prefetch.mdx +25 -0
- package/docs/configure/app/performance/preload.mdx +27 -0
- package/docs/configure/app/performance/print-file-size.mdx +44 -0
- package/docs/configure/app/performance/profile.mdx +14 -0
- package/docs/configure/app/performance/remove-console.mdx +14 -0
- package/docs/configure/app/performance/remove-moment-locale.mdx +14 -0
- package/docs/configure/app/performance/rsdoctor.mdx +42 -0
- package/docs/configure/app/plugins.mdx +59 -0
- package/docs/configure/app/resolve/alias-strategy.mdx +14 -0
- package/docs/configure/app/resolve/alias.mdx +13 -0
- package/docs/configure/app/resolve/condition-names.mdx +18 -0
- package/docs/configure/app/resolve/dedupe.mdx +13 -0
- package/docs/configure/app/resolve/extensions.mdx +18 -0
- package/docs/configure/app/runtime/0-intro.mdx +61 -0
- package/docs/configure/app/runtime/plugins.mdx +58 -0
- package/docs/configure/app/runtime/router.mdx +39 -0
- package/docs/configure/app/security/check-syntax.mdx +73 -0
- package/docs/configure/app/security/nonce.mdx +19 -0
- package/docs/configure/app/security/sri.mdx +24 -0
- package/docs/configure/app/server/base-url.mdx +30 -0
- package/docs/configure/app/server/port.mdx +22 -0
- package/docs/configure/app/server/public-routes.mdx +26 -0
- package/docs/configure/app/server/routes.mdx +90 -0
- package/docs/configure/app/server/rsc.mdx +30 -0
- package/docs/configure/app/server/ssr-by-entries.mdx +29 -0
- package/docs/configure/app/server/ssr.mdx +85 -0
- package/docs/configure/app/server/tsconfig-path.mdx +63 -0
- package/docs/configure/app/source/alias-strategy.mdx +18 -0
- package/docs/configure/app/source/alias.mdx +27 -0
- package/docs/configure/app/source/config-dir.mdx +24 -0
- package/docs/configure/app/source/decorators.mdx +29 -0
- package/docs/configure/app/source/define.mdx +20 -0
- package/docs/configure/app/source/disable-default-entries.mdx +32 -0
- package/docs/configure/app/source/enable-async-entry.mdx +54 -0
- package/docs/configure/app/source/enable-async-pre-entry.mdx +30 -0
- package/docs/configure/app/source/entries-dir.mdx +39 -0
- package/docs/configure/app/source/entries.mdx +183 -0
- package/docs/configure/app/source/exclude.mdx +14 -0
- package/docs/configure/app/source/global-vars.mdx +110 -0
- package/docs/configure/app/source/include.mdx +40 -0
- package/docs/configure/app/source/main-entry-name.mdx +28 -0
- package/docs/configure/app/source/pre-entry.mdx +14 -0
- package/docs/configure/app/source/react-compiler.mdx +72 -0
- package/docs/configure/app/source/transform-import.mdx +31 -0
- package/docs/configure/app/split-chunks.mdx +17 -0
- package/docs/configure/app/tools/autoprefixer.mdx +48 -0
- package/docs/configure/app/tools/bundler-chain.mdx +30 -0
- package/docs/configure/app/tools/css-extract.mdx +37 -0
- package/docs/configure/app/tools/css-loader.mdx +21 -0
- package/docs/configure/app/tools/dev-server.mdx +117 -0
- package/docs/configure/app/tools/html-plugin.mdx +45 -0
- package/docs/configure/app/tools/less.mdx +85 -0
- package/docs/configure/app/tools/lightningcss-loader.mdx +39 -0
- package/docs/configure/app/tools/minify-css.mdx +57 -0
- package/docs/configure/app/tools/postcss.mdx +38 -0
- package/docs/configure/app/tools/rspack.mdx +14 -0
- package/docs/configure/app/tools/sass.mdx +82 -0
- package/docs/configure/app/tools/style-loader.mdx +14 -0
- package/docs/configure/app/tools/swc.mdx +69 -0
- package/docs/configure/app/tools/ts-checker.mdx +103 -0
- package/docs/configure/app/usage.mdx +276 -0
- package/docs/guides/_meta.json +37 -0
- package/docs/guides/advanced-features/_meta.json +32 -0
- package/docs/guides/advanced-features/bff/_meta.json +10 -0
- package/docs/guides/advanced-features/bff/cross-project.mdx +110 -0
- package/docs/guides/advanced-features/bff/data-platform.mdx +120 -0
- package/docs/guides/advanced-features/bff/extend-server.mdx +120 -0
- package/docs/guides/advanced-features/bff/frameworks.mdx +131 -0
- package/docs/guides/advanced-features/bff/function.mdx +265 -0
- package/docs/guides/advanced-features/bff/operators.mdx +629 -0
- package/docs/guides/advanced-features/bff/sdk.mdx +116 -0
- package/docs/guides/advanced-features/bff/upload.mdx +7 -0
- package/docs/guides/advanced-features/bff.mdx +22 -0
- package/docs/guides/advanced-features/build-performance.mdx +134 -0
- package/docs/guides/advanced-features/compatibility.mdx +81 -0
- package/docs/guides/advanced-features/international/_meta.json +10 -0
- package/docs/guides/advanced-features/international/advanced.mdx +132 -0
- package/docs/guides/advanced-features/international/api.mdx +271 -0
- package/docs/guides/advanced-features/international/best-practices.mdx +290 -0
- package/docs/guides/advanced-features/international/configuration.mdx +222 -0
- package/docs/guides/advanced-features/international/locale-detection.mdx +130 -0
- package/docs/guides/advanced-features/international/quick-start.mdx +112 -0
- package/docs/guides/advanced-features/international/resource-loading.mdx +158 -0
- package/docs/guides/advanced-features/international/routing.mdx +177 -0
- package/docs/guides/advanced-features/international.mdx +29 -0
- package/docs/guides/advanced-features/low-level.mdx +50 -0
- package/docs/guides/advanced-features/page-performance/_meta.json +1 -0
- package/docs/guides/advanced-features/page-performance/code-split.mdx +81 -0
- package/docs/guides/advanced-features/page-performance/inline-assets.mdx +163 -0
- package/docs/guides/advanced-features/page-performance/optimize-bundle.mdx +101 -0
- package/docs/guides/advanced-features/page-performance/react-compiler.mdx +51 -0
- package/docs/guides/advanced-features/server-monitor/_meta.json +1 -0
- package/docs/guides/advanced-features/server-monitor/logger.mdx +19 -0
- package/docs/guides/advanced-features/server-monitor/metrics.mdx +41 -0
- package/docs/guides/advanced-features/server-monitor/monitors.mdx +242 -0
- package/docs/guides/advanced-features/source-build.mdx +168 -0
- package/docs/guides/advanced-features/web-server.mdx +296 -0
- package/docs/guides/basic-features/_meta.json +49 -0
- package/docs/guides/basic-features/alias.mdx +106 -0
- package/docs/guides/basic-features/css/_meta.json +1 -0
- package/docs/guides/basic-features/css/css-in-js.mdx +69 -0
- package/docs/guides/basic-features/css/css-modules.mdx +212 -0
- package/docs/guides/basic-features/css/css.mdx +31 -0
- package/docs/guides/basic-features/css/tailwindcss.mdx +27 -0
- package/docs/guides/basic-features/data/_meta.json +1 -0
- package/docs/guides/basic-features/data/data-cache.mdx +515 -0
- package/docs/guides/basic-features/data/data-fetch.mdx +419 -0
- package/docs/guides/basic-features/data/data-write.mdx +230 -0
- package/docs/guides/basic-features/debug/_meta.json +1 -0
- package/docs/guides/basic-features/debug/mock.mdx +113 -0
- package/docs/guides/basic-features/debug/proxy.mdx +25 -0
- package/docs/guides/basic-features/debug/rsdoctor.mdx +47 -0
- package/docs/guides/basic-features/debug/using-storybook.mdx +100 -0
- package/docs/guides/basic-features/deploy.mdx +448 -0
- package/docs/guides/basic-features/env-vars.mdx +181 -0
- package/docs/guides/basic-features/html.mdx +259 -0
- package/docs/guides/basic-features/output-files.mdx +145 -0
- package/docs/guides/basic-features/render/_meta.json +1 -0
- package/docs/guides/basic-features/render/before-render.mdx +108 -0
- package/docs/guides/basic-features/render/overview.mdx +51 -0
- package/docs/guides/basic-features/render/rsc.mdx +533 -0
- package/docs/guides/basic-features/render/ssg.mdx +167 -0
- package/docs/guides/basic-features/render/ssr-cache.mdx +201 -0
- package/docs/guides/basic-features/render/ssr.mdx +323 -0
- package/docs/guides/basic-features/render/streaming-ssr.mdx +267 -0
- package/docs/guides/basic-features/routes/_meta.json +1 -0
- package/docs/guides/basic-features/routes/config-routes.mdx +427 -0
- package/docs/guides/basic-features/routes/routes.mdx +532 -0
- package/docs/guides/basic-features/static-assets/_meta.json +1 -0
- package/docs/guides/basic-features/static-assets/json-files.mdx +124 -0
- package/docs/guides/basic-features/static-assets/svg-assets.mdx +172 -0
- package/docs/guides/basic-features/static-assets/wasm-assets.mdx +66 -0
- package/docs/guides/basic-features/static-assets.mdx +164 -0
- package/docs/guides/basic-features/testing/_meta.json +1 -0
- package/docs/guides/basic-features/testing/playwright.mdx +111 -0
- package/docs/guides/basic-features/testing/rstest.mdx +192 -0
- package/docs/guides/concept/_meta.json +1 -0
- package/docs/guides/concept/builder.mdx +60 -0
- package/docs/guides/concept/entries.mdx +325 -0
- package/docs/guides/concept/server.mdx +35 -0
- package/docs/guides/get-started/_meta.json +9 -0
- package/docs/guides/get-started/ai-coding-agents.mdx +63 -0
- package/docs/guides/get-started/glossary.mdx +63 -0
- package/docs/guides/get-started/introduction.mdx +45 -0
- package/docs/guides/get-started/quick-start.mdx +92 -0
- package/docs/guides/get-started/tech-stack.mdx +97 -0
- package/docs/guides/get-started/ultramodern.mdx +433 -0
- package/docs/guides/get-started/upgrade.mdx +114 -0
- package/docs/guides/topic-detail/_meta.json +8 -0
- package/docs/guides/topic-detail/module-federation/_meta.json +1 -0
- package/docs/guides/topic-detail/module-federation/application.mdx +116 -0
- package/docs/guides/topic-detail/module-federation/deploy.mdx +104 -0
- package/docs/guides/topic-detail/module-federation/i18n.mdx +670 -0
- package/docs/guides/topic-detail/module-federation/introduce.mdx +36 -0
- package/docs/guides/topic-detail/module-federation/ssr.mdx +177 -0
- package/docs/guides/topic-detail/module-federation/usage.mdx +202 -0
- package/docs/guides/troubleshooting/_meta.json +1 -0
- package/docs/guides/troubleshooting/builder.mdx +114 -0
- package/docs/guides/troubleshooting/cli.mdx +39 -0
- package/docs/guides/troubleshooting/dependencies.mdx +123 -0
- package/docs/guides/troubleshooting/hmr.mdx +148 -0
- package/docs/guides/upgrade/_meta.json +1 -0
- package/docs/guides/upgrade/config.mdx +951 -0
- package/docs/guides/upgrade/entry.mdx +463 -0
- package/docs/guides/upgrade/other.mdx +183 -0
- package/docs/guides/upgrade/overview.mdx +33 -0
- package/docs/guides/upgrade/tailwindcss.mdx +92 -0
- package/docs/guides/upgrade/web-server.md +109 -0
- package/docs/index.md +4 -0
- package/lib/types.d.ts +2 -3
- package/package.json +69 -31
- package/rslib.config.mts +11 -12
- package/scripts/copy-main-doc.mjs +50 -0
- package/dist/cjs/commands/runtime.js +0 -196
- package/dist/cjs/plugins/deploy/platforms/cloudflare.js +0 -540
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
- package/dist/cjs/ultramodern/designSystem.js +0 -123
- package/dist/esm/baseline.mjs +0 -4
- package/dist/esm/commands/runtime.mjs +0 -146
- package/dist/esm/plugins/deploy/platforms/cloudflare.mjs +0 -492
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
- package/dist/esm/ultramodern/designSystem.mjs +0 -73
- package/dist/esm-node/baseline.mjs +0 -5
- package/dist/esm-node/commands/runtime.mjs +0 -147
- package/dist/esm-node/plugins/deploy/platforms/cloudflare.mjs +0 -493
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
- package/dist/esm-node/ultramodern/designSystem.mjs +0 -74
- package/dist/types/baseline.d.ts +0 -16
- package/dist/types/commands/runtime.d.ts +0 -12
- package/dist/types/ultramodern/designSystem.d.ts +0 -54
- /package/dist/types/plugins/deploy/platforms/templates/{cloudflare-entry.d.mts → cloudflare-entry.006-fetch-handler.d.mts} +0 -0
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UltraModern.js 3.0
|
|
3
|
+
sidebar_position: 2
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UltraModern.js 3.0 vs Modern.js 3.0
|
|
7
|
+
|
|
8
|
+
This page compares **UltraModern.js 3.0** with the Modern.js 3.x line this fork tracks. The baseline is the current merged Modern.js `release-v3.x` baseline, not a frozen patch-version snapshot.
|
|
9
|
+
|
|
10
|
+
UltraModern.js 3.0 is our SuperApp framework forked from Modern.js. It keeps the Modern.js plugin/runtime mental model where that helps adoption, but it is positioned as a separate framework for Effect HttpApi-first HTTP APIs, TanStack Router, SSR, Module Federation, and independently deployable Micro Verticals.
|
|
11
|
+
|
|
12
|
+
## Design Principles
|
|
13
|
+
|
|
14
|
+
- Keep deltas explicit and auditable.
|
|
15
|
+
- Keep upstream Modern.js merge compatibility explicit: generic Modern.js runtime
|
|
16
|
+
code can remain where it belongs, while UltraModern-generated surfaces stay
|
|
17
|
+
strict.
|
|
18
|
+
- Add platform-level contracts only where they improve cross-team reliability.
|
|
19
|
+
- Keep escape hatches explicit and outside the generated HTTP API path.
|
|
20
|
+
|
|
21
|
+
## Compatibility Contract
|
|
22
|
+
|
|
23
|
+
UltraModern.js 3.0 keeps:
|
|
24
|
+
|
|
25
|
+
- Modern.js app/config/plugin mental model.
|
|
26
|
+
- Existing project structure and command flow.
|
|
27
|
+
- Progressive adoption path (apps can stay mostly unchanged).
|
|
28
|
+
|
|
29
|
+
UltraModern.js additions are designed as the default product surface for new SuperApps. The framework direction is Effect + TanStack + SSR + Micro Verticals, and generated HTTP API work uses that direction by default instead of preserving parallel raw-handler layouts.
|
|
30
|
+
Existing Modern.js apps can migrate gradually; once an API surface is generated
|
|
31
|
+
or migrated as UltraModern HTTP API, it must use the strict Effect HttpApi path.
|
|
32
|
+
|
|
33
|
+
## Intentional Differences (v3 line)
|
|
34
|
+
|
|
35
|
+
| Area | Modern.js 3.0 baseline | UltraModern.js 3.0 |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| Build diagnostics | RsDoctor is generally opt-in | Adds a first-class `performance.rsdoctor` config surface (opt-in; the earlier default-on behavior and diagnostics contract artifact were reverted) |
|
|
38
|
+
| Output and static serving | Precompression behavior is app-defined | Enables `output.precompress` by default and serves `.br` / `.gz` variants via `Accept-Encoding` negotiation |
|
|
39
|
+
| BFF runtime and contracts | Standard BFF runtime/client generation | Adds `requestId`-aware producer isolation, fail-fast initialization checks, and operation/trace correlation headers |
|
|
40
|
+
| BFF runtime choices | Standard request-handler oriented BFF paths | Uses Effect `HttpApi` as the only generated HTTP API path (`api/index.ts`, `shared/api.ts`, `src/api/*`) and rejects raw handlers, manual parsing, manual `Response` construction, and Hono server imports in generated workspaces |
|
|
41
|
+
| Telemetry standardization | Observability wiring is often app-specific | Adds framework-level telemetry pipeline with OTLP/VictoriaMetrics exporters, redaction, batching, and backpressure controls |
|
|
42
|
+
| App-level MF SSR handshake | No dedicated super-app app-level stability contract focus | Adds `server.ssr.moduleFederationAppSSR` plus integration-tested env/config handshake |
|
|
43
|
+
| MF vertical loading reliability | Retry/fallback patterns are often implemented per app | Adds deterministic timeout/network/contract-error reliability matrix and distributed OTEL continuity tests |
|
|
44
|
+
| Module onboarding governance | No module-certification evidence profile in baseline | Adds module SDK contracts, boundary anti-pattern guards, and release/module certification gate workflows |
|
|
45
|
+
| Router runtime | Default runtime path centers on React Router | Adds first-class TanStack Router runtime/CLI path (React Router remains supported) |
|
|
46
|
+
| Scaffolding templates | Default create templates center on React Router starter path | Generates a SuperApp workspace by default with TanStack, Effect, Module Federation, i18n, Tailwind, Cloudflare, and ownership contracts |
|
|
47
|
+
| Workspace preset enforcement | No generated UltraModern preset gate workflow | Generated workspaces include `.github/workflows/ultramodern-workspace-gates.yml`, `pnpm check`, primitive local gates, and generated contract validation |
|
|
48
|
+
|
|
49
|
+
## What We Intentionally Do Not Change
|
|
50
|
+
|
|
51
|
+
- We do not hide the fork behind legacy Modern.js branding.
|
|
52
|
+
- We do not optimize for generic Modern.js defaults when they conflict with SuperApp reliability.
|
|
53
|
+
- We do not delete generic Modern.js Hono/file-convention runtime support just
|
|
54
|
+
to enforce UltraModern policy; the enforcement lives in UltraModern
|
|
55
|
+
generator, config, checks, and generated workspaces.
|
|
56
|
+
- Generated UltraModern API work uses the Effect runtime only; raw Hono/function handlers are not part of the generated API architecture.
|
|
57
|
+
- We make incompatible scaffold changes when they remove architecture drift.
|
|
58
|
+
|
|
59
|
+
## Migration Guide
|
|
60
|
+
|
|
61
|
+
For teams already on Modern.js 3.0 or an older BleedingDev UltraModern scaffold, the adoption path is to move API work onto the strict Effect HttpApi surface instead of preserving older raw handler layouts.
|
|
62
|
+
|
|
63
|
+
1. Keep existing Modern.js apps running as-is while they are outside the generated UltraModern surface. TanStack Router is the preferred path for new scaffolds and incremental route adoption, but route migration can happen on the team's schedule.
|
|
64
|
+
2. Use `bff.runtimeFramework: 'effect'` with `bff.effect.strictEffectApproach: true` for API work. Entries live at `api/index.ts`, contracts live at `shared/api.ts`, clients live under `src/api/*`, and request/response/error shapes come from Effect `Schema` plus `HttpApi`.
|
|
65
|
+
3. Treat raw handlers, `api/lambda/**`, manual `Response` construction, and manual request parsing as migration defects in generated or migrated UltraModern workspaces.
|
|
66
|
+
4. The public preset now ships with explicit release and certification gates. Generated workspaces include `.github/workflows/ultramodern-workspace-gates.yml`, so `pnpm check` and `pnpm build` stay part of the local adoption contract from day one while CI runs the primitive gates as parallel matrix jobs.
|
|
67
|
+
|
|
68
|
+
For an older generated workspace, migrate by treating the published cohort as
|
|
69
|
+
the source of truth:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pnpm dlx @bleedingdev/modern-js-create@latest --help
|
|
73
|
+
pnpm dlx @bleedingdev/modern-js-create@latest catalog --vertical --dry-run
|
|
74
|
+
pnpm dlx @bleedingdev/modern-js-create@latest catalog --vertical
|
|
75
|
+
mise install
|
|
76
|
+
mise exec -- pnpm install
|
|
77
|
+
mise exec -- pnpm check
|
|
78
|
+
mise exec -- pnpm build
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Migrating to `3.5.0-ultramodern.18`
|
|
82
|
+
|
|
83
|
+
Use `3.5.0-ultramodern.18` or newer for localized Cloudflare SSR workspaces.
|
|
84
|
+
This cohort moves bare locale-root redirects into the framework-owned
|
|
85
|
+
Cloudflare Worker entry and the i18n server runtime. A request for `/` is
|
|
86
|
+
redirected server-side with `302` to the negotiated locale path, for example
|
|
87
|
+
`/cs` for `Accept-Language: cs-CZ` or `/en` for English and fallback traffic.
|
|
88
|
+
|
|
89
|
+
Existing generated workspaces should upgrade the whole BleedingDev Modern
|
|
90
|
+
package cohort together:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.18 ultramodern \
|
|
94
|
+
migrate-strict-effect --version 3.5.0-ultramodern.18
|
|
95
|
+
pnpm install
|
|
96
|
+
pnpm check
|
|
97
|
+
pnpm build
|
|
98
|
+
pnpm cloudflare:build
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
For deployed Cloudflare Workers, redeploy after the cohort update and verify
|
|
102
|
+
the root response before accepting the migration:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
curl -I -H 'Accept-Language: cs-CZ,cs;q=0.9,en;q=0.1' https://<worker-host>/
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The expected response is `302` with `Location: /cs` or the matching locale,
|
|
109
|
+
`Cache-Control: private, no-store`, and `Vary` covering the locale detection
|
|
110
|
+
headers. Following the redirect should return the SSR locale page with the
|
|
111
|
+
matching document language and i18n SSR data.
|
|
112
|
+
|
|
113
|
+
Do not fix older root `404` responses by adding app-owned root route files,
|
|
114
|
+
client-side redirects, custom navigation wrappers, Cloudflare Worker
|
|
115
|
+
postprocessing, generated output edits, or local redirect shims. If `/` still
|
|
116
|
+
returns `404` after upgrading, confirm the production build log shows
|
|
117
|
+
`Modern.js Framework v3.5.0-ultramodern.18` or newer and redeploy the Worker.
|
|
118
|
+
|
|
119
|
+
Strict generated API migration requires `3.5.0-ultramodern.10` or newer.
|
|
120
|
+
`3.4.0-ultramodern.20` and earlier cohorts do not include this full direct
|
|
121
|
+
`api/index.ts` generator, generated `.mts` checks, strict Oxlint boundary rule
|
|
122
|
+
set, Effect cohort overrides, and strict Effect migration command. Agents that
|
|
123
|
+
cannot install that BleedingDev cohort yet should use the local Modern.js
|
|
124
|
+
workspace for migration validation; otherwise pin `3.5.0-ultramodern.10` or
|
|
125
|
+
newer with `--ultramodern-package-version`.
|
|
126
|
+
|
|
127
|
+
Before hand-editing package aliases or generated metadata, run the framework
|
|
128
|
+
migration command from the target workspace:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.10 ultramodern \
|
|
132
|
+
migrate-strict-effect --version 3.5.0-ultramodern.10
|
|
133
|
+
pnpm api:check
|
|
134
|
+
pnpm contract:check
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The command updates `.modernjs/ultramodern.json`, root
|
|
138
|
+
`modernjs.packageSource`, generated Modern package aliases, framework-owned
|
|
139
|
+
toolchain pins, direct topology API metadata, strict Effect pnpm
|
|
140
|
+
overrides/trust policy, and the pnpm lockfile. Remaining failures are source
|
|
141
|
+
migration work: move code to `shared/api.ts`, `api/index.ts`, and
|
|
142
|
+
`src/api/*-client.ts`, then delete `api/effect`, `api/lambda`, `shared/effect`,
|
|
143
|
+
and `src/effect`.
|
|
144
|
+
|
|
145
|
+
Generated strict Effect workspaces pin the compatible Effect cohort with pnpm
|
|
146
|
+
overrides: `effect@4.0.0-beta.102`, `@effect/opentelemetry@4.0.0-beta.102`,
|
|
147
|
+
and `@effect/vitest@4.0.0-beta.102`. Do not add app-local direct Effect
|
|
148
|
+
versions that disagree with those overrides. They also carry generated pnpm
|
|
149
|
+
policy exclusions for `effect@4.0.0-beta.102` and
|
|
150
|
+
`@effect/opentelemetry@4.0.0-beta.102` so the framework-selected Effect beta
|
|
151
|
+
cohort is not blocked by the 24-hour age gate or trusted-publisher to
|
|
152
|
+
provenance metadata transition.
|
|
153
|
+
|
|
154
|
+
Gradual migration means old, unmigrated Modern.js apps can keep their existing
|
|
155
|
+
runtime until they are converted. Once a surface is generated or migrated as
|
|
156
|
+
UltraModern HTTP API, it uses Effect HttpApi only; do not keep Hono, lambda
|
|
157
|
+
handlers, or raw request handlers inside that UltraModern API surface.
|
|
158
|
+
|
|
159
|
+
When migrating a generated workspace that already has nested Effect API files, make the
|
|
160
|
+
move explicit and do not keep compatibility aliases:
|
|
161
|
+
|
|
162
|
+
1. Move each vertical server entry from `verticals/<id>/api/effect/index.ts` to
|
|
163
|
+
`verticals/<id>/api/index.ts`.
|
|
164
|
+
2. Move each shared API contract from `verticals/<id>/shared/effect/api.ts` to
|
|
165
|
+
`verticals/<id>/shared/api.ts`.
|
|
166
|
+
3. Move generated clients from `verticals/<id>/src/effect/*-client.ts` to
|
|
167
|
+
`verticals/<id>/src/api/*-client.ts`.
|
|
168
|
+
4. Move shell API aggregates from `apps/shell-super-app/src/effect/*` to
|
|
169
|
+
`apps/shell-super-app/src/api/*`.
|
|
170
|
+
5. Update imports and package exports to use `./api`, `./api/client`, and
|
|
171
|
+
`@<workspace>/<vertical>/api/client`; remove `./effect/client`,
|
|
172
|
+
`./shared/effect/api`, and shared Effect API packages.
|
|
173
|
+
6. Update every vertical `modern.config.ts` to use
|
|
174
|
+
`bff.effect.entry: './api/index'` and
|
|
175
|
+
`bff.effect.strictEffectApproach: true`.
|
|
176
|
+
7. Update topology so API metadata lives directly under `api` with
|
|
177
|
+
`api.bff.strictEffectApproach: true`; do not keep `api.effect`.
|
|
178
|
+
8. Run `pnpm api:check`,
|
|
179
|
+
`scripts/validate-ultramodern-workspace.mts`, `pnpm check`, and
|
|
180
|
+
`pnpm build`.
|
|
181
|
+
|
|
182
|
+
If a migration fails, fix the owning generated contract, topology, package
|
|
183
|
+
exports, or API module. Do not add app-level aliases, raw request handlers,
|
|
184
|
+
manual `Response` construction, local type casts, or package shims to make the
|
|
185
|
+
old layout pass.
|
|
186
|
+
|
|
187
|
+
Effect RPC, WebSockets, and other transports should be added as explicit
|
|
188
|
+
transport surfaces when needed. They do not make raw request handlers valid
|
|
189
|
+
inside generated HTTP API modules.
|
|
190
|
+
|
|
191
|
+
Strict API tests should exercise the `HttpApi` contract. Use
|
|
192
|
+
`createEffectBffTestHandler` from `@modern-js/plugin-bff/effect-edge` for
|
|
193
|
+
edge-compatible proof tests; if you manually compose a web handler, provide
|
|
194
|
+
`HttpServer.layerServices` beside your API group layer before calling
|
|
195
|
+
`HttpRouter.toWebHandler`.
|
|
196
|
+
|
|
197
|
+
For dynamic origin CORS predicates inside strict Effect HTTP APIs, prefer
|
|
198
|
+
`HttpRouter.middleware(Effect.succeed(HttpMiddleware.cors(...)))`.
|
|
199
|
+
`HttpRouter.middleware(...)` returns a `Layer` directly in the pinned Effect
|
|
200
|
+
cohort; do not read a `.layer` property from it.
|
|
201
|
+
|
|
202
|
+
Use one package-source strategy per repo. The published BleedingDev create
|
|
203
|
+
package defaults to `--ultramodern-package-source=install` and records the
|
|
204
|
+
exact cohort in `.modernjs/ultramodern.json`. Keep `--workspace` only for local
|
|
205
|
+
monorepo testing against unreleased packages. Release proof and CI should pin
|
|
206
|
+
the exact cohort with `--ultramodern-package-version` when a repo must prove a
|
|
207
|
+
specific published framework version.
|
|
208
|
+
|
|
209
|
+
Older repos with nested Effect entries and `verbatimModuleSyntax` should update to
|
|
210
|
+
the latest BleedingDev cohort instead of adding app-level `"type": "module"`
|
|
211
|
+
metadata, Module Federation shims, or custom server wrappers. The framework BFF
|
|
212
|
+
compiler normalizes CommonJS server output while generated app packages keep
|
|
213
|
+
stable TypeScript 7 so Module Federation DTS generation and TS-Go checks use
|
|
214
|
+
the same modern compiler lane.
|
|
215
|
+
|
|
216
|
+
Cloudflare SSR deploys are also split by runtime responsibility: `.output` is an
|
|
217
|
+
ESM module-worker package, while `.output/worker` remains a CommonJS package
|
|
218
|
+
scope for the worker bundles emitted by Modern.js SSR builds. Do not fix older
|
|
219
|
+
repos by hand-editing generated worker output; upgrade the framework cohort and
|
|
220
|
+
rerun the generated validation instead.
|
|
221
|
+
|
|
222
|
+
After installing the new cohort, run the generated
|
|
223
|
+
`scripts/validate-ultramodern-workspace.mts` contract check before accepting
|
|
224
|
+
manual edits. Fix topology, ownership, package-source, local overlay, generated
|
|
225
|
+
contract, Tailwind prefix, or Module Federation conflicts in the owning files
|
|
226
|
+
instead of patching generated output by hand.
|
|
227
|
+
|
|
228
|
+
Cloudflare D1 bindings are first-class on `deploy.worker.d1Databases`; use that
|
|
229
|
+
config instead of app-local postprocessing when a generated app owns D1
|
|
230
|
+
migrations. Cloudflare public output excludes server-only `api` and `shared`
|
|
231
|
+
directories by default, and generated Modern/Rspack output roots, temp
|
|
232
|
+
directories, and caches are isolated per app, build target, and Rspack
|
|
233
|
+
environment so local `build`, `cloudflare:build`, and multi-environment
|
|
234
|
+
compilers do not share mutable build state.
|
|
235
|
+
|
|
236
|
+
## Human Workflow
|
|
237
|
+
|
|
238
|
+
The public BleedingDev create package has one supported generated product. The
|
|
239
|
+
default command creates a production-ready UltraModern SuperApp workspace with
|
|
240
|
+
`presetUltramodern(...)`, SSR, TanStack Router, Tailwind CSS v4, i18n, Effect
|
|
241
|
+
BFF, Module Federation topology, generated quality gates, and Cloudflare deploy
|
|
242
|
+
basics:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
pnpm dlx @bleedingdev/modern-js-create myapp
|
|
246
|
+
cd myapp
|
|
247
|
+
mise install
|
|
248
|
+
mise exec -- pnpm install
|
|
249
|
+
mise exec -- pnpm check
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
The workspace starts from a shell and generated platform contracts. It does not
|
|
253
|
+
generate a demo domain by default. Add real business MicroVerticals when they
|
|
254
|
+
become real ownership boundaries:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
pnpm dlx @bleedingdev/modern-js-create transportation --vertical
|
|
258
|
+
pnpm dlx @bleedingdev/modern-js-create food-delivery --vertical
|
|
259
|
+
pnpm dlx @bleedingdev/modern-js-create payments --vertical
|
|
260
|
+
pnpm dlx @bleedingdev/modern-js-create maps --vertical
|
|
261
|
+
mise exec -- pnpm check
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
The `--vertical` command mutates the current workspace. It creates the vertical
|
|
265
|
+
package and updates topology metadata, ownership records, shell Module
|
|
266
|
+
Federation wiring, local development overlays, package dependencies, generated
|
|
267
|
+
contracts, ports, route-owned i18n, CSS isolation, and the vertical-owned Effect
|
|
268
|
+
BFF/client surface.
|
|
269
|
+
|
|
270
|
+
### Generator Automation
|
|
271
|
+
|
|
272
|
+
Automation can use explicit MicroVertical syntax instead of relying on the
|
|
273
|
+
positional form:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
pnpm dlx @bleedingdev/modern-js-create --vertical=transportation
|
|
277
|
+
pnpm dlx @bleedingdev/modern-js-create --vertical-name transportation
|
|
278
|
+
pnpm dlx @bleedingdev/modern-js-create transportation --vertical --dry-run
|
|
279
|
+
pnpm dlx @bleedingdev/modern-js-create transportation --vertical \
|
|
280
|
+
--codesmith-overlay ./generators/vertical-overlay
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
The BleedingDev package defaults to installing the published package cohort.
|
|
284
|
+
Use `--workspace` or `--ultramodern-package-source=workspace` for local monorepo
|
|
285
|
+
testing. Release proof and package-source automation can also pass
|
|
286
|
+
`--ultramodern-package-source=install`,
|
|
287
|
+
`--ultramodern-package-version`, `--ultramodern-package-registry`,
|
|
288
|
+
`--ultramodern-package-scope`, and
|
|
289
|
+
`--ultramodern-package-name-prefix`.
|
|
290
|
+
|
|
291
|
+
The supported public generator import is:
|
|
292
|
+
|
|
293
|
+
```ts
|
|
294
|
+
import {
|
|
295
|
+
addUltramodernVertical,
|
|
296
|
+
generateUltramodernWorkspace,
|
|
297
|
+
planUltramodernVertical,
|
|
298
|
+
} from '@modern-js/create/ultramodern-workspace';
|
|
299
|
+
|
|
300
|
+
const workspace = generateUltramodernWorkspace({
|
|
301
|
+
targetDir: '/tmp/my-workspace',
|
|
302
|
+
packageName: 'my-workspace',
|
|
303
|
+
modernVersion: '3.4.0',
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
const plan = planUltramodernVertical({
|
|
307
|
+
workspaceRoot: workspace.workspaceRoot,
|
|
308
|
+
name: 'transportation',
|
|
309
|
+
modernVersion: '3.4.0',
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
addUltramodernVertical({
|
|
313
|
+
workspaceRoot: workspace.workspaceRoot,
|
|
314
|
+
name: 'transportation',
|
|
315
|
+
modernVersion: '3.4.0',
|
|
316
|
+
overlays: [{ generator: './generators/vertical-overlay' }],
|
|
317
|
+
});
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
The public result includes the workspace root, package source, created apps,
|
|
321
|
+
created paths, rewritten paths, assigned ports, Module Federation names, API
|
|
322
|
+
prefixes, generated contract path, and warnings. MicroVertical dry-run
|
|
323
|
+
returns the same shape plus `dryRun`, `selectedPort`, `moduleFederationRemote`,
|
|
324
|
+
`apiPrefix`, `jsonMutations`, `shellDependencyChanges`, and
|
|
325
|
+
`generatedContractChanges`; it prints JSON from the CLI and writes no files.
|
|
326
|
+
|
|
327
|
+
CodeSmith consumers can use the adapter subpath:
|
|
328
|
+
|
|
329
|
+
```ts
|
|
330
|
+
import ultramodernCodeSmith from '@modern-js/create/ultramodern-workspace/codesmith';
|
|
331
|
+
|
|
332
|
+
await ultramodernCodeSmith({
|
|
333
|
+
config: {
|
|
334
|
+
mode: 'vertical',
|
|
335
|
+
name: 'transportation',
|
|
336
|
+
workspaceRoot: process.cwd(),
|
|
337
|
+
dryRun: true,
|
|
338
|
+
logResult: true,
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Validation runs before the first write and reports the owning contract when a
|
|
344
|
+
vertical name is missing or invalid, an existing topology already owns the app
|
|
345
|
+
ID/path/package suffix/port/Module Federation name/API prefix/manifest key, a
|
|
346
|
+
workspace JSON contract is missing or not an object, or a Tailwind prefix would
|
|
347
|
+
collide. Fix the workspace contract or choose a different vertical name before
|
|
348
|
+
rerunning.
|
|
349
|
+
|
|
350
|
+
Overlays are explicit CodeSmith generators that run after base workspace or
|
|
351
|
+
MicroVertical generation. They extend generated output; they do not replace,
|
|
352
|
+
inherit, or shadow the base templates. The generator and CodeSmith adapter are
|
|
353
|
+
plain Node generator surfaces. The package build emits declaration files through
|
|
354
|
+
the TS-Go toolchain. Generated app packages keep stable `typescript` on TS7 so
|
|
355
|
+
Module Federation DTS generation and TS-Go use the same compiler lane; runtime
|
|
356
|
+
code does not depend on compiler internals.
|
|
357
|
+
|
|
358
|
+
### Runtime Contracts
|
|
359
|
+
|
|
360
|
+
Generated apps and verticals keep SSR on the normal Modern.js path. SuperApp
|
|
361
|
+
workspaces add `server.ssr.moduleFederationAppSSR` when Module Federation SSR is
|
|
362
|
+
needed, but the flag remains an explicit contract rather than a requirement for
|
|
363
|
+
every app.
|
|
364
|
+
|
|
365
|
+
Each app emits `src/routes/ultramodern-route-metadata` with
|
|
366
|
+
`ultramodernLocalisedUrls`. The i18n plugin reads that map in
|
|
367
|
+
`localeDetection.localisedUrls`; this is the explicit non-empty map that enables
|
|
368
|
+
translated path segments on top of `localePathRedirect`. The i18n plugin also
|
|
369
|
+
serves dynamic backend JSON from `/locales/{{lng}}/{{ns}}.json`. The route owner
|
|
370
|
+
changes localized paths and locale resource JSON together.
|
|
371
|
+
|
|
372
|
+
JSON-LD is optional route metadata, not inferred output. Private and
|
|
373
|
+
non-indexable routes emit no JSON-LD by default. Public route owners can add
|
|
374
|
+
`jsonLd` beside localized paths and use the generated
|
|
375
|
+
`src/routes/ultramodern-jsonld.ts` helpers for common schema.org shapes.
|
|
376
|
+
|
|
377
|
+
The generated contract writes `.modernjs/ultramodern.json` with a
|
|
378
|
+
`cssFederation` section:
|
|
379
|
+
|
|
380
|
+
- `packages/shared-design-tokens` owns the shared token layer and exports `./tokens.css`.
|
|
381
|
+
- Shell CSS owns only shell base and overlay layers under `[data-app-id="shell-super-app"]`.
|
|
382
|
+
- Each vertical owns one CSS layer, for example `[data-app-id="vertical-transportation"]` with app-local class prefixes.
|
|
383
|
+
- Tailwind CSS v4 is local to each generated app through `@rsbuild/plugin-tailwindcss`; shared base styles must not be duplicated by verticals.
|
|
384
|
+
- SSR first paint requires shared token CSS and app-owned CSS to be emitted by Modern/Rspack assets. Vertical CSS is loaded through manifest ownership, not copied into shell source.
|
|
385
|
+
|
|
386
|
+
Version switching must select UI, API, CSS, i18n JSON, and MF manifest evidence from the same vertical build marker. A shell render that only changes the UI marker is not enough.
|
|
387
|
+
|
|
388
|
+
### Validation And Deploy
|
|
389
|
+
|
|
390
|
+
Local gates:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
mise exec -- pnpm check
|
|
394
|
+
mise exec -- pnpm build
|
|
395
|
+
mise exec -- pnpm cloudflare:build
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Generated workspaces include `scripts/proof-cloudflare-version.mjs` for live
|
|
399
|
+
Cloudflare and Zephyr proof:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP=https://shell-super-app.example.workers.dev \
|
|
403
|
+
ULTRAMODERN_PUBLIC_URL_TRANSPORTATION=https://transportation.example.workers.dev \
|
|
404
|
+
ULTRAMODERN_PUBLIC_URL_PAYMENTS=https://payments.example.workers.dev \
|
|
405
|
+
mise exec -- pnpm cloudflare:proof --require-public-urls
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
Live Cloudflare and Zephyr proof requires public Worker URLs and Zephyr credentials. Without those, the repo can validate generated contracts, local builds, local Cloudflare output, dry-run Zephyr evidence plans, and local evidence schemas, but it cannot prove shell-driven live version selection.
|
|
409
|
+
|
|
410
|
+
BleedingDev packages are published through GitHub Actions trusted publishing.
|
|
411
|
+
The public workflow is tokenless; do not publish packages manually from a
|
|
412
|
+
developer machine.
|
|
413
|
+
|
|
414
|
+
## Baseline Switches (Opt-out)
|
|
415
|
+
|
|
416
|
+
The generated `presetUltramodern(...)` starter enables strict platform contracts. Use these env switches to opt out per app or per environment:
|
|
417
|
+
|
|
418
|
+
- `MODERN_BASELINE_ENABLE_MF_SSR` (default: `true`): Enables app-level MF SSR baseline contract (`server.ssr.mode: 'stream'` + `moduleFederationAppSSR`). Disable when the app does not use app-level MF SSR, or when you need plain SSR/CSR behavior first.
|
|
419
|
+
- `MODERN_BASELINE_ENABLE_BFF_REQUEST_ID` (default: `true`): Enables default BFF producer identity contract (`bff.requestId`). Disable when the app does not need cross-project producer isolation.
|
|
420
|
+
- `MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS` (default: `true`): Enables telemetry exporters in baseline config. Disable when the environment has no telemetry backend yet.
|
|
421
|
+
- `MODERN_BASELINE_APP_ID` (default: `basename(process.cwd())`): Overrides baseline `bff.requestId` identity. Set this when you need a fixed platform-wide producer ID convention.
|
|
422
|
+
- `MODERN_TELEMETRY_OTLP_ENDPOINT` (default: `http://127.0.0.1:4318/v1/logs`): OTLP exporter endpoint. Override when you route telemetry through a different collector endpoint.
|
|
423
|
+
- `MODERN_TELEMETRY_VICTORIA_ENDPOINT` (default: `http://127.0.0.1:8428/api/v1/import/prometheus`): VictoriaMetrics exporter endpoint. Override when you use a different VM ingress endpoint.
|
|
424
|
+
- `MODERN_TELEMETRY_FAIL_LOUD_STARTUP` (default: `true`): Fails startup if configured exporters fail startup health checks. Disable in local/dev environments where temporary telemetry outage should not block boot.
|
|
425
|
+
|
|
426
|
+
## Related Docs
|
|
427
|
+
|
|
428
|
+
- [BFF Runtime Frameworks](/guides/advanced-features/bff/frameworks)
|
|
429
|
+
- [BFF Data Platform](/guides/advanced-features/bff/data-platform)
|
|
430
|
+
- [BFF Effect Runtime Config](/configure/app/bff/effect)
|
|
431
|
+
- [Module Federation SSR](/guides/topic-detail/module-federation/ssr)
|
|
432
|
+
- [performance.rsdoctor](/configure/app/performance/rsdoctor)
|
|
433
|
+
- [server.ssr](/configure/app/server/ssr)
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 3
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import { PackageManagerTabs } from '@theme';
|
|
6
|
+
import ReleaseNote from '@site-docs-en/components/release-note';
|
|
7
|
+
|
|
8
|
+
# Upgrading
|
|
9
|
+
|
|
10
|
+
import Upgrade from '@site-docs/components/auto-upgrade';
|
|
11
|
+
|
|
12
|
+
<Upgrade />
|
|
13
|
+
|
|
14
|
+
## Manual Upgrade
|
|
15
|
+
|
|
16
|
+
All Modern.js official packages are released with a **uniform version number**, so when upgrading, you need to update all `@modern-js/**` packages to the target version uniformly.
|
|
17
|
+
|
|
18
|
+
### Upgrade Steps
|
|
19
|
+
|
|
20
|
+
1. **Check the latest version**
|
|
21
|
+
|
|
22
|
+
You can check the latest version of Modern.js through the following methods:
|
|
23
|
+
|
|
24
|
+
- Visit [npm](https://www.npmjs.com/package/@modern-js/app-tools) to check the latest version of `@modern-js/app-tools`
|
|
25
|
+
- Check [GitHub Releases](https://github.com/web-infra-dev/modern.js/releases)
|
|
26
|
+
|
|
27
|
+
<ReleaseNote />
|
|
28
|
+
|
|
29
|
+
2. **Update package.json**
|
|
30
|
+
|
|
31
|
+
In the project's `package.json`, update all `@modern-js/**` packages to the target version. For example:
|
|
32
|
+
|
|
33
|
+
```json title="package.json"
|
|
34
|
+
{
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@modern-js/app-tools": "3.0.0",
|
|
37
|
+
"@modern-js/runtime": "3.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@modern-js/types": "3.0.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
3. **Reinstall dependencies**
|
|
46
|
+
|
|
47
|
+
After updating `package.json`, reinstall dependencies:
|
|
48
|
+
|
|
49
|
+
<PackageManagerTabs command="install" />
|
|
50
|
+
|
|
51
|
+
:::tip
|
|
52
|
+
When upgrading, you need to upgrade all packages provided by Modern.js uniformly, rather than upgrading individual dependencies. Ensure that all `@modern-js/**` packages have the same version number.
|
|
53
|
+
:::
|
|
54
|
+
|
|
55
|
+
## Version Management Strategy
|
|
56
|
+
|
|
57
|
+
In Modern.js projects, we recommend that all officially provided dependencies use fixed version, and avoid using `^` or `~` for range declarations. For example:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@modern-js/app-tools": "x.y.z"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This ensures that the versions of dependencies are fully determined, thereby guaranteeing build consistency and predictability.
|
|
68
|
+
|
|
69
|
+
## Lock nested dependency
|
|
70
|
+
|
|
71
|
+
When a nested dependency of the project has a problem and Modern.js cannot be updated immediately, you can use the package manager to lock the version of the nested dependency.
|
|
72
|
+
|
|
73
|
+
### pnpm
|
|
74
|
+
|
|
75
|
+
For projects using pnpm, add the following configuration to the `package.json` in the **root directory** of the project, and then run `pnpm install` again:
|
|
76
|
+
|
|
77
|
+
```json title="package.json"
|
|
78
|
+
{
|
|
79
|
+
"pnpm": {
|
|
80
|
+
"overrides": {
|
|
81
|
+
"package-name": "^1.0.0"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Yarn
|
|
88
|
+
|
|
89
|
+
For projects using Yarn, add the following configuration to the `package.json` in the **root directory** of the project, and then run `yarn install` again:
|
|
90
|
+
|
|
91
|
+
```json title="package.json"
|
|
92
|
+
{
|
|
93
|
+
"resolutions": {
|
|
94
|
+
"package-name": "^1.0.0"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Npm
|
|
100
|
+
|
|
101
|
+
For projects using Npm, add the following configuration to the `package.json` in the **root directory** of the project, and then run `npm install` again:
|
|
102
|
+
|
|
103
|
+
```json title="package.json"
|
|
104
|
+
{
|
|
105
|
+
"overrides": {
|
|
106
|
+
"package-name": "^1.0.0"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
:::info
|
|
112
|
+
For Monorepo repositories, you can only lock dependency versions in the `package.json` in the root directory of the project, and it will affect all packages in the Monorepo.
|
|
113
|
+
|
|
114
|
+
:::
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["introduce", "usage", "application", "ssr", "deploy", "i18n"]
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Application-Level Modules
|
|
2
|
+
|
|
3
|
+
Modern.js provides runtime APIs to quickly export application-level Module Federation modules from your application.
|
|
4
|
+
|
|
5
|
+
We use the application created in [Using Module Federation](/guides/topic-detail/module-federation/usage) as an example to further explain how to import application-level modules.
|
|
6
|
+
|
|
7
|
+
## Exporting Modules from Producer
|
|
8
|
+
|
|
9
|
+
Unlike directly exporting component-level modules, we need to create a separate entry for application-level modules to be exported via `Module Federation`.
|
|
10
|
+
|
|
11
|
+
We create the `src/export-App.tsx` file:
|
|
12
|
+
|
|
13
|
+
:::note
|
|
14
|
+
The filename can be arbitrary; Modern.js does not enforce a specific naming convention.
|
|
15
|
+
:::
|
|
16
|
+
|
|
17
|
+
```ts title="src/export-App.tsx"
|
|
18
|
+
import '@modern-js/runtime/registry/index'; // This line must be included, it will import micro frontend runtime dependencies by default
|
|
19
|
+
import { render } from '@modern-js/runtime/browser';
|
|
20
|
+
import { createRoot } from '@modern-js/runtime/react';
|
|
21
|
+
import { createBridgeComponent } from '@module-federation/modern-js-v3/react-v19';
|
|
22
|
+
|
|
23
|
+
const ModernRoot = createRoot();
|
|
24
|
+
export const provider = createBridgeComponent({
|
|
25
|
+
rootComponent: ModernRoot,
|
|
26
|
+
render: (Component, dom) => render(Component, dom),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export default provider;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
:::note
|
|
33
|
+
Please select the corresponding import path based on the React version used in your project:
|
|
34
|
+
|
|
35
|
+
- **React 19**: Use `@module-federation/modern-js-v3/react-v19`
|
|
36
|
+
- **React 18**: Use `@module-federation/modern-js-v3/react-v18`
|
|
37
|
+
|
|
38
|
+
You can check the React version in your project's `package.json` file to determine which import path to use.
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
This file will pass the root component of the `main` entry application to the Bridge API and render it to the specified node via Bridge's render function.
|
|
42
|
+
|
|
43
|
+
Next, we configure `module-federation.config.ts` to modify the export to `src/export-App.tsx`:
|
|
44
|
+
|
|
45
|
+
```ts title="module-federation.config.ts"
|
|
46
|
+
import { createModuleFederationConfig } from '@module-federation/modern-js-v3';
|
|
47
|
+
|
|
48
|
+
export default createModuleFederationConfig({
|
|
49
|
+
name: 'remote',
|
|
50
|
+
manifest: {
|
|
51
|
+
filePath: 'static',
|
|
52
|
+
},
|
|
53
|
+
filename: 'static/remoteEntry.js',
|
|
54
|
+
exposes: {
|
|
55
|
+
'./app': './src/export-App.tsx',
|
|
56
|
+
},
|
|
57
|
+
shared: {
|
|
58
|
+
react: { singleton: true },
|
|
59
|
+
'react-dom': { singleton: true },
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
:::info
|
|
65
|
+
[`createBridgeComponent`](https://module-federation.io/guide/bridge/overview#core-apis) is used to export application-level modules. Modern.js related APIs can be found at [createRoot](/apis/app/runtime/core/create-root) and [render](/apis/app/runtime/core/render).
|
|
66
|
+
:::
|
|
67
|
+
|
|
68
|
+
## Using Modules in Consumer
|
|
69
|
+
|
|
70
|
+
We then modify the consumer configuration by removing the previously created `src/routes/remote/page.tsx` route file.
|
|
71
|
+
|
|
72
|
+
We want all routes that access `/remote` to enter the aforementioned application-level module, so we add `src/routes/remote/$.tsx` instead.
|
|
73
|
+
|
|
74
|
+
:::note
|
|
75
|
+
If you are not familiar with the capabilities of `$.tsx`, please read [Wildcard Routes](/guides/basic-features/routes/routes#wildcard-routes).
|
|
76
|
+
:::
|
|
77
|
+
|
|
78
|
+
```tsx title="src/routes/remote/$.tsx"
|
|
79
|
+
import { createRemoteAppComponent } from '@module-federation/modern-js-v3/react';
|
|
80
|
+
import { loadRemote } from '@module-federation/modern-js-v3/runtime';
|
|
81
|
+
|
|
82
|
+
const ErrorBoundary = (info?: { error: { message: string } }) => {
|
|
83
|
+
return (
|
|
84
|
+
<div>
|
|
85
|
+
<h2>This is ErrorBoundary Component, Something went wrong:</h2>
|
|
86
|
+
<pre style={{ color: 'red' }}>{info?.error.message}</pre>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
const Loading = <div>loading...</div>;
|
|
91
|
+
const RemoteApp = createRemoteAppComponent({
|
|
92
|
+
loader: () => loadRemote('remote/app'),
|
|
93
|
+
fallback: ErrorBoundary,
|
|
94
|
+
loading: Loading,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export default RemoteApp;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
:::info
|
|
101
|
+
[`createRemoteAppComponent`](https://module-federation.io/guide/bridge/overview#core-apis) is used to load application-level modules.
|
|
102
|
+
:::
|
|
103
|
+
|
|
104
|
+
## Start the Application
|
|
105
|
+
|
|
106
|
+
Now, both the producer and consumer applications are set up. We can run `modern dev` locally to start both applications.
|
|
107
|
+
|
|
108
|
+
After startup, when the consumer application accesses the `/remote` route, it will enter the producer application. Accessing `http://localhost:8080/remote` will display a complete page of the producer's remote module in the browser.
|
|
109
|
+
|
|
110
|
+
You can create new route files in the producer application and add route navigation in the code. These functionalities will also work as expected.
|
|
111
|
+
|
|
112
|
+
You can refer to the example here: [Modern.js & Module Federation Application-Level Modules](https://github.com/web-infra-dev/modern.js/tree/main/examples/module-federation/app-export).
|
|
113
|
+
|
|
114
|
+
## Related Documentation
|
|
115
|
+
|
|
116
|
+
- [Module Federation Bridge](https://module-federation.io/guide/bridge/overview)
|