这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@anthonyshew
Copy link
Contributor

@anthonyshew anthonyshew commented Aug 18, 2025

Description

Documenting the new microfrontends feature. it also comes with an example that folks can try out.

Testing Instructions

👀 Read the docs.
🧪 Try the example.

@turbo-orchestrator turbo-orchestrator bot added area: docs Improvements or additions to documentation area: examples Improvements or additions to examples area: site labels Aug 18, 2025
@vercel
Copy link
Contributor

vercel bot commented Aug 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
examples-basic-web Ready Ready Preview Comment Oct 1, 2025 5:50am
examples-designsystem-docs Ready Ready Preview Comment Oct 1, 2025 5:50am
examples-gatsby-web Ready Ready Preview Comment Oct 1, 2025 5:50am
examples-kitchensink-blog Ready Ready Preview Comment Oct 1, 2025 5:50am
examples-nonmonorepo Ready Ready Preview Comment Oct 1, 2025 5:50am
examples-svelte-web Ready Ready Preview Comment Oct 1, 2025 5:50am
examples-tailwind-web Ready Ready Preview Comment Oct 1, 2025 5:50am
examples-vite-web Building Building Preview Comment Oct 1, 2025 5:50am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
turbo-site Skipped Skipped Oct 1, 2025 5:50am

@anthonyshew
Copy link
Contributor Author

anthonyshew commented Aug 18, 2025

As of 917ed79, I don't think I've completed the documentation page fully. Please take a look at the example first. I'm not sorting out how to get the /docs path to work right. It's making it into the docs application, but visiting in my browser shows a 404.

Fixed.

Comment on lines +153 to +155
```bash title="Terminal"
turbo dev --filter=docs
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A callout that if only docs is run all web routes will be served by the "default" host might be useful.

Comment on lines +187 to +199
```json title="microfrontends.json"
{
"applications": {
"app": {
"development": {
"local": {
"port": 3000
}
}
}
}
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Explicit port mapping" section shows an incorrect JSON structure for the local property that conflicts with both the main example (lines 63, 74) and the actual implementation in the example code.

View Details
📝 Patch Details
diff --git a/docs/site/content/docs/guides/microfrontends.mdx b/docs/site/content/docs/guides/microfrontends.mdx
index 67d5b1f74..916f38633 100644
--- a/docs/site/content/docs/guides/microfrontends.mdx
+++ b/docs/site/content/docs/guides/microfrontends.mdx
@@ -189,9 +189,7 @@ Specify exact ports in your configuration:
   "applications": {
     "app": {
       "development": {
-        "local": {
-          "port": 3000
-        }
+        "local": 3000
       }
     }
   }
@@ -215,8 +213,7 @@ An object where each key is an application identifier and the value contains:
 - **`packageName`** (optional): The package name if different from the application's key in the configuration
 - **`development`**: Development configuration
   - **`task`** (optional): The task name to run for development (defaults to `"dev"`)
-  - **`local`**: Local development settings
-    - **`port`** (optional): Specific port number. If not specified, a consistent port is generated based on the application name
+  - **`local`** (optional): Port number, host string, or full URL for local development (e.g., `3000`, `"my.localhost.me:8080"`, or `"https://my.localhost.me:8080"`). If not specified, a consistent port is generated based on the application name
 
 ### Child configurations
 

Analysis

Incorrect JSON structure for local property in microfrontends.mdx documentation

What fails: The "Explicit port mapping" section (lines 187-199) and Configuration Options section (lines 218-219) in docs/site/content/docs/guides/microfrontends.mdx showed incorrect JSON structure "local": { "port": 3000 }, conflicting with the actual schema and all working examples which use "local": 3000.

How to reproduce:

  1. Compare line 74 showing "local": 3000 (correct)
  2. Compare lines 192-194 showing "local": { "port": 3000 } (incorrect)
  3. Verify against official schema which defines local as "number or string", not an object
  4. Check examples/with-microfrontends/apps/web/microfrontends.json which uses "local": 3000

Result: Documentation showed two different, conflicting structures for the same property, causing users to write invalid configuration files.

Expected: Documentation should consistently show "local": 3000 (or string variants like "local": "localhost:3000") throughout, matching the official schema definition that local is a "number or string" per the Vercel microfrontends schema.

@anthonyshew
Copy link
Contributor Author

Superceded by #10982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Improvements or additions to documentation area: examples Improvements or additions to examples area: site

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants