@module-federation/nextjs-mf 5.1.3 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -134,6 +134,7 @@ new NextFederationPlugin({
134
134
  exposePages: true, // `false` by default
135
135
  enableImageLoaderFix: true, // `false` by default
136
136
  enableUrlLoaderFix: true, // `false` by default
137
+ skipSharingNextInternals: true // `false` by default
137
138
  },
138
139
  });
139
140
  ```
@@ -141,6 +142,7 @@ new NextFederationPlugin({
141
142
  - `exposePages` – exposes automatically all nextjs pages for you and theirs `./pages-map`.
142
143
  - `enableImageLoaderFix` – adds public hostname to all assets bundled by `nextjs-image-loader`. So if you serve remoteEntry from `http://example.com` then all bundled assets will get this hostname in runtime. It's something like Base URL in HTML but for federated modules.
143
144
  - `enableUrlLoaderFix` – adds public hostname to all assets bundled by `url-loader`.
145
+ - `skipSharingNextInternals` - skips sharing of common nextjs modules. Helpful when you would like explicit control over shared modules, such as a non-nextjs host with a federated nextjs child application.
144
146
 
145
147
  ## Demo
146
148
 
@@ -220,7 +220,9 @@ class ChildFederation {
220
220
  },
221
221
  runtime: false,
222
222
  shared: {
223
- ...externalizedShares,
223
+ ...(this._extraOptions.skipSharingNextInternals
224
+ ? {}
225
+ : externalizedShares),
224
226
  ...this._options.shared,
225
227
  },
226
228
  }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "@module-federation/nextjs-mf",
4
- "version": "5.1.3",
4
+ "version": "5.2.0",
5
5
  "description": "Module Federation helper for NextJS",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",