Hello there! I’m trying to use Vercel’s microfrontend thing to split my website and API backend. But I faced some problem with the documentation itself.
In Getting started with microfrontends, the documentation said:
Application names in
microfrontends.jsonshould match the Vercel project names.
I assumes this is the value inside applications property in microfrontends.json, but after trying out, the Vercel system seemingly does not actually matches this field to project name. Instead, it matches to *.vercel.app domain name.
Here’s a more straightforward explanation:
If I currently have a project called my-awesome-resume, with another project called my-awesome-frontend, which has configured as top level microfrontend project in that group.
Now, the my-awesome-frontend has this microfrontend configuration:
{
"$schema": "https://openapi.vercel.sh/microfrontends.json",
"applications": {
"my-awesome-frontend": {
"development": {
"fallback": "dead-website.vercel.app"
}
},
"my-awesome-resume": {
"routing": [
{
"paths": ["/resume"]
}
]
}
}
}
This configuration now routes /resume to my-awesome-resume, thing works.
But if I change project my-awesome-resume domain to my-cool-resume.vercel.app, the routing broke. Navigating to /resume now results in this error:
Note that removing existing domain will also break routing.
Changing the domain name back to the one that matches project name (my-awesome-resume) in this case, microfrontend now able to forward requests to this project. No error given.
