This repository include samples using a Module Federation setup. Those samples could be of help to the MSW maintainers to troubleshoot issues that are specific to federated applications.
Note for Squide maintainers: This file is referenced in the MSW example repository here.
To install the sample and start the application with a developer server, follow these steps.
-
Clone the repository locally:
git clone https://github.com/gsoft-inc/wl-squide.git
. -
Install the codebase with PNPM, execute the following command at the root of the monorepo:
pnpm install
. -
Start the sample application by executing the following command at the root of the monorepo:
pnpm dev-endpoints
. -
Once the sample application is started, open a browser and navigate to
http://localhost:8080
. -
The application should render a login page. Use
temp
as the username andtemp
as the password.
-
The sample application code is located here
-
The sample application includes three applications:
This is the HOST application that instanciate a registry (through a FireflyRuntime
class), provides the registry to the modules and then start the MSW service. The parts that should be of interest are:
This is the REMOTE app using Module Federation. It registers it's request handlers in the src/register.tsx file.
This is more like a LIBRARY project that register pages and request handlers than an actual app. It's loaded at build time rather than at RUNTIME like a REMOTE app. I don't think this project is of interest to you.