-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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): support user specified local proxy #9695
Merged
Merged
+155
−20
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
tknickman
approved these changes
Jan 22, 2025
tknickman
reviewed
Jan 22, 2025
chris-olszewski
force-pushed
the
olszewski/feat_generic_proxy
branch
from
January 24, 2025 21:17
cf27b60
to
c8f63ea
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds support for users specifying a custom proxy command instead of the default MFE one. This is done by having a
proxy
script on the default application.The interface the proxy must implement:
microfrontends.json
file--name
and a list of applications currently being run. These will be a subset of theapplications
section in the passed configuration file.The schema that Turborepo will require of
microfrontends.json
is very permissive to allow for extensibility:version?: string
field can be omitted or must be"2"
explicitlyapplications: {[string]: { dev?: string, local?: { port:?: number } } }
: keys must match thename
s inpackage.json
To use the provided
@turbo/proxy
implementation,microfrontends.json
will need to match the existing MFE schema.Testing Instructions
Some unit tests. A quick sample repo with following changes from a fresh
create-turbo
:Now if we run the dev task:
Things to take note of:
microfrontends.json
configuration file.--names
arg for the proxy matches the names of the applications that have dev tasks runningTURBO_PORT
which was derived from the application name