-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(mfe): inject local proxy #9356
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
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.
lgtm, nothing blocking for now
// TODO: leverage package manager to find the local proxy | ||
let program = package_dir.join_components(&["node_modules", ".bin", "micro-frontends"]); |
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.
+1
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.
Looks good overall, just a couple nits
pub struct CommandFactory<'a> { | ||
providers: Vec<Box<dyn CommandProvider + 'a + Send>>, |
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.
Are we going to have more providers than this? It's a little general for two implementations
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.
If we ever want to support additional tasks that don't come from package.json
scripts
(turbo.json
, non-JS, etc) I expect this is where we would put those.
Description
This PR adds all support necessary for starting a MFE local proxy:
CommandProvider
to allow for multiple strategies for constructing a command depending on the typemicro-frontends.jsonc
micro-frontends.jsonc
found in the package graph*proxy
task if MFE configs are foundproxy
tasks in engine building step if a MFE dev task is found in the product of the package--filter
and the tasks specified inturbo run
CommandProvider
that construct a command that invokes the MFE local proxyFollow up work:
Testing Instructions
In a repository with MFE, run a dev task for one of the configured MFE. This should result in a
#proxy
task being injected for that MFE and correctly configured to route traffic to the dev tasks or a remote host.