@module-federation/esbuild 0.0.0-next-20240529015908 → 0.0.0-next-20240530194604
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/plugin.cjs.js +6 -1
- package/dist/plugin.esm.js +6 -1
- package/package.json +2 -2
package/dist/plugin.cjs.js
CHANGED
|
@@ -464,6 +464,7 @@ const buildContainerHost = (config)=>{
|
|
|
464
464
|
const runtimePlugin = () => ({
|
|
465
465
|
name: 'import-maps-plugin',
|
|
466
466
|
async init(args) {
|
|
467
|
+
|
|
467
468
|
const remotePrefetch = args.options.remotes.map(async (remote) => {
|
|
468
469
|
if (remote.type === 'esm') {
|
|
469
470
|
await import(remote.entry);
|
|
@@ -655,12 +656,16 @@ const buildFederationHost = (config)=>{
|
|
|
655
656
|
}
|
|
656
657
|
});
|
|
657
658
|
|
|
658
|
-
initFederationHost({
|
|
659
|
+
const host = initFederationHost({
|
|
659
660
|
name: ${JSON.stringify(name)},
|
|
660
661
|
remotes: ${remoteConfigs},
|
|
661
662
|
shared: ${sharedConfig},
|
|
662
663
|
plugins: [runtimePlugin()],
|
|
663
664
|
});
|
|
665
|
+
|
|
666
|
+
await Promise.all(host.initializeSharing('default', 'version-first'));
|
|
667
|
+
|
|
668
|
+
|
|
664
669
|
`;
|
|
665
670
|
};
|
|
666
671
|
const initializeHostPlugin = (config)=>({
|
package/dist/plugin.esm.js
CHANGED
|
@@ -454,6 +454,7 @@ const buildContainerHost = (config)=>{
|
|
|
454
454
|
const runtimePlugin = () => ({
|
|
455
455
|
name: 'import-maps-plugin',
|
|
456
456
|
async init(args) {
|
|
457
|
+
|
|
457
458
|
const remotePrefetch = args.options.remotes.map(async (remote) => {
|
|
458
459
|
if (remote.type === 'esm') {
|
|
459
460
|
await import(remote.entry);
|
|
@@ -645,12 +646,16 @@ const buildFederationHost = (config)=>{
|
|
|
645
646
|
}
|
|
646
647
|
});
|
|
647
648
|
|
|
648
|
-
initFederationHost({
|
|
649
|
+
const host = initFederationHost({
|
|
649
650
|
name: ${JSON.stringify(name)},
|
|
650
651
|
remotes: ${remoteConfigs},
|
|
651
652
|
shared: ${sharedConfig},
|
|
652
653
|
plugins: [runtimePlugin()],
|
|
653
654
|
});
|
|
655
|
+
|
|
656
|
+
await Promise.all(host.initializeSharing('default', 'version-first'));
|
|
657
|
+
|
|
658
|
+
|
|
654
659
|
`;
|
|
655
660
|
};
|
|
656
661
|
const initializeHostPlugin = (config)=>({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/esbuild",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20240530194604",
|
|
4
4
|
"author": "Zack Jackson (@ScriptedAlchemy)",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"esbuild": "^0.18.12",
|
|
66
66
|
"npmlog": "^6.0.2",
|
|
67
67
|
"acorn": "^8.8.1",
|
|
68
|
-
"@module-federation/sdk": "0.
|
|
68
|
+
"@module-federation/sdk": "0.1.16"
|
|
69
69
|
}
|
|
70
70
|
}
|