Skip to content
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(react): add ability to serve remote apps in dev or static mode #9893

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Apr 20, 2022

This PR adds a serve-static target for apps generated with @nrwl/react:host or @nrwl/react:remote. It is used by the @nrwl/react:module-federation-dev-server to serve remote apps from dist (i.e. built artifact), intended when serving a host/shell app.

So users can do:

nx serve shell --devRemotes=app1,app3

And the serve target would only run dev-server for app1 and app3--app2 and others will serve from dist.

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@nx-cloud
Copy link

nx-cloud bot commented Apr 20, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 5390f5d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 13 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Apr 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Apr 20, 2022 at 3:56PM (UTC)

export function loadModuleFederationConfigFromContext(
context: ExecutorContext
): ModuleFederationConfig {
const p = context.workspace.projects[context.projectName];
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nitpick here should this be project?

@jaysoo jaysoo merged commit e32932d into nrwl:master Apr 20, 2022
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants