@module-federation/vite 0.2.8 → 1.0.0-alpha-ffc6e23

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.
@@ -0,0 +1,10 @@
1
+ import { UserConfig } from 'vite';
2
+ export interface Command {
3
+ }
4
+ declare const _default: {
5
+ name: string;
6
+ config: (config: UserConfig, { command }: {
7
+ command: Command;
8
+ }) => void;
9
+ };
10
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { UserConfig } from 'vite';
2
+ declare const _default: (singleChunkModules: string[]) => {
3
+ name: string;
4
+ config: (config: UserConfig, { command }: {
5
+ command: string;
6
+ }) => void;
7
+ };
8
+ export default _default;
@@ -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 {};
@@ -0,0 +1,9 @@
1
+ import { UserConfig } from 'vite';
2
+ export interface Command {
3
+ command: string;
4
+ }
5
+ declare const _default: {
6
+ name: string;
7
+ config: (config: UserConfig, { command }: Command) => void;
8
+ };
9
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { Plugin } from 'vite';
2
+ interface AddEntryOptions {
3
+ entryName: string;
4
+ entryPath: string;
5
+ fileName?: string;
6
+ }
7
+ declare const addEntry: ({ entryName, entryPath, fileName }: AddEntryOptions) => Plugin[];
8
+ export default addEntry;
@@ -0,0 +1,6 @@
1
+ import { Plugin } from 'vite';
2
+ export declare function overrideModule(options?: {
3
+ override?: string[];
4
+ include?: string | string[];
5
+ exclude?: string | string[];
6
+ }): Plugin;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@module-federation/vite",
3
- "version": "0.2.8",
4
- "description": "Vite/Rollup plugin for Module Federation",
3
+ "version": "1.0.0-alpha-ffc6e23",
4
+ "description": "Vite plugin for Module Federation",
5
5
  "type": "module",
6
6
  "source": "src/index.ts",
7
7
  "main": "./lib/index.cjs",
@@ -34,8 +34,13 @@
34
34
  "url": "https://github.com/module-federation/vite/issues"
35
35
  },
36
36
  "homepage": "https://github.com/module-federation/vite#readme",
37
- "peerDependencies": {
38
- "@softarc/native-federation": "^2.0.2"
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
46
  "husky": "^8.0.3",
@@ -1 +0,0 @@
1
- export declare const devExternalsMixin: any;
@@ -1,2 +0,0 @@
1
- export declare const externalsSkipList: Set<string>;
2
- export declare function filterExternals(deps: string[]): string[];