Skip to content

Commit ce2d956

Browse files
Merge pull request #26 from module-federation/fix_endless_build
2 parents f52f6ad + ab79c99 commit ce2d956

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

flushChunksOrig.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,12 @@ requireMethod.cache[manifestPath].exports = new Proxy(loadableManifest, {
122122
return true;
123123
}
124124
}
125-
console.log(remote.chunkMap.loadable);
126125
if (
127126
remote.chunkMap &&
128127
remote.chunkMap.loadable &&
129128
remote.chunkMap.loadable[prop]
130129
) {
131130
console.log("extracting local import from this loadable map", prop);
132-
console.log(prop, dynamicLoadableManifestItem);
133131
extractLocalRemoteImport(remote, dynamicLoadableManifestItem, prop);
134132
return true;
135133
}

lib/with-federated-sidecar.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ const withModuleFederation =
213213
removePlugins,
214214
publicPath,
215215
done,
216-
// mainBuild,
217216
options,
218217
}) {
219218
if (compiler[options.isServer ? "server" : "client"]) {
@@ -271,7 +270,7 @@ const withModuleFederation =
271270
chunkLoadingGlobal: undefined,
272271
devtoolNamespace: undefined,
273272
uniqueName: federationPluginOptions.name,
274-
// hotUpdateGlobal: "webpackHotUpdate_" + federationPluginOptions.name,
273+
hotUpdateGlobal: "webpackHotUpdate_" + federationPluginOptions.name,
275274
publicPath,
276275
},
277276
cache: false,
@@ -614,11 +613,6 @@ const withModuleFederation =
614613
* @param {import("webpack").Compiler} compiler
615614
*/
616615
apply(compiler) {
617-
// let mainBuildResolve;
618-
// let mainBuild = new Promise((res) => {
619-
// mainBuildResolve = res;
620-
// });
621-
622616
const run = (compilation, done) => {
623617
return startCompiler({
624618
webpack,
@@ -628,21 +622,9 @@ const withModuleFederation =
628622
publicPath,
629623
done,
630624
options,
631-
// mainBuild,
632625
});
633626
};
634627

635-
// compiler.hooks.thisCompilation.tap("NextFederation",(compilation)=>{
636-
// run(compilation)
637-
// })
638-
639-
// compiler.hooks.afterEmit.tapAsync(
640-
// "NextFederation",
641-
// (compilation, done) => {
642-
// done();
643-
// mainBuildResolve();
644-
// }
645-
// );
646628
// in production or on server build use tapAsync to wait for the full compilation of the sidecar
647629
if (isProd || compiler.options.mode === "production") {
648630
compiler.hooks.afterCompile.tapAsync(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"public": true,
33
"name": "@module-federation/nextjs-ssr",
4-
"version": "0.1.0-rc.5",
4+
"version": "0.1.0-rc.6",
55
"description": "Module Federation CSR & SSR Support for Next.js",
66
"main": "bundle.js",
77
"types": "index.d.ts",

0 commit comments

Comments
 (0)