Skip to content

ryok90/nextjs-mf-examples

Repository files navigation

Next.js <> Module Federation Plugin - Version Matching

npm

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.

Basic Compatibility Table (WIP)

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

Sample Structure

- 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)

Sample Stack

How to run the sample

Install the dependencies using npm:

npm i

To run the samples in development mode, run the following command:

npm run dev

To run the samples in production mode, first build the samples using the following command:

npm run build

Then, run the following command to serve the samples:

npm run start

About

[Next.js <-> Module Federation] Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published