@module-federation/webpack-bundler-runtime 0.0.0-next-20240523121007 → 0.0.0-next-20240523225730
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constant.cjs.js +1 -20
- package/dist/constant.esm.js +2 -19
- package/dist/index.cjs.js +3 -1
- package/dist/index.esm.js +4 -2
- package/dist/src/constant.d.ts +0 -4
- package/package.json +4 -4
package/dist/constant.cjs.js
CHANGED
|
@@ -2,29 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
function _define_property(obj, key, value) {
|
|
6
|
-
if (key in obj) {
|
|
7
|
-
Object.defineProperty(obj, key, {
|
|
8
|
-
value: value,
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true
|
|
12
|
-
});
|
|
13
|
-
} else {
|
|
14
|
-
obj[key] = value;
|
|
15
|
-
}
|
|
16
|
-
return obj;
|
|
17
|
-
}
|
|
18
5
|
var ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX';
|
|
19
|
-
// TODO: support rspack
|
|
20
|
-
var FEDERATION_SUPPORTED_TYPES_CJS = 'cjs:webpack';
|
|
21
|
-
var FEDERATION_SUPPORTED_TYPES_CJS_MAP = _define_property({}, FEDERATION_SUPPORTED_TYPES_CJS, 'commonjs-module');
|
|
22
6
|
var FEDERATION_SUPPORTED_TYPES = [
|
|
23
|
-
'script'
|
|
24
|
-
FEDERATION_SUPPORTED_TYPES_CJS
|
|
7
|
+
'script'
|
|
25
8
|
];
|
|
26
9
|
|
|
27
10
|
exports.ENCODE_NAME_PREFIX = ENCODE_NAME_PREFIX;
|
|
28
11
|
exports.FEDERATION_SUPPORTED_TYPES = FEDERATION_SUPPORTED_TYPES;
|
|
29
|
-
exports.FEDERATION_SUPPORTED_TYPES_CJS = FEDERATION_SUPPORTED_TYPES_CJS;
|
|
30
|
-
exports.FEDERATION_SUPPORTED_TYPES_CJS_MAP = FEDERATION_SUPPORTED_TYPES_CJS_MAP;
|
package/dist/constant.esm.js
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
1
|
var ENCODE_NAME_PREFIX = 'ENCODE_NAME_PREFIX';
|
|
15
|
-
// TODO: support rspack
|
|
16
|
-
var FEDERATION_SUPPORTED_TYPES_CJS = 'cjs:webpack';
|
|
17
|
-
var FEDERATION_SUPPORTED_TYPES_CJS_MAP = _define_property({}, FEDERATION_SUPPORTED_TYPES_CJS, 'commonjs-module');
|
|
18
2
|
var FEDERATION_SUPPORTED_TYPES = [
|
|
19
|
-
'script'
|
|
20
|
-
FEDERATION_SUPPORTED_TYPES_CJS
|
|
3
|
+
'script'
|
|
21
4
|
];
|
|
22
5
|
|
|
23
|
-
export { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES
|
|
6
|
+
export { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES };
|
package/dist/index.cjs.js
CHANGED
|
@@ -109,7 +109,9 @@ function remotes(options) {
|
|
|
109
109
|
onError(error);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
|
-
var useRuntimeLoad = remoteInfos.length === 1 &&
|
|
112
|
+
var useRuntimeLoad = remoteInfos.length === 1 && [
|
|
113
|
+
'script'
|
|
114
|
+
].includes(remoteInfos[0].externalType) && remoteInfos[0].name;
|
|
113
115
|
if (useRuntimeLoad) {
|
|
114
116
|
handleFunction(onRemoteLoaded, data[2], 0, 0, onFactory, 1);
|
|
115
117
|
} else {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as runtime from '@module-federation/runtime';
|
|
2
2
|
import { decodeName } from '@module-federation/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { ENCODE_NAME_PREFIX, FEDERATION_SUPPORTED_TYPES } from './constant.esm.js';
|
|
4
4
|
|
|
5
5
|
function attachShareScopeMap(webpackRequire) {
|
|
6
6
|
if (!webpackRequire.S || webpackRequire.federation.hasAttachShareScopeMap || !webpackRequire.federation.instance || !webpackRequire.federation.instance.shareScopeMap) {
|
|
@@ -87,7 +87,9 @@ function remotes(options) {
|
|
|
87
87
|
onError(error);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
var useRuntimeLoad = remoteInfos.length === 1 &&
|
|
90
|
+
var useRuntimeLoad = remoteInfos.length === 1 && [
|
|
91
|
+
'script'
|
|
92
|
+
].includes(remoteInfos[0].externalType) && remoteInfos[0].name;
|
|
91
93
|
if (useRuntimeLoad) {
|
|
92
94
|
handleFunction(onRemoteLoaded, data[2], 0, 0, onFactory, 1);
|
|
93
95
|
} else {
|
package/dist/src/constant.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
export declare const ENCODE_NAME_PREFIX = "ENCODE_NAME_PREFIX";
|
|
2
|
-
export declare const FEDERATION_SUPPORTED_TYPES_CJS = "cjs:webpack";
|
|
3
|
-
export declare const FEDERATION_SUPPORTED_TYPES_CJS_MAP: {
|
|
4
|
-
"cjs:webpack": string;
|
|
5
|
-
};
|
|
6
2
|
export declare const FEDERATION_SUPPORTED_TYPES: string[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"public": true,
|
|
3
3
|
"name": "@module-federation/webpack-bundler-runtime",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-20240523225730",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Module Federation Runtime for webpack",
|
|
7
7
|
"keywords": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"module": "./dist/index.esm.js",
|
|
21
21
|
"types": "./dist/index.cjs.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@module-federation/
|
|
24
|
-
"@module-federation/
|
|
23
|
+
"@module-federation/sdk": "0.0.0-next-20240523225730",
|
|
24
|
+
"@module-federation/runtime": "0.0.0-next-20240523225730"
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@module-federation/runtime": "0.0.0-next-
|
|
52
|
+
"@module-federation/runtime": "0.0.0-next-20240523225730"
|
|
53
53
|
}
|
|
54
54
|
}
|