@module-federation/vite 1.16.1 → 1.16.3
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/lib/index.cjs +304 -83
- package/lib/index.d.cts +1 -1
- package/lib/index.d.mts +1 -1
- package/lib/index.mjs +304 -83
- package/lib/{packageUtils-DOekOsFz.mjs → packageUtils-Bbc6r6__.mjs} +4 -1
- package/lib/{packageUtils-CbbnJvKu.cjs → packageUtils-se-UDhCa.cjs} +9 -0
- package/lib/{pluginDts-BEOKyKQ-.cjs → pluginDts-7EoFboCu.cjs} +1 -1
- package/lib/{pluginDts-B5pcUmam.mjs → pluginDts-DDx4TPN8.mjs} +1 -1
- package/package.json +16 -16
|
@@ -123,6 +123,9 @@ function getPackageNameFromNodeModulePath(source) {
|
|
|
123
123
|
if (parts[0].startsWith("@")) return parts[1] ? `${parts[0]}/${parts[1]}` : void 0;
|
|
124
124
|
return parts[0];
|
|
125
125
|
}
|
|
126
|
+
function getSharedCacheKey(pkg, shareItem) {
|
|
127
|
+
return shareItem.shareConfig.singleton || !shareItem.version ? pkg : `${pkg}@${shareItem.version}`;
|
|
128
|
+
}
|
|
126
129
|
function getInstalledPackageJson(pkg, opts) {
|
|
127
130
|
const cwd = opts?.cwd || getPackageDetectionCwd();
|
|
128
131
|
const packageName = opts?.packageName || getPackageName(pkg);
|
|
@@ -247,4 +250,4 @@ function hasPackageDependency(dependencyName, cwd = packageDetectionCwd || proce
|
|
|
247
250
|
}
|
|
248
251
|
}
|
|
249
252
|
//#endregion
|
|
250
|
-
export { getPackageName as a,
|
|
253
|
+
export { getPackageName as a, hasPackageDependency as c, packageNameEncode as d, setPackageDetectionCwd as f, __require as g, mfWarn as h, getPackageDetectionCwd as i, isNuxtProjectRoot as l, mfError as m, getInstalledPackageJson as n, getPackageNameFromNodeModulePath as o, createModuleFederationError as p, getIsRolldown as r, getSharedCacheKey as s, getInstalledPackageEntry as t, packageNameDecode as u };
|
|
@@ -142,6 +142,9 @@ function getPackageNameFromNodeModulePath(source) {
|
|
|
142
142
|
if (parts[0].startsWith("@")) return parts[1] ? `${parts[0]}/${parts[1]}` : void 0;
|
|
143
143
|
return parts[0];
|
|
144
144
|
}
|
|
145
|
+
function getSharedCacheKey(pkg, shareItem) {
|
|
146
|
+
return shareItem.shareConfig.singleton || !shareItem.version ? pkg : `${pkg}@${shareItem.version}`;
|
|
147
|
+
}
|
|
145
148
|
function getInstalledPackageJson(pkg, opts) {
|
|
146
149
|
const cwd = opts?.cwd || getPackageDetectionCwd();
|
|
147
150
|
const packageName = opts?.packageName || getPackageName(pkg);
|
|
@@ -314,6 +317,12 @@ Object.defineProperty(exports, "getPackageNameFromNodeModulePath", {
|
|
|
314
317
|
return getPackageNameFromNodeModulePath;
|
|
315
318
|
}
|
|
316
319
|
});
|
|
320
|
+
Object.defineProperty(exports, "getSharedCacheKey", {
|
|
321
|
+
enumerable: true,
|
|
322
|
+
get: function() {
|
|
323
|
+
return getSharedCacheKey;
|
|
324
|
+
}
|
|
325
|
+
});
|
|
317
326
|
Object.defineProperty(exports, "hasPackageDependency", {
|
|
318
327
|
enumerable: true,
|
|
319
328
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as hasPackageDependency, g as __require, m as mfError, p as createModuleFederationError } from "./packageUtils-Bbc6r6__.mjs";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import * as path$1 from "pathe";
|
|
4
4
|
import { normalizeOptions } from "@module-federation/sdk";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/vite",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.3",
|
|
4
4
|
"description": "Vite plugin for Module Federation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.cjs",
|
|
@@ -77,23 +77,23 @@
|
|
|
77
77
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@module-federation/dts-plugin": "2.5.
|
|
81
|
-
"@module-federation/runtime": "2.5.
|
|
82
|
-
"@module-federation/sdk": "2.5.
|
|
83
|
-
"es-module-lexer": "
|
|
84
|
-
"estree-walker": "
|
|
85
|
-
"pathe": "
|
|
80
|
+
"@module-federation/dts-plugin": "2.5.1",
|
|
81
|
+
"@module-federation/runtime": "2.5.1",
|
|
82
|
+
"@module-federation/sdk": "2.5.1",
|
|
83
|
+
"es-module-lexer": "2.0.0",
|
|
84
|
+
"estree-walker": "3.0.3",
|
|
85
|
+
"pathe": "2.0.3"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@changesets/cli": "
|
|
89
|
-
"@playwright/test": "
|
|
90
|
-
"@types/node": "
|
|
91
|
-
"husky": "
|
|
92
|
-
"oxfmt": "
|
|
93
|
-
"rollup": "
|
|
94
|
-
"tsdown": "
|
|
88
|
+
"@changesets/cli": "2.30.0",
|
|
89
|
+
"@playwright/test": "1.58.2",
|
|
90
|
+
"@types/node": "25.3.3",
|
|
91
|
+
"husky": "9.1.7",
|
|
92
|
+
"oxfmt": "0.36.0",
|
|
93
|
+
"rollup": "4.47.1",
|
|
94
|
+
"tsdown": "0.21.0",
|
|
95
95
|
"typescript": "5.9.3",
|
|
96
|
-
"vite": "
|
|
97
|
-
"vitest": "
|
|
96
|
+
"vite": "8.0.10",
|
|
97
|
+
"vitest": "4.0.18"
|
|
98
98
|
}
|
|
99
99
|
}
|