-
Notifications
You must be signed in to change notification settings - Fork 2.1k
docs: microfrontends #10771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: microfrontends #10771
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Fixed. |
| ```bash title="Terminal" | ||
| turbo dev --filter=docs | ||
| ``` |
There was a problem hiding this comment.
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.
| ```json title="microfrontends.json" | ||
| { | ||
| "applications": { | ||
| "app": { | ||
| "development": { | ||
| "local": { | ||
| "port": 3000 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
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:
- Compare line 74 showing
"local": 3000(correct) - Compare lines 192-194 showing
"local": { "port": 3000 }(incorrect) - Verify against official schema which defines
localas "number or string", not an object - Check
examples/with-microfrontends/apps/web/microfrontends.jsonwhich 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.
|
Superceded by #10982 |
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.