@module-federation/webpack-bundler-runtime
Advanced tools
Comparing version 0.0.0-next-20240523121007 to 0.0.0-next-20240523224941
@@ -5,22 +5,5 @@ 'use strict'; | ||
function _define_property(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
var ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX'; | ||
// TODO: support rspack | ||
var FEDERATION_SUPPORTED_TYPES_CJS = 'cjs:webpack'; | ||
var FEDERATION_SUPPORTED_TYPES_CJS_MAP = _define_property({}, FEDERATION_SUPPORTED_TYPES_CJS, 'commonjs-module'); | ||
var FEDERATION_SUPPORTED_TYPES = [ | ||
'script', | ||
FEDERATION_SUPPORTED_TYPES_CJS | ||
'script' | ||
]; | ||
@@ -30,3 +13,1 @@ | ||
exports.FEDERATION_SUPPORTED_TYPES = FEDERATION_SUPPORTED_TYPES; | ||
exports.FEDERATION_SUPPORTED_TYPES_CJS = FEDERATION_SUPPORTED_TYPES_CJS; | ||
exports.FEDERATION_SUPPORTED_TYPES_CJS_MAP = FEDERATION_SUPPORTED_TYPES_CJS_MAP; |
@@ -1,23 +0,6 @@ | ||
function _define_property(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
var ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX'; | ||
// TODO: support rspack | ||
var FEDERATION_SUPPORTED_TYPES_CJS = 'cjs:webpack'; | ||
var FEDERATION_SUPPORTED_TYPES_CJS_MAP = _define_property({}, FEDERATION_SUPPORTED_TYPES_CJS, 'commonjs-module'); | ||
var FEDERATION_SUPPORTED_TYPES = [ | ||
'script', | ||
FEDERATION_SUPPORTED_TYPES_CJS | ||
'script' | ||
]; | ||
export { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES, FEDERATION_SUPPORTED_TYPES_CJS, FEDERATION_SUPPORTED_TYPES_CJS_MAP }; | ||
export { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES }; |
@@ -112,3 +112,5 @@ 'use strict'; | ||
}; | ||
var useRuntimeLoad = remoteInfos.length === 1 && constant.FEDERATION_SUPPORTED_TYPES.includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
var useRuntimeLoad = remoteInfos.length === 1 && [ | ||
'script' | ||
].includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
if (useRuntimeLoad) { | ||
@@ -115,0 +117,0 @@ handleFunction(onRemoteLoaded, data[2], 0, 0, onFactory, 1); |
import * as runtime from '@module-federation/runtime'; | ||
import { decodeName } from '@module-federation/sdk'; | ||
import { FEDERATION_SUPPORTED_TYPES, ENCODE_NAME_PREFIX } from './constant.esm.js'; | ||
import { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES } from './constant.esm.js'; | ||
@@ -90,3 +90,5 @@ function attachShareScopeMap(webpackRequire) { | ||
}; | ||
var useRuntimeLoad = remoteInfos.length === 1 && FEDERATION_SUPPORTED_TYPES.includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
var useRuntimeLoad = remoteInfos.length === 1 && [ | ||
'script' | ||
].includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
if (useRuntimeLoad) { | ||
@@ -93,0 +95,0 @@ handleFunction(onRemoteLoaded, data[2], 0, 0, onFactory, 1); |
export declare const ENCODE_NAME_PREFIX = "ENCODE_NAME_PREFIX"; | ||
export declare const FEDERATION_SUPPORTED_TYPES_CJS = "cjs:webpack"; | ||
export declare const FEDERATION_SUPPORTED_TYPES_CJS_MAP: { | ||
"cjs:webpack": string; | ||
}; | ||
export declare const FEDERATION_SUPPORTED_TYPES: string[]; |
{ | ||
"public": true, | ||
"name": "@module-federation/webpack-bundler-runtime", | ||
"version": "0.0.0-next-20240523121007", | ||
"version": "0.0.0-next-20240523224941", | ||
"license": "MIT", | ||
@@ -23,4 +23,4 @@ "description": "Module Federation Runtime for webpack", | ||
"dependencies": { | ||
"@module-federation/runtime": "0.0.0-next-20240523121007", | ||
"@module-federation/sdk": "0.0.0-next-20240523121007" | ||
"@module-federation/runtime": "0.0.0-next-20240523224941", | ||
"@module-federation/sdk": "0.0.0-next-20240523224941" | ||
}, | ||
@@ -53,4 +53,4 @@ "exports": { | ||
"devDependencies": { | ||
"@module-federation/runtime": "0.0.0-next-20240523121007" | ||
"@module-federation/runtime": "0.0.0-next-20240523224941" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64898
1482
+ Added@module-federation/runtime@0.0.0-next-20240523224941(transitive)
+ Added@module-federation/sdk@0.0.0-next-20240523224941(transitive)
- Removed@module-federation/runtime@0.0.0-next-20240523121007(transitive)
- Removed@module-federation/sdk@0.0.0-next-20240523121007(transitive)