Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@module-federation/webpack-bundler-runtime

Package Overview
Dependencies
Maintainers
8
Versions
712
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/webpack-bundler-runtime - npm Package Compare versions

Comparing version 0.0.0-next-20240523121007 to 0.0.0-next-20240523224941

21

dist/constant.cjs.js

@@ -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 };

4

dist/index.cjs.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc