@module-federation/webpack-bundler-runtime
Advanced tools
Comparing version 0.0.0-next-20240523085338 to 0.0.0-next-20240523121007
@@ -5,5 +5,22 @@ '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' | ||
'script', | ||
FEDERATION_SUPPORTED_TYPES_CJS | ||
]; | ||
@@ -13,1 +30,3 @@ | ||
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; |
@@ -0,6 +1,23 @@ | ||
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' | ||
'script', | ||
FEDERATION_SUPPORTED_TYPES_CJS | ||
]; | ||
export { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES }; | ||
export { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES, FEDERATION_SUPPORTED_TYPES_CJS, FEDERATION_SUPPORTED_TYPES_CJS_MAP }; |
@@ -112,5 +112,3 @@ 'use strict'; | ||
}; | ||
var useRuntimeLoad = remoteInfos.length === 1 && [ | ||
'script' | ||
].includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
var useRuntimeLoad = remoteInfos.length === 1 && constant.FEDERATION_SUPPORTED_TYPES.includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
if (useRuntimeLoad) { | ||
@@ -117,0 +115,0 @@ handleFunction(onRemoteLoaded, data[2], 0, 0, onFactory, 1); |
import * as runtime from '@module-federation/runtime'; | ||
import { decodeName } from '@module-federation/sdk'; | ||
import { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES } from './constant.esm.js'; | ||
import { FEDERATION_SUPPORTED_TYPES, ENCODE_NAME_PREFIX } from './constant.esm.js'; | ||
@@ -90,5 +90,3 @@ function attachShareScopeMap(webpackRequire) { | ||
}; | ||
var useRuntimeLoad = remoteInfos.length === 1 && [ | ||
'script' | ||
].includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
var useRuntimeLoad = remoteInfos.length === 1 && FEDERATION_SUPPORTED_TYPES.includes(remoteInfos[0].externalType) && remoteInfos[0].name; | ||
if (useRuntimeLoad) { | ||
@@ -95,0 +93,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-20240523085338", | ||
"version": "0.0.0-next-20240523121007", | ||
"license": "MIT", | ||
@@ -23,4 +23,4 @@ "description": "Module Federation Runtime for webpack", | ||
"dependencies": { | ||
"@module-federation/runtime": "0.0.0-next-20240523085338", | ||
"@module-federation/sdk": "0.0.0-next-20240523085338" | ||
"@module-federation/runtime": "0.0.0-next-20240523121007", | ||
"@module-federation/sdk": "0.0.0-next-20240523121007" | ||
}, | ||
@@ -53,4 +53,4 @@ "exports": { | ||
"devDependencies": { | ||
"@module-federation/runtime": "0.0.0-next-20240523085338" | ||
"@module-federation/runtime": "0.0.0-next-20240523121007" | ||
} | ||
} |
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
66309
1518
+ Added@module-federation/runtime@0.0.0-next-20240523121007(transitive)
+ Added@module-federation/sdk@0.0.0-next-20240523121007(transitive)
- Removed@module-federation/runtime@0.0.0-next-20240523085338(transitive)
- Removed@module-federation/sdk@0.0.0-next-20240523085338(transitive)