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): update production setup for MFE host app #9699

Merged
merged 1 commit into from Apr 6, 2022

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Apr 6, 2022

This PR adds a better default production webpack config for the host app.

const withModuleFederation = require('@nrwl/react/module-federation');
const mfeConfig = require('./mfe.config');

module.exports = withModuleFederation({
  ...mfeConfig,
    /*
     * Remote overrides for production.
     * Each entry is a pair of an unique name and the URL where it is deployed.
     *
     * e.g.
     * remotes: [
     *   ['app1', '//app1.example.com'],
     *   ['app2', '//app2.example.com'],
     * ]
     *
     * You can also use a full path to the remoteEntry.js file if desired.
     *
     * remotes: [
     *   ['app1', '//example.com/path/to/app1/remoteEntry.js'],
     *   ['app2', '//example.com/path/to/app2/remoteEntry.js'],
     * ]
     */
  remotes: [
    ['about', '//localhost:4201/'],
    ['dashboard', '//localhost:4202/'],
  ],
});

@vercel
Copy link

vercel bot commented Apr 6, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/HcZTm4pajvWWZQFcAzWiyPgCDtNM
✅ Preview: Canceled

@jaysoo jaysoo enabled auto-merge (squash) April 6, 2022 00:56
@jaysoo jaysoo merged commit cf54cc9 into nrwl:master Apr 6, 2022
@jaysoo jaysoo deleted the feat-react-mfe-fixes branch April 6, 2022 01:25
@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.

None yet

1 participant