@module-federation/vite 0.2.7 → 1.0.0-alpha-7c3ba59
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/README.md +45 -40
- package/lib/index.cjs +489 -11028
- package/lib/index.d.ts +5 -2
- package/lib/index.esm.js +487 -11028
- package/lib/index.modern.js +536 -11020
- package/lib/index.umd.js +489 -11030
- package/lib/utils/aliasToArrayPlugin.d.ts +10 -0
- package/lib/utils/normalizeBuild.d.ts +8 -0
- package/lib/utils/normalizeModuleFederationOptions.d.ts +83 -0
- package/lib/utils/normalizeOptimizeDeps.d.ts +9 -0
- package/lib/utils/vitePluginAddEntry.d.ts +8 -0
- package/lib/utils/vitePluginOverrideModule.d.ts +6 -0
- package/package.json +12 -7
- package/lib/dev-externals-mixin.d.ts +0 -1
- package/lib/externals-skip-list.d.ts +0 -2
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { SharedConfig } from '@module-federation/runtime/types';
|
|
2
|
+
export type RemoteEntryType = 'var' | 'module' | 'assign' | 'assign-properties' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | string;
|
|
3
|
+
interface ExposesItem {
|
|
4
|
+
import: string;
|
|
5
|
+
}
|
|
6
|
+
export interface NormalizedShared {
|
|
7
|
+
[key: string]: ShareItem;
|
|
8
|
+
}
|
|
9
|
+
export declare function normalizeRemotes(remotes: Record<string, string | {
|
|
10
|
+
type: string;
|
|
11
|
+
name: string;
|
|
12
|
+
entry: string;
|
|
13
|
+
entryGlobalName: string;
|
|
14
|
+
shareScope: string;
|
|
15
|
+
}> | undefined): Record<string, {
|
|
16
|
+
type: string;
|
|
17
|
+
name: string;
|
|
18
|
+
entry: string;
|
|
19
|
+
entryGlobalName: string;
|
|
20
|
+
shareScope: string;
|
|
21
|
+
}>;
|
|
22
|
+
interface ShareItem {
|
|
23
|
+
name: string;
|
|
24
|
+
version: string | undefined;
|
|
25
|
+
scope: string;
|
|
26
|
+
from: string;
|
|
27
|
+
shareConfig: SharedConfig;
|
|
28
|
+
}
|
|
29
|
+
export type ModuleFederationOptions = {
|
|
30
|
+
exposes?: Record<string, string | {
|
|
31
|
+
import: string;
|
|
32
|
+
}> | undefined;
|
|
33
|
+
filename?: string;
|
|
34
|
+
library?: any;
|
|
35
|
+
name: string;
|
|
36
|
+
remotes?: Record<string, string | {
|
|
37
|
+
type: string;
|
|
38
|
+
name: string;
|
|
39
|
+
entry: string;
|
|
40
|
+
entryGlobalName: string;
|
|
41
|
+
shareScope: string;
|
|
42
|
+
}> | undefined;
|
|
43
|
+
runtime?: any;
|
|
44
|
+
shareScope?: string;
|
|
45
|
+
shared?: string[] | Record<string, string | {
|
|
46
|
+
name: string;
|
|
47
|
+
version?: string;
|
|
48
|
+
shareScope?: string;
|
|
49
|
+
singleton?: boolean;
|
|
50
|
+
requiredVersion?: string;
|
|
51
|
+
strictVersion?: boolean;
|
|
52
|
+
}> | undefined;
|
|
53
|
+
runtimePlugins?: string[];
|
|
54
|
+
getPublicPath?: any;
|
|
55
|
+
implementation?: any;
|
|
56
|
+
manifest?: any;
|
|
57
|
+
dev?: any;
|
|
58
|
+
dts?: any;
|
|
59
|
+
};
|
|
60
|
+
export interface NormalizedModuleFederationOptions {
|
|
61
|
+
exposes: Record<string, ExposesItem>;
|
|
62
|
+
filename: string;
|
|
63
|
+
library: any;
|
|
64
|
+
name: string;
|
|
65
|
+
remotes: Record<string, {
|
|
66
|
+
type: string;
|
|
67
|
+
name: string;
|
|
68
|
+
entry: string;
|
|
69
|
+
entryGlobalName: string;
|
|
70
|
+
shareScope: string;
|
|
71
|
+
}>;
|
|
72
|
+
runtime: any;
|
|
73
|
+
shareScope: string;
|
|
74
|
+
shared: NormalizedShared;
|
|
75
|
+
runtimePlugins: string[];
|
|
76
|
+
getPublicPath: any;
|
|
77
|
+
implementation: any;
|
|
78
|
+
manifest: any;
|
|
79
|
+
dev: any;
|
|
80
|
+
dts: any;
|
|
81
|
+
}
|
|
82
|
+
export declare function normalizeModuleFederationOptions(options: ModuleFederationOptions): NormalizedModuleFederationOptions;
|
|
83
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/vite",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Vite
|
|
3
|
+
"version": "1.0.0-alpha-7c3ba59",
|
|
4
|
+
"description": "Vite plugin for Module Federation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "src/index.ts",
|
|
7
7
|
"main": "./lib/index.cjs",
|
|
@@ -34,15 +34,20 @@
|
|
|
34
34
|
"url": "https://github.com/module-federation/vite/issues"
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/module-federation/vite#readme",
|
|
37
|
-
"
|
|
38
|
-
|
|
37
|
+
"packageManager": "pnpm@9.1.3",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@module-federation/runtime": "^0.2.8",
|
|
40
|
+
"@rollup/pluginutils": "^5.1.0",
|
|
41
|
+
"an-empty-js-file": "1.0.0",
|
|
42
|
+
"estree-walker": "^2",
|
|
43
|
+
"magic-string": "^0.30.10"
|
|
39
44
|
},
|
|
40
45
|
"devDependencies": {
|
|
41
|
-
"husky": "^8.0.
|
|
46
|
+
"husky": "^8.0.3",
|
|
42
47
|
"microbundle": "^0.15.1",
|
|
43
48
|
"mime-types": "^2.1.35",
|
|
44
49
|
"pretty-quick": "^3.1.3",
|
|
45
|
-
"rimraf": "^
|
|
46
|
-
"vite": "^
|
|
50
|
+
"rimraf": "^5.0.1",
|
|
51
|
+
"vite": "^4.4.9"
|
|
47
52
|
}
|
|
48
53
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const devExternalsMixin: any;
|