This repository contains several small samples on different matching versions of Next.js framework and @module-federation/nextjs-mf plugin.
The samples prefixed with "shared-deps" have dependency sharing and the interaction between host and remote always trying to maintain the host's version over the remote.
| Next.js / MF Plugin | 6.4.0 | 6.7.1 | 8.1.10 |
|---|---|---|---|
| 13.3.1 | ✅ | ✅ | ✅ |
| 13.3.4 | ✅ | ✅ | ✅ |
| 13.4.7 | ✅ | ✅ | ✅ |
| ~13.4.8 | ❌ | ❌ | ✅ |
| 13.5.6 | ❌ | ❌ | ✅ |
| ^14.1.0 | ❌ | ❌ | ✅ |
- template
├ host (A Next.js host app)
├ remote (A Next.js remote app)
├ package.json (Package file with scripts to run all apps at once)
└ README.md (This readme file to explain how to run the sample)
Install the dependencies using npm:
npm iTo run the samples in development mode, run the following command:
npm run devTo run the samples in production mode, first build the samples using the following command:
npm run buildThen, run the following command to serve the samples:
npm run start