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
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 Aug 18, 2025 3:40am
examples-designsystem-docs Ready Ready Preview Comment Aug 18, 2025 3:40am
examples-gatsby-web Ready Ready Preview Comment Aug 18, 2025 3:40am
examples-kitchensink-blog Ready Ready Preview Comment Aug 18, 2025 3:40am
examples-nonmonorepo Ready Ready Preview Comment Aug 18, 2025 3:40am
examples-svelte-web Ready Ready Preview Comment Aug 18, 2025 3:40am
examples-tailwind-web Ready Ready Preview Comment Aug 18, 2025 3:40am
examples-vite-web Ready Ready Preview Comment Aug 18, 2025 3:40am
turbo-site Ready Ready Preview Comment Aug 18, 2025 3:40am

@anthonyshew
Copy link
Contributor Author

anthonyshew commented Aug 18, 2025

As of [917ed79](https://github.com/vercel/turborepo/pull/10771/commits/917ed79575ae67bd82034c31bc114d37c8c78072), 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.


Refer to the documentation for your framework, library, or runtime to learn how to set the port for the script.

### 4. Add the `@turbo/microfrontends` package to child apps
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
### 4. Add the `@turbo/microfrontends` package to child apps
### 4. Add the `@vercel/microfrontends` package to child apps

{
"name": "docs",
"devDependencies": {
+ "@turbo/microfrontends": "workspace:*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
+ "@turbo/microfrontends": "workspace:*"
+ "@vercel/microfrontends": "workspace:*"

{
"name": "docs",
"devDependencies": {
+ "@turbo/microfrontends": "workspace:*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
+ "@turbo/microfrontends": "workspace:*"
+ "@vercel/microfrontends": "workspace:*"

{
"name": "docs",
"devDependencies": {
+ "@turbo/microfrontends": "workspace:*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
+ "@turbo/microfrontends": "workspace:*"
+ "@vercel/microfrontends": "workspace:*"

{
"name": "docs",
"devDependencies": {
+ "@turbo/microfrontends": "workspace:*"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
+ "@turbo/microfrontends": "workspace:*"
+ "@vercel/microfrontends": "workspace:*"


Turborepo enhances microfrontend development with:

- **Unified development experience**: Start all your microfrontends with a single command
Copy link
Member

Choose a reason for hiding this comment

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

I feel like the unified devx we offer is that you can browse all of your microfrontends from a single host locally. Maybe we link to https://vercel.com/docs/microfrontends/local-development#the-need-for-a-microfrontends-proxy explaining why this is helpful?

With the microfrontends configuration, Turborepo will:

1. Start each application on its designated port
2. Handle dependencies between applications
Copy link
Member

Choose a reason for hiding this comment

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

"Handle dependencies", might be too vague

Suggested change
2. Handle dependencies between applications
2. Handle routing between applications

{
"version": "1",
"applications": {
"docs": {}
Copy link
Member

Choose a reason for hiding this comment

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

We should provide a full config with default and child application

Suggested change
"docs": {}
"web": {},
"docs": {
"paths": ["/docs"]
}

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

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.


### Child configurations

Individual microfrontend packages can reference a parent configuration using a `partOf` field. This allows child applications to inherit configuration from the parent application.
Copy link
Member

Choose a reason for hiding this comment

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

The partOf configuration might make sense to cut as it doesn't "do" anything aside to point to which package contains the configuration. There's no overriding that can be done at this level. (IIRC)

Suggested change
Individual microfrontend packages can reference a parent configuration using a `partOf` field. This allows child applications to inherit configuration from the parent application.
Individual microfrontend packages can declare they're membership of a parent microfrontend using a `partOf` field.

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.

2 participants