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

chore: update README and add MODULE_FEDERATION/md #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbinda
Copy link
Collaborator

@jbinda jbinda commented Sep 21, 2022

Summary

Add more verbose README related with examples

P.S. originator of the content was @andrewworld - however he faced some issue with access so I populated PR with those changes

Test plan

@jbinda jbinda self-assigned this Sep 21, 2022
Module federation is one of the approaches to create Micro-Frondends architecture for your application. There are the host app that runs firstly on the device and MFEs apps that are used by the host app. That means each container (MFE) that is used by host application could be deployed and maintained independently, so no need to re-deploy host app if any of the containers were changed and re-deployed. This is the key feature of Module Federation. Each team could independently work on any of the packages and deploy it anytime, so the host app will see the changes immediately.

## Application Structure
// TODO
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

still has to be update

Copy link
Member

Choose a reason for hiding this comment

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

let's not leave todos and create a ticket instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@andrewworld are you able to finalise soon? If not I will do as @thymikee wrote

Comment on lines +6 to +9
- __ESBuild__: The application that uses __ESBuild Minify Plugin__ and `esbuild-loader` under the hood
- __Local Chuncks__: The application that uses Repack local chuncks feature
- [__Module Federation__](./module-federation/MODULE_FEDERATION.md): Huge yarn workspaces that consist of 3 application and 1 module, that could run as standalone applications or running host app with other applications modules usage inside it with __Webpack Module Federation__ feature configured
- __SWC__: The application using `swc-loader` inside webpack configuration
Copy link
Member

Choose a reason for hiding this comment

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

can we make those links to specific folders?

2. Run `yarn workspace <name> run bootstrap` command for every workspace to install yarn dependencies and pods

## Running
1. Run `yarn workspace <name> run start` commmand for any workspace you want to run dev server
Copy link
Member

Choose a reason for hiding this comment

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

would be cool to list available workspaces :) otherwise you need to check package.json :P


Module Federation functionality was introduced in Webpack 5. It helps to share the code between loosely coupled applications, sharing the same build system optimized for caching. It helps distributed teams to ship large applications faster. Re.Pack 3 ships with Module Federation support out-of-the-box.

Module federation is one of the approaches to create Micro-Frondends architecture for your application. There are the host app that runs firstly on the device and MFEs apps that are used by the host app. That means each container (MFE) that is used by host application could be deployed and maintained independently, so no need to re-deploy host app if any of the containers were changed and re-deployed. This is the key feature of Module Federation. Each team could independently work on any of the packages and deploy it anytime, so the host app will see the changes immediately.
Copy link
Member

Choose a reason for hiding this comment

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

MFE is Micro-Frontend? might using "create Micro-Frondends (MFEs) architecture"

// TODO

## Basic Setup
1. Go to `module-federation` folder `cd module-federation`
Copy link
Member

Choose a reason for hiding this comment

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

you're already in module-federation folder

3. Run `yarn run:host:android`

## Standalone Run
As was mentions before we could run any of containers as a standaline application (`app1` / `app2` / `module1`).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
As was mentions before we could run any of containers as a standaline application (`app1` / `app2` / `module1`).
You can run any of containers as a standalone application (`app1` / `app2` / `module1`):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants