Module Federation Status
Current state: Module Federation is turned off in every app. All five apps build as plain, independent React single-page apps (SPAs). There are no hosts and no remotes at runtime.
This page describes exactly how things stand today so the rest of the docs are not misread. It does not predict whether Module Federation will be turned back on.
Some earlier architecture pages describe Module Federation as an active part of the system. That is not accurate for the current code. Where those pages and this page disagree, this page is correct.
What you would expect vs. what is true
The project was originally built around Module Federation, and the traces are everywhere:
- The workspace is named
AquagenMfWebappand the library import scope is@aquagen-mf-webapp/…("mf" = Module Federation). - The dependencies
@module-federation/enhancedand@nx/module-federationare installed. - Each app has a
module-federation.config.jsfile. src/main.jsxin every app isimport('./bootstrap')— the async boundary Module Federation needs.
Despite all of that, no federation actually happens. The naming and scaffolding are historical.
How it is turned off
1. The plugin is commented out in the config Nx actually uses
Nx builds each app using the conventionally-named rspack.config.js. In every app, the Module Federation plugin is commented out, with a literal marker:
// apps/production/rspack.config.js
// Comment out module federation temporarily
// const { NxModuleFederationPlugin, NxModuleFederationDevServerPlugin } = require('@nx/module-federation/rspack');
...
// new NxModuleFederationPlugin({ config }, { dts: false }),
// new NxModuleFederationDevServerPlugin({ config }),
So the build produces a normal SPA bundle with no federation runtime.
2. The config that has it enabled is never used
Each app also has a second file, rspack.config.prod.js, where the Module Federation plugin is uncommented. But:
- Nx only reads
rspack.config.js, neverrspack.config.prod.js. - A repo-wide search for
rspack.config.prodreturns zero references — no script, noproject.json, nothing points at it.
So rspack.config.prod.js is dead config. See Legacy & Deprecated.
3. Even if it ran, there are no remotes
Every module-federation.config.js declares the app as a host with an empty remotes list:
module.exports = {
name: 'production',
remotes: [],
};
A host with no remotes federates nothing.
So what makes an app "standalone"?
Because Module Federation is off, "standalone" has nothing to do with remote loading. A standalone app is just a normal SPA that:
- calls
createValidateLogin(<AppNavigationHelper>)in itsbootstrap.jsx, - passes
standaloneAppName="<app>"into the shared store, and - hands its own
navInstanceto the layout.
All the detail is in Standalone Apps.
Each app compiles the shared libraries into its own bundle at build time. Nothing is fetched from another app at runtime.
What this means in practice
- There is no host/remote relationship to reason about. Each app is self-contained.
- Shared code is shared at the source level (via the
@aquagen-mf-webapp/*path aliases), not at runtime. - Updating a shared library requires rebuilding every app that uses it — there is no independent remote to redeploy.
- The
module-federation.config.js,rspack.config.prod.js, and themain.jsxasync boundary can all be treated as inert with respect to how the apps run today.
Next steps
- Standalone Apps — the actual mechanism behind the standalone products.
- Legacy & Deprecated — the dead Module-Federation-related config in one place.
- Architecture → Micro-Frontend Architecture — the monorepo/library structure (with the Module Federation framing corrected).