@module-federation/vite 1.0.0-alpha-661e052 → 1.0.0-alpha-2f53b4e
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 +131 -44
- package/lib/index.esm.js +131 -45
- package/lib/index.modern.js +129 -55
- package/lib/index.umd.js +131 -44
- package/lib/utils/VirtualModule.d.ts +4 -2
- package/lib/utils/localSharedImportMap_windows.d.ts +2 -0
- package/lib/utils/packageNameUtils.d.ts +1 -0
- package/lib/virtualModules/index.d.ts +4 -0
- package/lib/virtualModules/virtualRemoteEntry.d.ts +6 -4
- package/lib/virtualModules/virtualRemotes.d.ts +1 -0
- package/lib/virtualModules/virtualShared_preBuild.d.ts +1 -1
- package/package.json +5 -4
|
@@ -4,9 +4,11 @@ export declare const virtualPackageName = "__mf__virtual";
|
|
|
4
4
|
*/
|
|
5
5
|
export default class VirtualModule {
|
|
6
6
|
originName: string;
|
|
7
|
-
|
|
7
|
+
inited: boolean;
|
|
8
|
+
ext: string;
|
|
9
|
+
constructor(name: string, ext?: string);
|
|
8
10
|
getPath(): string;
|
|
9
11
|
getImportId(): string;
|
|
10
|
-
writeSync(code: string): void;
|
|
12
|
+
writeSync(code: string, force?: boolean): void;
|
|
11
13
|
write(code: string): void;
|
|
12
14
|
}
|
|
@@ -15,3 +15,4 @@ export declare function packageNameEncode(name: string): string;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function packageNameDecode(global: string): string;
|
|
17
17
|
export declare function removePathFromNpmPackage(packageString: string): string;
|
|
18
|
+
export declare function getExtFromNpmPackage(packageString: string): string | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { generateRemoteEntry, getHostAutoInitImportId, getHostAutoInitPath, getWrapRemoteEntryImportId, getWrapRemoteEntryPath, REMOTE_ENTRY_ID } from "./virtualRemoteEntry";
|
|
2
|
+
export { generateRemotes, remoteVirtualModule } from "./virtualRemotes";
|
|
3
|
+
export { addShare, generateLocalSharedImportMap, getLoadShareModulePath, getLocalSharedImportMapPath, getPreBuildLibImportId, LOAD_SHARE_TAG, localSharedImportMapModule, PREBUILD_TAG, writeLoadShareModule, writeLocalSharedImportMap, writePreBuildLibPath } from "./virtualShared_preBuild";
|
|
4
|
+
export declare function initVirtualModules(): void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { NormalizedModuleFederationOptions } from '../utils/normalizeModuleFederationOptions';
|
|
2
2
|
export declare const REMOTE_ENTRY_ID = "REMOTE_ENTRY_ID";
|
|
3
3
|
export declare function generateRemoteEntry(options: NormalizedModuleFederationOptions): string;
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
7
|
-
export declare
|
|
4
|
+
export declare function writeWrapRemoteEntry(): void;
|
|
5
|
+
export declare function getWrapRemoteEntryImportId(): string;
|
|
6
|
+
export declare function getWrapRemoteEntryPath(): string;
|
|
7
|
+
export declare function writeHostAutoInit(): void;
|
|
8
|
+
export declare function getHostAutoInitImportId(): string;
|
|
9
|
+
export declare function getHostAutoInitPath(): string;
|
|
@@ -15,7 +15,7 @@ export declare function writePreBuildLibPath(pkg: string): void;
|
|
|
15
15
|
export declare function getPreBuildLibImportId(pkg: string): string;
|
|
16
16
|
export declare function addShare(pkg: string): void;
|
|
17
17
|
export declare const localSharedImportMapModule: VirtualModule;
|
|
18
|
-
export declare function
|
|
18
|
+
export declare function getLocalSharedImportMapPath(): string;
|
|
19
19
|
export declare function writeLocalSharedImportMap(): Promise<void>;
|
|
20
20
|
export declare function generateLocalSharedImportMap(): Promise<string>;
|
|
21
21
|
export declare const LOAD_SHARE_TAG = "__loadShare__";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/vite",
|
|
3
|
-
"version": "1.0.0-alpha-
|
|
3
|
+
"version": "1.0.0-alpha-2f53b4e",
|
|
4
4
|
"description": "Vite plugin for Module Federation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"build": "rimraf lib && microbundle --no-sourcemap --compress=false",
|
|
17
17
|
"dev-rv": "pnpm -filter 'examples-rust-vite*' run dev",
|
|
18
18
|
"dev-vv": "pnpm -filter 'examples-vite-vite*' run dev",
|
|
19
|
-
"
|
|
19
|
+
"dev-nv": "pnpm -filter 'examples-nuxt-vite-host' -filter 'examples-vite-vite-remote' run dev",
|
|
20
|
+
"preview-vv": "pnpm -filter 'examples-vite-vite*' run preview"
|
|
20
21
|
},
|
|
21
22
|
"repository": {
|
|
22
23
|
"type": "git",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"homepage": "https://github.com/module-federation/vite#readme",
|
|
40
41
|
"packageManager": "pnpm@9.1.3",
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@module-federation/runtime": "^0.
|
|
43
|
+
"@module-federation/runtime": "^0.6.0",
|
|
43
44
|
"@rollup/pluginutils": "^5.1.0",
|
|
44
45
|
"estree-walker": "^2",
|
|
45
46
|
"magic-string": "^0.30.11",
|
|
@@ -52,6 +53,6 @@
|
|
|
52
53
|
"mime-types": "^2.1.35",
|
|
53
54
|
"pretty-quick": "^4.0.0",
|
|
54
55
|
"rimraf": "^6.0.1",
|
|
55
|
-
"vite": "^5.4.
|
|
56
|
+
"vite": "^5.4.3"
|
|
56
57
|
}
|
|
57
58
|
}
|