Skip to content

Instantly share code, notes, and snippets.

View amir2mi's full-sized avatar
:octocat:
=🐙 + 🐱

Amir M. Mohamadi amir2mi

:octocat:
=🐙 + 🐱
View GitHub Profile
@amir2mi
amir2mi / next.config.js
Last active May 23, 2024 05:43
Setup module federation for Next.js using @module-federation/nextjs-mf
const nextJsConfig = {
webpack(config, options) {
if (!options?.isServer) {
config.plugins.push(
new NextFederationPlugin({
name: "service-name",
filename: "static/chunks/remoteEntry.js",
exposes: {
"./pages/index": "./pages/index.jsx",
},