diff --git a/README.md b/README.md
index 5d54e4f..e5a2884 100644
--- a/README.md
+++ b/README.md
@@ -90,3 +90,24 @@ class MyDocument extends Document {
const Nav = (await import("../components/nav")).default;
const _ = await import("lodash");
```
+
+## Experimental
+
+Use at your own risk.
+
+Next.js uses `runtimeChunk:'single'`
+Which forces us to also add the webpack script itself. Till this is fixed in webpack, heres a plugin that will merge the runtimes back together for MF
+
+```js
+const {MergeRuntime} = require("@module-federation/nexjs-mf");
+// in your next config.
+config.plugins.push(new MergeRuntime());
+```
+
+This allows the following to be done
+
+```diff
+ -
+ -
+ +
+```
diff --git a/merge-runtime.js b/merge-runtime.js
index 557076f..6a53391 100644
--- a/merge-runtime.js
+++ b/merge-runtime.js
@@ -1,4 +1,3 @@
-const shell = require("shelljs");
const path = require("path");
const fs = require("fs");
module.exports = class MergeRemoteChunksPlugin {
@@ -23,7 +22,7 @@ module.exports = class MergeRemoteChunksPlugin {
if (files.length > 1) {
const runtime = fs.readFileSync(files[0], "utf-8");
const remoteContainer = fs.readFileSync(files[1], "utf-8");
- const merged = [runtime,remoteContainer].join("\n");
+ const merged = [runtime, remoteContainer].join("\n");
const remotePath = path.join(output.compiler.context, ".next/static");
if (fs.existsSync(remotePath)) {
fs.mkdir(remotePath, { recursive: true }, (err) => {
@@ -36,7 +35,7 @@ module.exports = class MergeRemoteChunksPlugin {
".next/static/remoteEntryMerged.js"
),
merged,
- ()=>{}
+ () => {}
);
}
});