Skip to content

Commit

Permalink
feat: prepare for v7
Browse files Browse the repository at this point in the history
BREAKING CHANGE: safety breaking change note
BREAKING_CHANGE: safety breaking change note
  • Loading branch information
ScriptedAlchemy committed Apr 18, 2023
1 parent 17205a7 commit 7bc4b3b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 37 deletions.
13 changes: 0 additions & 13 deletions packages/node/src/loaders/chunk-marker-loader.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/node/src/plugins/NodeFederationPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion packages/node/src/plugins/loadScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}:
Expand Down
6 changes: 2 additions & 4 deletions packages/node/src/utils/flush-chunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
4 changes: 0 additions & 4 deletions packages/utilities/src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
Expand Down

0 comments on commit 7bc4b3b

Please sign in to comment.