@module-federation/sdk 2.0.0 → 2.1.0
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/_virtual/_rolldown/runtime.cjs +19 -0
- package/dist/_virtual/_rolldown/runtime.js +18 -0
- package/dist/constant.cjs +70 -0
- package/dist/constant.cjs.map +1 -0
- package/dist/constant.d.ts +53 -0
- package/dist/constant.js +55 -0
- package/dist/constant.js.map +1 -0
- package/dist/createModuleFederationConfig.cjs +9 -0
- package/dist/createModuleFederationConfig.cjs.map +1 -0
- package/dist/createModuleFederationConfig.d.ts +8 -0
- package/dist/createModuleFederationConfig.js +8 -0
- package/dist/createModuleFederationConfig.js.map +1 -0
- package/dist/dom.cjs +166 -0
- package/dist/dom.cjs.map +1 -0
- package/dist/dom.d.ts +35 -0
- package/dist/dom.js +162 -0
- package/dist/dom.js.map +1 -0
- package/dist/env.cjs +32 -0
- package/dist/env.cjs.map +1 -0
- package/dist/{src/env.d.ts → env.d.ts} +5 -2
- package/dist/env.js +29 -0
- package/dist/env.js.map +1 -0
- package/dist/generateSnapshotFromManifest.cjs +138 -0
- package/dist/generateSnapshotFromManifest.cjs.map +1 -0
- package/dist/generateSnapshotFromManifest.d.ts +22 -0
- package/dist/generateSnapshotFromManifest.js +134 -0
- package/dist/generateSnapshotFromManifest.js.map +1 -0
- package/dist/index.cjs +89 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.js +15 -0
- package/dist/logger.cjs +129 -0
- package/dist/logger.cjs.map +1 -0
- package/dist/logger.d.ts +34 -0
- package/dist/logger.js +125 -0
- package/dist/logger.js.map +1 -0
- package/dist/node.cjs +122 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.ts +17 -0
- package/dist/node.js +120 -0
- package/dist/node.js.map +1 -0
- package/dist/normalize-webpack-path.cjs +28 -0
- package/dist/normalize-webpack-path.cjs.map +1 -0
- package/dist/normalize-webpack-path.d.ts +10 -1
- package/dist/normalize-webpack-path.js +26 -0
- package/dist/normalize-webpack-path.js.map +1 -0
- package/dist/normalizeOptions.cjs +19 -0
- package/dist/normalizeOptions.cjs.map +1 -0
- package/dist/normalizeOptions.d.ts +5 -0
- package/dist/normalizeOptions.js +18 -0
- package/dist/normalizeOptions.js.map +1 -0
- package/dist/types/common.d.ts +14 -0
- package/dist/types/hooks.d.ts +16 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/manifest.d.ts +34 -0
- package/dist/types/plugins/ContainerPlugin.cjs +13 -0
- package/dist/types/plugins/ContainerPlugin.cjs.map +1 -0
- package/dist/types/plugins/ContainerPlugin.d.ts +40 -0
- package/dist/types/plugins/ContainerPlugin.js +8 -0
- package/dist/types/plugins/ContainerPlugin.js.map +1 -0
- package/dist/types/plugins/ContainerReferencePlugin.cjs +13 -0
- package/dist/types/plugins/ContainerReferencePlugin.cjs.map +1 -0
- package/dist/types/plugins/ContainerReferencePlugin.d.ts +23 -0
- package/dist/types/plugins/ContainerReferencePlugin.js +8 -0
- package/dist/types/plugins/ContainerReferencePlugin.js.map +1 -0
- package/dist/types/plugins/ModuleFederationPlugin.cjs +13 -0
- package/dist/types/plugins/ModuleFederationPlugin.cjs.map +1 -0
- package/dist/types/plugins/ModuleFederationPlugin.d.ts +432 -0
- package/dist/types/plugins/ModuleFederationPlugin.js +8 -0
- package/dist/types/plugins/ModuleFederationPlugin.js.map +1 -0
- package/dist/types/plugins/SharePlugin.cjs +13 -0
- package/dist/types/plugins/SharePlugin.cjs.map +1 -0
- package/dist/types/plugins/SharePlugin.d.ts +29 -0
- package/dist/types/plugins/SharePlugin.js +8 -0
- package/dist/types/plugins/SharePlugin.js.map +1 -0
- package/dist/types/plugins/index.d.ts +4 -0
- package/dist/types/snapshot.d.ts +81 -0
- package/dist/types/stats.d.ts +101 -0
- package/dist/utils.cjs +127 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/{src/utils.d.ts → utils.d.ts} +9 -3
- package/dist/utils.js +116 -0
- package/dist/utils.js.map +1 -0
- package/package.json +10 -7
- package/dist/index.cjs.cjs +0 -1032
- package/dist/index.cjs.cjs.map +0 -1
- package/dist/index.cjs.d.ts +0 -1
- package/dist/index.esm.js +0 -978
- package/dist/index.esm.js.map +0 -1
- package/dist/normalize-webpack-path.cjs.cjs +0 -42
- package/dist/normalize-webpack-path.cjs.cjs.map +0 -1
- package/dist/normalize-webpack-path.cjs.d.ts +0 -1
- package/dist/normalize-webpack-path.esm.js +0 -39
- package/dist/normalize-webpack-path.esm.js.map +0 -1
- package/dist/src/constant.d.ts +0 -49
- package/dist/src/createModuleFederationConfig.d.ts +0 -2
- package/dist/src/dom.d.ts +0 -29
- package/dist/src/generateSnapshotFromManifest.d.ts +0 -15
- package/dist/src/index.d.ts +0 -11
- package/dist/src/logger.d.ts +0 -32
- package/dist/src/node.d.ts +0 -11
- package/dist/src/normalize-webpack-path.d.ts +0 -5
- package/dist/src/normalizeOptions.d.ts +0 -1
- package/dist/src/types/common.d.ts +0 -10
- package/dist/src/types/hooks.d.ts +0 -12
- package/dist/src/types/index.d.ts +0 -6
- package/dist/src/types/manifest.d.ts +0 -29
- package/dist/src/types/plugins/ContainerPlugin.d.ts +0 -32
- package/dist/src/types/plugins/ContainerReferencePlugin.d.ts +0 -15
- package/dist/src/types/plugins/ModuleFederationPlugin.d.ts +0 -425
- package/dist/src/types/plugins/SharePlugin.d.ts +0 -21
- package/dist/src/types/plugins/index.d.ts +0 -4
- package/dist/src/types/snapshot.d.ts +0 -77
- package/dist/src/types/stats.d.ts +0 -97
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let node_path = require("node:path");
|
|
3
|
+
|
|
4
|
+
//#region src/normalize-webpack-path.ts
|
|
5
|
+
function getWebpackPath(compiler, options = { framework: "other" }) {
|
|
6
|
+
const resolveWithContext = new Function("id", "options", "return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)");
|
|
7
|
+
try {
|
|
8
|
+
compiler.webpack();
|
|
9
|
+
return "";
|
|
10
|
+
} catch (err) {
|
|
11
|
+
const webpackPath = ((err.stack?.split("\n") || []).find((item) => item.includes("at webpack")) || "").replace(/[^\(\)]+/, "").slice(1, -1).split(":").slice(0, -2).join(":");
|
|
12
|
+
if (options?.framework === "nextjs") {
|
|
13
|
+
if (webpackPath.endsWith("webpack.js")) return webpackPath.replace("webpack.js", "index.js");
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
return resolveWithContext("webpack", { paths: [webpackPath] });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const normalizeWebpackPath = (fullPath) => {
|
|
20
|
+
if (fullPath === "webpack") return process.env["FEDERATION_WEBPACK_PATH"] || fullPath;
|
|
21
|
+
if (process.env["FEDERATION_WEBPACK_PATH"]) return (0, node_path.resolve)(process.env["FEDERATION_WEBPACK_PATH"], fullPath.replace("webpack", "../../"));
|
|
22
|
+
return fullPath;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.getWebpackPath = getWebpackPath;
|
|
27
|
+
exports.normalizeWebpackPath = normalizeWebpackPath;
|
|
28
|
+
//# sourceMappingURL=normalize-webpack-path.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-webpack-path.cjs","names":[],"sources":["../src/normalize-webpack-path.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { resolve } from 'node:path';\n\nexport function getWebpackPath(\n compiler: webpack.Compiler,\n options: { framework: 'nextjs' | 'other' } = { framework: 'other' },\n): string {\n const resolveWithContext = new Function(\n 'id',\n 'options',\n 'return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)',\n ) as (id: string, options?: { paths?: string[] }) => string;\n\n try {\n // @ts-ignore just throw err\n compiler.webpack();\n return '';\n } catch (err) {\n const trace = (err as Error).stack?.split('\\n') || [];\n const webpackErrLocation =\n trace.find((item) => item.includes('at webpack')) || '';\n const webpackLocationWithDetail = webpackErrLocation\n .replace(/[^\\(\\)]+/, '')\n .slice(1, -1);\n const webpackPath = webpackLocationWithDetail\n .split(':')\n .slice(0, -2)\n .join(':');\n if (options?.framework === 'nextjs') {\n if (webpackPath.endsWith('webpack.js')) {\n return webpackPath.replace('webpack.js', 'index.js');\n }\n return '';\n }\n return resolveWithContext('webpack', { paths: [webpackPath] });\n }\n}\n\nexport const normalizeWebpackPath = (fullPath: string): string => {\n if (fullPath === 'webpack') {\n return process.env['FEDERATION_WEBPACK_PATH'] || fullPath;\n }\n\n if (process.env['FEDERATION_WEBPACK_PATH']) {\n return resolve(\n process.env['FEDERATION_WEBPACK_PATH'],\n fullPath.replace('webpack', '../../'),\n );\n }\n\n return fullPath;\n};\n"],"mappings":";;;;AAGA,SAAgB,eACd,UACA,UAA6C,EAAE,WAAW,SAAS,EAC3D;CACR,MAAM,qBAAqB,IAAI,SAC7B,MACA,WACA,gFACD;AAED,KAAI;AAEF,WAAS,SAAS;AAClB,SAAO;UACA,KAAK;EAOZ,MAAM,gBANS,IAAc,OAAO,MAAM,KAAK,IAAI,EAAE,EAE7C,MAAM,SAAS,KAAK,SAAS,aAAa,CAAC,IAAI,IAEpD,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,CAEZ,MAAM,IAAI,CACV,MAAM,GAAG,GAAG,CACZ,KAAK,IAAI;AACZ,MAAI,SAAS,cAAc,UAAU;AACnC,OAAI,YAAY,SAAS,aAAa,CACpC,QAAO,YAAY,QAAQ,cAAc,WAAW;AAEtD,UAAO;;AAET,SAAO,mBAAmB,WAAW,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;;;AAIlE,MAAa,wBAAwB,aAA6B;AAChE,KAAI,aAAa,UACf,QAAO,QAAQ,IAAI,8BAA8B;AAGnD,KAAI,QAAQ,IAAI,2BACd,+BACE,QAAQ,IAAI,4BACZ,SAAS,QAAQ,WAAW,SAAS,CACtC;AAGH,QAAO"}
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import webpack from "webpack";
|
|
2
|
+
|
|
3
|
+
//#region src/normalize-webpack-path.d.ts
|
|
4
|
+
declare function getWebpackPath(compiler: webpack.Compiler, options?: {
|
|
5
|
+
framework: 'nextjs' | 'other';
|
|
6
|
+
}): string;
|
|
7
|
+
declare const normalizeWebpackPath: (fullPath: string) => string;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { getWebpackPath, normalizeWebpackPath };
|
|
10
|
+
//# sourceMappingURL=normalize-webpack-path.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
|
|
3
|
+
//#region src/normalize-webpack-path.ts
|
|
4
|
+
function getWebpackPath(compiler, options = { framework: "other" }) {
|
|
5
|
+
const resolveWithContext = new Function("id", "options", "return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)");
|
|
6
|
+
try {
|
|
7
|
+
compiler.webpack();
|
|
8
|
+
return "";
|
|
9
|
+
} catch (err) {
|
|
10
|
+
const webpackPath = ((err.stack?.split("\n") || []).find((item) => item.includes("at webpack")) || "").replace(/[^\(\)]+/, "").slice(1, -1).split(":").slice(0, -2).join(":");
|
|
11
|
+
if (options?.framework === "nextjs") {
|
|
12
|
+
if (webpackPath.endsWith("webpack.js")) return webpackPath.replace("webpack.js", "index.js");
|
|
13
|
+
return "";
|
|
14
|
+
}
|
|
15
|
+
return resolveWithContext("webpack", { paths: [webpackPath] });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const normalizeWebpackPath = (fullPath) => {
|
|
19
|
+
if (fullPath === "webpack") return process.env["FEDERATION_WEBPACK_PATH"] || fullPath;
|
|
20
|
+
if (process.env["FEDERATION_WEBPACK_PATH"]) return resolve(process.env["FEDERATION_WEBPACK_PATH"], fullPath.replace("webpack", "../../"));
|
|
21
|
+
return fullPath;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { getWebpackPath, normalizeWebpackPath };
|
|
26
|
+
//# sourceMappingURL=normalize-webpack-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-webpack-path.js","names":[],"sources":["../src/normalize-webpack-path.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { resolve } from 'node:path';\n\nexport function getWebpackPath(\n compiler: webpack.Compiler,\n options: { framework: 'nextjs' | 'other' } = { framework: 'other' },\n): string {\n const resolveWithContext = new Function(\n 'id',\n 'options',\n 'return typeof require === \"undefined\" ? \"\" : require.resolve(id, options)',\n ) as (id: string, options?: { paths?: string[] }) => string;\n\n try {\n // @ts-ignore just throw err\n compiler.webpack();\n return '';\n } catch (err) {\n const trace = (err as Error).stack?.split('\\n') || [];\n const webpackErrLocation =\n trace.find((item) => item.includes('at webpack')) || '';\n const webpackLocationWithDetail = webpackErrLocation\n .replace(/[^\\(\\)]+/, '')\n .slice(1, -1);\n const webpackPath = webpackLocationWithDetail\n .split(':')\n .slice(0, -2)\n .join(':');\n if (options?.framework === 'nextjs') {\n if (webpackPath.endsWith('webpack.js')) {\n return webpackPath.replace('webpack.js', 'index.js');\n }\n return '';\n }\n return resolveWithContext('webpack', { paths: [webpackPath] });\n }\n}\n\nexport const normalizeWebpackPath = (fullPath: string): string => {\n if (fullPath === 'webpack') {\n return process.env['FEDERATION_WEBPACK_PATH'] || fullPath;\n }\n\n if (process.env['FEDERATION_WEBPACK_PATH']) {\n return resolve(\n process.env['FEDERATION_WEBPACK_PATH'],\n fullPath.replace('webpack', '../../'),\n );\n }\n\n return fullPath;\n};\n"],"mappings":";;;AAGA,SAAgB,eACd,UACA,UAA6C,EAAE,WAAW,SAAS,EAC3D;CACR,MAAM,qBAAqB,IAAI,SAC7B,MACA,WACA,gFACD;AAED,KAAI;AAEF,WAAS,SAAS;AAClB,SAAO;UACA,KAAK;EAOZ,MAAM,gBANS,IAAc,OAAO,MAAM,KAAK,IAAI,EAAE,EAE7C,MAAM,SAAS,KAAK,SAAS,aAAa,CAAC,IAAI,IAEpD,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,CAEZ,MAAM,IAAI,CACV,MAAM,GAAG,GAAG,CACZ,KAAK,IAAI;AACZ,MAAI,SAAS,cAAc,UAAU;AACnC,OAAI,YAAY,SAAS,aAAa,CACpC,QAAO,YAAY,QAAQ,cAAc,WAAW;AAEtD,UAAO;;AAET,SAAO,mBAAmB,WAAW,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;;;AAIlE,MAAa,wBAAwB,aAA6B;AAChE,KAAI,aAAa,UACf,QAAO,QAAQ,IAAI,8BAA8B;AAGnD,KAAI,QAAQ,IAAI,2BACd,QAAO,QACL,QAAQ,IAAI,4BACZ,SAAS,QAAQ,WAAW,SAAS,CACtC;AAGH,QAAO"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/normalizeOptions.ts
|
|
3
|
+
function normalizeOptions(enableDefault, defaultOptions, key) {
|
|
4
|
+
return function(options) {
|
|
5
|
+
if (options === false) return false;
|
|
6
|
+
if (typeof options === "undefined") if (enableDefault) return defaultOptions;
|
|
7
|
+
else return false;
|
|
8
|
+
if (options === true) return defaultOptions;
|
|
9
|
+
if (options && typeof options === "object") return {
|
|
10
|
+
...defaultOptions,
|
|
11
|
+
...options
|
|
12
|
+
};
|
|
13
|
+
throw new Error(`Unexpected type for \`${key}\`, expect boolean/undefined/object, got: ${typeof options}`);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.normalizeOptions = normalizeOptions;
|
|
19
|
+
//# sourceMappingURL=normalizeOptions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeOptions.cjs","names":[],"sources":["../src/normalizeOptions.ts"],"sourcesContent":["export function normalizeOptions<T>(\n enableDefault: boolean,\n defaultOptions: T,\n key: string,\n) {\n return function <U extends boolean | undefined | T>(options: U): T | false {\n if (options === false) {\n return false;\n }\n\n if (typeof options === 'undefined') {\n if (enableDefault) {\n return defaultOptions;\n } else {\n return false;\n }\n }\n\n if (options === true) {\n return defaultOptions;\n }\n\n if (options && typeof options === 'object') {\n return {\n ...(defaultOptions as T),\n ...options,\n };\n }\n\n throw new Error(\n `Unexpected type for \\`${key}\\`, expect boolean/undefined/object, got: ${typeof options}`,\n );\n };\n}\n"],"mappings":";;AAAA,SAAgB,iBACd,eACA,gBACA,KACA;AACA,QAAO,SAA6C,SAAuB;AACzE,MAAI,YAAY,MACd,QAAO;AAGT,MAAI,OAAO,YAAY,YACrB,KAAI,cACF,QAAO;MAEP,QAAO;AAIX,MAAI,YAAY,KACd,QAAO;AAGT,MAAI,WAAW,OAAO,YAAY,SAChC,QAAO;GACL,GAAI;GACJ,GAAG;GACJ;AAGH,QAAM,IAAI,MACR,yBAAyB,IAAI,4CAA4C,OAAO,UACjF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/normalizeOptions.d.ts
|
|
2
|
+
declare function normalizeOptions<T>(enableDefault: boolean, defaultOptions: T, key: string): <U extends boolean | undefined | T>(options: U) => T | false;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { normalizeOptions };
|
|
5
|
+
//# sourceMappingURL=normalizeOptions.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/normalizeOptions.ts
|
|
2
|
+
function normalizeOptions(enableDefault, defaultOptions, key) {
|
|
3
|
+
return function(options) {
|
|
4
|
+
if (options === false) return false;
|
|
5
|
+
if (typeof options === "undefined") if (enableDefault) return defaultOptions;
|
|
6
|
+
else return false;
|
|
7
|
+
if (options === true) return defaultOptions;
|
|
8
|
+
if (options && typeof options === "object") return {
|
|
9
|
+
...defaultOptions,
|
|
10
|
+
...options
|
|
11
|
+
};
|
|
12
|
+
throw new Error(`Unexpected type for \`${key}\`, expect boolean/undefined/object, got: ${typeof options}`);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { normalizeOptions };
|
|
18
|
+
//# sourceMappingURL=normalizeOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeOptions.js","names":[],"sources":["../src/normalizeOptions.ts"],"sourcesContent":["export function normalizeOptions<T>(\n enableDefault: boolean,\n defaultOptions: T,\n key: string,\n) {\n return function <U extends boolean | undefined | T>(options: U): T | false {\n if (options === false) {\n return false;\n }\n\n if (typeof options === 'undefined') {\n if (enableDefault) {\n return defaultOptions;\n } else {\n return false;\n }\n }\n\n if (options === true) {\n return defaultOptions;\n }\n\n if (options && typeof options === 'object') {\n return {\n ...(defaultOptions as T),\n ...options,\n };\n }\n\n throw new Error(\n `Unexpected type for \\`${key}\\`, expect boolean/undefined/object, got: ${typeof options}`,\n );\n };\n}\n"],"mappings":";AAAA,SAAgB,iBACd,eACA,gBACA,KACA;AACA,QAAO,SAA6C,SAAuB;AACzE,MAAI,YAAY,MACd,QAAO;AAGT,MAAI,OAAO,YAAY,YACrB,KAAI,cACF,QAAO;MAEP,QAAO;AAIX,MAAI,YAAY,KACd,QAAO;AAGT,MAAI,WAAW,OAAO,YAAY,SAChC,QAAO;GACL,GAAI;GACJ,GAAG;GACJ;AAGH,QAAM,IAAI,MACR,yBAAyB,IAAI,4CAA4C,OAAO,UACjF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/types/common.d.ts
|
|
2
|
+
interface RemoteWithEntry {
|
|
3
|
+
name: string;
|
|
4
|
+
entry: string;
|
|
5
|
+
}
|
|
6
|
+
interface RemoteWithVersion {
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
}
|
|
10
|
+
type RemoteEntryInfo = RemoteWithEntry | RemoteWithVersion;
|
|
11
|
+
type Module = any;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Module, RemoteEntryInfo, RemoteWithEntry, RemoteWithVersion };
|
|
14
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/types/hooks.d.ts
|
|
2
|
+
type CreateScriptHookReturnNode = {
|
|
3
|
+
url: string;
|
|
4
|
+
} | void;
|
|
5
|
+
type CreateScriptHookReturnDom = HTMLScriptElement | {
|
|
6
|
+
script?: HTMLScriptElement;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
} | void;
|
|
9
|
+
type CreateScriptHookReturn = CreateScriptHookReturnNode | CreateScriptHookReturnDom;
|
|
10
|
+
type CreateScriptHookNode = (url: string, attrs?: Record<string, any> | undefined) => CreateScriptHookReturnNode;
|
|
11
|
+
type CreateScriptHookDom = (url: string, attrs?: Record<string, any> | undefined) => CreateScriptHookReturnDom;
|
|
12
|
+
type CreateScriptHook = (url: string, attrs?: Record<string, any> | undefined) => CreateScriptHookReturn;
|
|
13
|
+
type FetchHook = (args: [string, RequestInit]) => Promise<Response> | void | false;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { CreateScriptHook, CreateScriptHookDom, CreateScriptHookNode, CreateScriptHookReturn, CreateScriptHookReturnDom, CreateScriptHookReturnNode, FetchHook };
|
|
16
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Module, RemoteEntryInfo, RemoteWithEntry, RemoteWithVersion } from "./common.js";
|
|
2
|
+
import { BasicStatsMetaData, ManifestModuleInfos, MetaDataTypes, RemoteEntryType, ResourceInfo, Stats, StatsAssets, StatsBuildInfo, StatsExpose, StatsMetaData, StatsMetaDataWithGetPublicPath, StatsMetaDataWithPublicPath, StatsModuleInfo, StatsRemote, StatsRemoteVal, StatsRemoteWithEntry, StatsRemoteWithVersion, StatsShared } from "./stats.js";
|
|
3
|
+
import { Manifest, ManifestExpose, ManifestRemote, ManifestRemoteCommonInfo, ManifestShared } from "./manifest.js";
|
|
4
|
+
import { BasicProviderModuleInfo, ConsumerModuleInfo, ConsumerModuleInfoWithPublicPath, GlobalModuleInfo, ManifestProvider, ModuleInfo, ProviderModuleInfo, PureConsumerModuleInfo, PureEntryProvider } from "./snapshot.js";
|
|
5
|
+
import { ModuleFederationPlugin_d_exports } from "./plugins/ModuleFederationPlugin.js";
|
|
6
|
+
import { ContainerPlugin_d_exports } from "./plugins/ContainerPlugin.js";
|
|
7
|
+
import { ContainerReferencePlugin_d_exports } from "./plugins/ContainerReferencePlugin.js";
|
|
8
|
+
import { SharePlugin_d_exports } from "./plugins/SharePlugin.js";
|
|
9
|
+
import "./plugins/index.js";
|
|
10
|
+
import { CreateScriptHook, CreateScriptHookDom, CreateScriptHookNode, CreateScriptHookReturn, CreateScriptHookReturnDom, CreateScriptHookReturnNode, FetchHook } from "./hooks.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RemoteWithEntry, RemoteWithVersion } from "./common.js";
|
|
2
|
+
import { BasicStatsMetaData, RemoteEntryType, StatsAssets, StatsExpose, StatsMetaData } from "./stats.js";
|
|
3
|
+
|
|
4
|
+
//#region src/types/manifest.d.ts
|
|
5
|
+
interface ManifestShared {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
singleton: boolean;
|
|
10
|
+
requiredVersion: string;
|
|
11
|
+
hash: string;
|
|
12
|
+
assets: StatsAssets;
|
|
13
|
+
fallback?: string;
|
|
14
|
+
fallbackName?: string;
|
|
15
|
+
fallbackType?: RemoteEntryType;
|
|
16
|
+
}
|
|
17
|
+
interface ManifestRemoteCommonInfo {
|
|
18
|
+
federationContainerName: string;
|
|
19
|
+
moduleName: string;
|
|
20
|
+
alias: string;
|
|
21
|
+
}
|
|
22
|
+
type ManifestRemote<T = ManifestRemoteCommonInfo> = (Omit<RemoteWithEntry, 'name'> & T) | (Omit<RemoteWithVersion, 'name'> & T);
|
|
23
|
+
type ManifestExpose = Pick<StatsExpose, 'assets' | 'id' | 'name' | 'path'>;
|
|
24
|
+
interface Manifest<T = BasicStatsMetaData, K = ManifestRemoteCommonInfo> {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
metaData: StatsMetaData<T>;
|
|
28
|
+
shared: ManifestShared[];
|
|
29
|
+
remotes: ManifestRemote<K>[];
|
|
30
|
+
exposes: ManifestExpose[];
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Manifest, ManifestExpose, ManifestRemote, ManifestRemoteCommonInfo, ManifestShared };
|
|
34
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugins/ContainerPlugin.ts
|
|
4
|
+
var ContainerPlugin_exports = /* @__PURE__ */ require_runtime.__exportAll({});
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
Object.defineProperty(exports, 'ContainerPlugin_exports', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return ContainerPlugin_exports;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=ContainerPlugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerPlugin.cjs","names":[],"sources":["../../../src/types/plugins/ContainerPlugin.ts"],"sourcesContent":["import {\n DataPrefetch,\n EntryRuntime,\n Exposes,\n LibraryOptions,\n} from './ModuleFederationPlugin';\n\nexport interface ContainerPluginOptions {\n /**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\n exposes: Exposes;\n /**\n * The filename for this container relative path inside the `output.path` directory.\n */\n filename?: string;\n /**\n * Options for library.\n */\n library?: LibraryOptions;\n /**\n * The name for this container.\n */\n name: string;\n /**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\n runtime?: EntryRuntime;\n /**\n * The name of the share scope which is shared with the host (defaults to 'default').\n */\n shareScope?: string | string[];\n /**\n * Runtime plugin file paths or package name. Supports tuple [path, params].\n */\n runtimePlugins?: (string | [string, Record<string, unknown>])[];\n\n dataPrefetch?: DataPrefetch;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DataPrefetch, EntryRuntime, Exposes, LibraryOptions } from "./ModuleFederationPlugin.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugins/ContainerPlugin.d.ts
|
|
4
|
+
declare namespace ContainerPlugin_d_exports {
|
|
5
|
+
export { ContainerPluginOptions };
|
|
6
|
+
}
|
|
7
|
+
interface ContainerPluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
|
|
10
|
+
*/
|
|
11
|
+
exposes: Exposes;
|
|
12
|
+
/**
|
|
13
|
+
* The filename for this container relative path inside the `output.path` directory.
|
|
14
|
+
*/
|
|
15
|
+
filename?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Options for library.
|
|
18
|
+
*/
|
|
19
|
+
library?: LibraryOptions;
|
|
20
|
+
/**
|
|
21
|
+
* The name for this container.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
|
|
26
|
+
*/
|
|
27
|
+
runtime?: EntryRuntime;
|
|
28
|
+
/**
|
|
29
|
+
* The name of the share scope which is shared with the host (defaults to 'default').
|
|
30
|
+
*/
|
|
31
|
+
shareScope?: string | string[];
|
|
32
|
+
/**
|
|
33
|
+
* Runtime plugin file paths or package name. Supports tuple [path, params].
|
|
34
|
+
*/
|
|
35
|
+
runtimePlugins?: (string | [string, Record<string, unknown>])[];
|
|
36
|
+
dataPrefetch?: DataPrefetch;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { ContainerPlugin_d_exports };
|
|
40
|
+
//# sourceMappingURL=ContainerPlugin.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugins/ContainerPlugin.ts
|
|
4
|
+
var ContainerPlugin_exports = /* @__PURE__ */ __exportAll({});
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ContainerPlugin_exports };
|
|
8
|
+
//# sourceMappingURL=ContainerPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerPlugin.js","names":[],"sources":["../../../src/types/plugins/ContainerPlugin.ts"],"sourcesContent":["import {\n DataPrefetch,\n EntryRuntime,\n Exposes,\n LibraryOptions,\n} from './ModuleFederationPlugin';\n\nexport interface ContainerPluginOptions {\n /**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\n exposes: Exposes;\n /**\n * The filename for this container relative path inside the `output.path` directory.\n */\n filename?: string;\n /**\n * Options for library.\n */\n library?: LibraryOptions;\n /**\n * The name for this container.\n */\n name: string;\n /**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\n runtime?: EntryRuntime;\n /**\n * The name of the share scope which is shared with the host (defaults to 'default').\n */\n shareScope?: string | string[];\n /**\n * Runtime plugin file paths or package name. Supports tuple [path, params].\n */\n runtimePlugins?: (string | [string, Record<string, unknown>])[];\n\n dataPrefetch?: DataPrefetch;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugins/ContainerReferencePlugin.ts
|
|
4
|
+
var ContainerReferencePlugin_exports = /* @__PURE__ */ require_runtime.__exportAll({});
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
Object.defineProperty(exports, 'ContainerReferencePlugin_exports', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return ContainerReferencePlugin_exports;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=ContainerReferencePlugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerReferencePlugin.cjs","names":[],"sources":["../../../src/types/plugins/ContainerReferencePlugin.ts"],"sourcesContent":["import type { ExternalsType, Remotes } from './ModuleFederationPlugin';\n\nexport interface ContainerReferencePluginOptions {\n /**\n * The external type of the remote containers.\n */\n remoteType: ExternalsType;\n /**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\n remotes: Remotes;\n /**\n * The name of the share scope shared with all remotes (defaults to 'default').\n */\n shareScope?: string | string[];\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ExternalsType, Remotes } from "./ModuleFederationPlugin.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugins/ContainerReferencePlugin.d.ts
|
|
4
|
+
declare namespace ContainerReferencePlugin_d_exports {
|
|
5
|
+
export { ContainerReferencePluginOptions };
|
|
6
|
+
}
|
|
7
|
+
interface ContainerReferencePluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The external type of the remote containers.
|
|
10
|
+
*/
|
|
11
|
+
remoteType: ExternalsType;
|
|
12
|
+
/**
|
|
13
|
+
* Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
|
|
14
|
+
*/
|
|
15
|
+
remotes: Remotes;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the share scope shared with all remotes (defaults to 'default').
|
|
18
|
+
*/
|
|
19
|
+
shareScope?: string | string[];
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ContainerReferencePlugin_d_exports };
|
|
23
|
+
//# sourceMappingURL=ContainerReferencePlugin.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugins/ContainerReferencePlugin.ts
|
|
4
|
+
var ContainerReferencePlugin_exports = /* @__PURE__ */ __exportAll({});
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ContainerReferencePlugin_exports };
|
|
8
|
+
//# sourceMappingURL=ContainerReferencePlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerReferencePlugin.js","names":[],"sources":["../../../src/types/plugins/ContainerReferencePlugin.ts"],"sourcesContent":["import type { ExternalsType, Remotes } from './ModuleFederationPlugin';\n\nexport interface ContainerReferencePluginOptions {\n /**\n * The external type of the remote containers.\n */\n remoteType: ExternalsType;\n /**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\n remotes: Remotes;\n /**\n * The name of the share scope shared with all remotes (defaults to 'default').\n */\n shareScope?: string | string[];\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/types/plugins/ModuleFederationPlugin.ts
|
|
4
|
+
var ModuleFederationPlugin_exports = /* @__PURE__ */ require_runtime.__exportAll({});
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
Object.defineProperty(exports, 'ModuleFederationPlugin_exports', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return ModuleFederationPlugin_exports;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=ModuleFederationPlugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModuleFederationPlugin.cjs","names":[],"sources":["../../../src/types/plugins/ModuleFederationPlugin.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { Stats } from '../stats';\n/**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\nexport type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;\n/**\n * Module that should be exposed by this container.\n */\nexport type ExposesItem = string;\n/**\n * Modules that should be exposed by this container.\n */\nexport type ExposesItems = ExposesItem[];\n/**\n * Add a container for define/require functions in the AMD module.\n */\nexport type AmdContainer = string;\n/**\n * Add a comment in the UMD wrapper.\n */\nexport type AuxiliaryComment = string | LibraryCustomUmdCommentObject;\n/**\n * Specify which export should be exposed as library.\n */\nexport type LibraryExport = string[] | string;\n/**\n * The name of the library (some types allow unnamed libraries too).\n */\nexport type LibraryName = string[] | string | LibraryCustomUmdObject;\n/**\n * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\n */\nexport type LibraryType =\n | (\n | 'var'\n | 'module'\n | 'assign'\n | 'assign-properties'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n )\n | string;\n/**\n * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\n */\nexport type UmdNamedDefine = boolean;\n/**\n * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\n */\nexport type ExternalsType =\n | 'var'\n | 'module'\n | 'assign'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n | 'promise'\n | 'import'\n | 'script'\n | 'module-import'\n | 'node-commonjs';\n/**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\nexport type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;\n/**\n * Container location from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItem = string;\n/**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItems = RemotesItem[];\n/**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\nexport type EntryRuntime = false | string;\n/**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\nexport type Shared = (SharedItem | SharedObject)[] | SharedObject;\n/**\n * A module that should be shared in the share scope.\n */\nexport type SharedItem = string;\n/**\n * Enable Data Prefetch\n */\nexport type DataPrefetch = boolean;\n\nexport interface AdditionalDataOptions {\n stats: Stats;\n compiler: webpack.Compiler;\n compilation: webpack.Compilation;\n bundler: 'webpack' | 'rspack';\n}\nexport interface PluginManifestOptions {\n filePath?: string;\n disableAssetsAnalyze?: boolean;\n fileName?: string;\n additionalData?: (\n options: AdditionalDataOptions,\n ) => Promise<void | Stats> | Stats | void;\n}\n\nexport interface PluginDevOptions {\n disableLiveReload?: boolean;\n disableHotTypesReload?: boolean;\n disableDynamicRemoteTypeHints?: boolean;\n}\n\ninterface RemoteTypeUrl {\n alias?: string;\n api: string;\n zip: string;\n}\n\nexport interface RemoteTypeUrls {\n [remoteName: string]: RemoteTypeUrl;\n}\n\nexport interface DtsHostOptions {\n typesFolder?: string;\n abortOnError?: boolean;\n remoteTypesFolder?: string;\n deleteTypesFolder?: boolean;\n maxRetries?: number;\n consumeAPITypes?: boolean;\n runtimePkgs?: string[];\n remoteTypeUrls?: (() => Promise<RemoteTypeUrls>) | RemoteTypeUrls;\n timeout?: number;\n /** The family of IP, used for network requests */\n family?: 4 | 6;\n typesOnBuild?: boolean;\n}\n\nexport interface DtsRemoteOptions {\n tsConfigPath?: string;\n typesFolder?: string;\n compiledTypesFolder?: string;\n deleteTypesFolder?: boolean;\n additionalFilesToCompile?: string[];\n compileInChildProcess?: boolean;\n compilerInstance?: 'tsc' | 'vue-tsc' | 'tspc' | string;\n generateAPITypes?: boolean;\n extractThirdParty?:\n | boolean\n | {\n exclude?: Array<string | RegExp>;\n };\n extractRemoteTypes?: boolean;\n abortOnError?: boolean;\n deleteTsConfig?: boolean;\n}\n\nexport interface PluginDtsOptions {\n generateTypes?: boolean | DtsRemoteOptions;\n consumeTypes?: boolean | DtsHostOptions;\n tsConfigPath?: string;\n extraOptions?: Record<string, any>;\n implementation?: string;\n cwd?: string;\n displayErrorInTerminal?: boolean;\n}\n\nexport type AsyncBoundaryOptions = {\n eager?: RegExp | ((module: any) => boolean);\n excludeChunk?: (chunk: any) => boolean;\n};\n\nexport interface ModuleFederationPluginOptions {\n /**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\n exposes?: Exposes;\n /**\n * The filename of the container as relative path inside the `output.path` directory.\n */\n filename?: string;\n /**\n * Options for library.\n */\n library?: LibraryOptions;\n /**\n * The name of the container.\n */\n name?: string;\n /**\n * The external type of the remote containers.\n */\n remoteType?: ExternalsType;\n /**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\n remotes?: Remotes;\n /**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\n runtime?: EntryRuntime;\n /**\n * Share scope name used for all shared modules (defaults to 'default').\n */\n shareScope?: string | string[];\n /**\n * load shared strategy(defaults to 'version-first').\n */\n shareStrategy?: SharedStrategy;\n /**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\n shared?: Shared;\n /**\n * Runtime plugin file paths or package name. Supports tuple [path, params].\n */\n runtimePlugins?: (string | [string, Record<string, unknown>])[];\n /**\n * Custom public path function\n */\n getPublicPath?: string;\n /**\n * Bundler runtime path\n */\n implementation?: string;\n\n manifest?: boolean | PluginManifestOptions;\n dev?: boolean | PluginDevOptions;\n dts?: boolean | PluginDtsOptions;\n dataPrefetch?: DataPrefetch;\n virtualRuntimeEntry?: boolean;\n experiments?: {\n externalRuntime?: boolean;\n provideExternalRuntime?: boolean;\n asyncStartup?: boolean;\n /**\n * Options related to build optimizations.\n */\n optimization?: {\n /**\n * Enable optimization to skip snapshot plugin\n */\n disableSnapshot?: boolean;\n /**\n * Target environment for the build\n */\n target?: 'web' | 'node';\n };\n };\n bridge?: {\n /**\n * Enables bridge router functionality for React applications.\n * When enabled, automatically handles routing context and basename injection\n * for micro-frontend applications using react-router-dom.\n *\n * @default false\n */\n enableBridgeRouter?: boolean;\n /**\n * @deprecated Use `enableBridgeRouter: false` instead.\n *\n * Disables the default alias setting in the bridge.\n * When true, users must manually handle basename through root component props.\n *\n * Migration:\n * - `disableAlias: true` → `enableBridgeRouter: false`\n * - `disableAlias: false` → `enableBridgeRouter: true`\n *\n * @default false\n */\n disableAlias?: boolean;\n };\n /**\n * Configuration for async boundary plugin\n */\n async?: boolean | AsyncBoundaryOptions;\n\n /**\n * The directory to output the tree shaking shared fallback resources.\n */\n treeShakingDir?: string;\n\n /**\n * Whether to inject shared used exports into bundler runtime.\n */\n injectTreeShakingUsedExports?: boolean;\n treeShakingSharedExcludePlugins?: string[];\n treeShakingSharedPlugins?: string[];\n}\n/**\n * Modules that should be exposed by this container. Property names are used as public paths.\n */\nexport interface ExposesObject {\n /**\n * Modules that should be exposed by this container.\n */\n [k: string]: ExposesConfig | ExposesItem | ExposesItems;\n}\n/**\n * Advanced configuration for modules that should be exposed by this container.\n */\nexport interface ExposesConfig {\n /**\n * Request to a module that should be exposed by this container.\n */\n import: ExposesItem | ExposesItems;\n /**\n * Custom chunk name for the exposed module.\n */\n name?: string;\n}\n/**\n * Options for library.\n */\nexport interface LibraryOptions {\n /**\n * Add a container for define/require functions in the AMD module.\n */\n amdContainer?: AmdContainer;\n /**\n * Add a comment in the UMD wrapper.\n */\n auxiliaryComment?: AuxiliaryComment;\n /**\n * Specify which export should be exposed as library.\n */\n export?: LibraryExport;\n /**\n * The name of the library (some types allow unnamed libraries too).\n */\n name?: LibraryName;\n /**\n * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\n */\n type: LibraryType;\n /**\n * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\n */\n umdNamedDefine?: UmdNamedDefine;\n}\n/**\n * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\n */\nexport interface LibraryCustomUmdCommentObject {\n /**\n * Set comment for `amd` section in UMD.\n */\n amd?: string;\n /**\n * Set comment for `commonjs` (exports) section in UMD.\n */\n commonjs?: string;\n /**\n * Set comment for `commonjs2` (module.exports) section in UMD.\n */\n commonjs2?: string;\n /**\n * Set comment for `root` (global variable) section in UMD.\n */\n root?: string;\n}\n/**\n * Description object for all UMD variants of the library name.\n */\nexport interface LibraryCustomUmdObject {\n /**\n * Name of the exposed AMD library in the UMD.\n */\n amd?: string;\n /**\n * Name of the exposed commonjs export in the UMD.\n */\n commonjs?: string;\n /**\n * Name of the property exposed globally by a UMD library.\n */\n root?: string[] | string;\n}\n/**\n * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.\n */\nexport interface RemotesObject {\n /**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\n [k: string]: RemotesConfig | RemotesItem | RemotesItems;\n}\n/**\n * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.\n */\nexport interface RemotesConfig {\n /**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\n external: RemotesItem | RemotesItems;\n /**\n * The name of the share scope shared with this remote.\n */\n shareScope?: string | string[];\n}\n/**\n * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.\n */\nexport interface SharedObject {\n /**\n * Modules that should be shared in the share scope.\n */\n [k: string]: SharedConfig | SharedItem;\n}\n\nexport type SharedStrategy = 'version-first' | 'loaded-first';\n\nexport type TreeShakingConfig = {\n usedExports?: string[];\n mode?: 'server-calc' | 'runtime-infer';\n filename?: string;\n};\n\n/**\n * Advanced configuration for modules that should be shared in the share scope.\n */\nexport interface SharedConfig {\n /**\n * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.\n */\n eager?: boolean;\n /**\n * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.\n */\n import?: false | SharedItem;\n /**\n * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.\n */\n packageName?: string;\n /**\n * Version requirement from module in share scope.\n */\n requiredVersion?: false | string;\n /**\n * Module is looked up under this key from the share scope.\n */\n shareKey?: string;\n /**\n * Share scope name.\n */\n shareScope?: string | string[];\n /**\n * load shared strategy(defaults to 'version-first').\n */\n shareStrategy?: SharedStrategy;\n /**\n * Allow only a single version of the shared module in share scope (disabled by default).\n */\n singleton?: boolean;\n /**\n * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n */\n strictVersion?: boolean;\n /**\n * Version of the provided module. Will replace lower matching versions, but not higher.\n */\n version?: false | string;\n treeShaking?: TreeShakingConfig;\n}\n"],"mappings":""}
|