diff --git a/packages/node/src/loaders/chunk-marker-loader.js b/packages/node/src/loaders/chunk-marker-loader.js deleted file mode 100644 index 82c62a02096..00000000000 --- a/packages/node/src/loaders/chunk-marker-loader.js +++ /dev/null @@ -1,13 +0,0 @@ -export default function (content) { - this.cacheable && this.cacheable(true); - if (content.indexOf('global.usedChunks.add(exports.id)') !== -1) { - return content; - } - - const joined = [ - 'if(global.usedChunks && exports.id) global.usedChunks.add(exports.id);', - content, - ].join('\n'); - - return joined; -} diff --git a/packages/node/src/plugins/NodeFederationPlugin.ts b/packages/node/src/plugins/NodeFederationPlugin.ts index f4d0bd1eec4..899e77a14a9 100644 --- a/packages/node/src/plugins/NodeFederationPlugin.ts +++ b/packages/node/src/plugins/NodeFederationPlugin.ts @@ -191,21 +191,6 @@ class NodeFederationPlugin { // When used with Next.js, context is needed to use Next.js webpack const { webpack } = compiler; - // compiler.options.module.rules.push({ - // test: /\.(js|jsx|ts|tsx|md|mdx|mjs)$/, - // exclude: [/node_modules/,/_document/], - // loader: require.resolve('../loaders/chunk-marker-loader'), - // options: this._options, - // }); - - // const defs = { - // 'process.env.REMOTES': runtime, - // 'process.env.REMOTE_CONFIG': hot, - // }; - - // new ((webpack && webpack.DefinePlugin) || require("webpack").DefinePlugin)( - // defs - // ).apply(compiler); const pluginOptions = { ...this._options, remotes: parseRemotes( diff --git a/packages/node/src/plugins/loadScript.ts b/packages/node/src/plugins/loadScript.ts index 0196bcb379e..ef04601f6dc 100644 --- a/packages/node/src/plugins/loadScript.ts +++ b/packages/node/src/plugins/loadScript.ts @@ -53,7 +53,6 @@ export const executeLoadTemplate = ` (global.webpackChunkLoad || global.fetch || require("node-fetch"))(url).then(function (res) { return res.text(); }).then(function (scriptContent) { - console.log('in script loading promise for', name); try { // TODO: remove conditional in v7, this is to prevent breaking change between v6.0.x and v6.1.x const vmContext = typeof URLSearchParams === 'undefined' ?{exports, require, module, global, __filename, __dirname, URL, URLSearchParams, console, process,Buffer, ...global, remoteEntryName: name}: diff --git a/packages/node/src/utils/flush-chunks.js b/packages/node/src/utils/flush-chunks.js index 3cbc4864f73..3a287219270 100644 --- a/packages/node/src/utils/flush-chunks.js +++ b/packages/node/src/utils/flush-chunks.js @@ -93,17 +93,15 @@ console.error("flush errer",e); }); } - console.log(chunks); - return Array.from(chunks); } catch (e) { - // console.log(e); + console.log(e); } }) ); const dedupe = Array.from(new Set([...allFlushed.flat()])); - // usedChunks.clear(); + usedChunks.clear(); return dedupe.filter(Boolean); }; diff --git a/packages/utilities/src/utils/common.ts b/packages/utilities/src/utils/common.ts index 59bff557ea1..f94fb633bef 100644 --- a/packages/utilities/src/utils/common.ts +++ b/packages/utilities/src/utils/common.ts @@ -86,7 +86,6 @@ export const importDelegatedModule = async ( // most of this is only needed because of legacy promise based implementation // can remove proxies once we remove promise based implementations if (typeof window === 'undefined') { -console.log('returning async container') if (!Object.hasOwnProperty.call(keyOrRuntimeRemoteItem, 'global')) { return asyncContainer; } @@ -104,10 +103,7 @@ console.log('returning async container') if (typeof m[prop] === 'function') { Object.defineProperty(result, prop, { get: function () { - console.log('calling getter') return function () { - //@ts-ignore - console.log('returning dunction', `${keyOrRuntimeRemoteItem.global}->${arg}`) //@ts-ignore if (global.usedChunks) //@ts-ignore