@module-federation/enhanced 0.6.0 → 0.6.1
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/package.json +3 -2
- package/dist/src/declarations/plugins/container/WebpackError.d.ts +2 -1
- package/dist/src/lib/container/ContainerEntryDependency.d.ts +20 -22
- package/dist/src/lib/container/ContainerEntryModule.d.ts +77 -70
- package/dist/src/lib/container/ContainerEntryModuleFactory.d.ts +10 -14
- package/dist/src/lib/container/ContainerExposedDependency.d.ts +25 -18
- package/dist/src/lib/container/ContainerPlugin.js +4 -12
- package/dist/src/lib/container/ContainerPlugin.js.map +1 -1
- package/dist/src/lib/container/ContainerReferencePlugin.js +1 -3
- package/dist/src/lib/container/ContainerReferencePlugin.js.map +1 -1
- package/dist/src/lib/container/FallbackDependency.d.ts +20 -14
- package/dist/src/lib/container/FallbackItemDependency.d.ts +10 -3
- package/dist/src/lib/container/FallbackModule.d.ts +70 -52
- package/dist/src/lib/container/FallbackModuleFactory.d.ts +10 -10
- package/dist/src/lib/container/HoistContainerReferencesPlugin.d.ts +9 -4
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js +165 -30
- package/dist/src/lib/container/HoistContainerReferencesPlugin.js.map +1 -1
- package/dist/src/lib/container/ModuleFederationPlugin.js +6 -0
- package/dist/src/lib/container/ModuleFederationPlugin.js.map +1 -1
- package/dist/src/lib/container/RemoteModule.d.ts +73 -88
- package/dist/src/lib/container/RemoteModule.js +0 -1
- package/dist/src/lib/container/RemoteModule.js.map +1 -1
- package/dist/src/lib/container/RemoteRuntimeModule.d.ts +7 -10
- package/dist/src/lib/container/RemoteRuntimeModule.js +10 -0
- package/dist/src/lib/container/RemoteRuntimeModule.js.map +1 -1
- package/dist/src/lib/container/RemoteToExternalDependency.d.ts +9 -3
- package/dist/src/lib/container/options.d.ts +3 -12
- package/dist/src/lib/container/options.js +6 -7
- package/dist/src/lib/container/options.js.map +1 -1
- package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.d.ts +21 -0
- package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js +215 -0
- package/dist/src/lib/container/runtime/ChildCompilationRuntimePlugin.js.map +1 -0
- package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.d.ts +9 -0
- package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js +81 -0
- package/dist/src/lib/container/runtime/EmbedFederationRuntimeModule.js.map +1 -0
- package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.d.ts +7 -0
- package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js +38 -0
- package/dist/src/lib/container/runtime/EmbedFederationRuntimePlugin.js.map +1 -0
- package/dist/src/lib/container/runtime/FederationRuntimeModule.d.ts +2 -2
- package/dist/src/lib/container/runtime/FederationRuntimeModule.js.map +1 -1
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.d.ts +2 -2
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js +96 -38
- package/dist/src/lib/container/runtime/FederationRuntimePlugin.js.map +1 -1
- package/dist/src/lib/sharing/ConsumeSharedFallbackDependency.d.ts +10 -3
- package/dist/src/lib/sharing/ConsumeSharedModule.d.ts +104 -97
- package/dist/src/lib/sharing/ConsumeSharedPlugin.d.ts +6 -28
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js +1 -3
- package/dist/src/lib/sharing/ConsumeSharedPlugin.js.map +1 -1
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.d.ts +11 -29
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js +7 -0
- package/dist/src/lib/sharing/ConsumeSharedRuntimeModule.js.map +1 -1
- package/dist/src/lib/sharing/ProvideForSharedDependency.d.ts +11 -3
- package/dist/src/lib/sharing/ProvideSharedDependency.d.ts +37 -35
- package/dist/src/lib/sharing/ProvideSharedModule.d.ts +83 -65
- package/dist/src/lib/sharing/ProvideSharedModuleFactory.d.ts +10 -17
- package/dist/src/lib/sharing/ProvideSharedPlugin.d.ts +19 -37
- package/dist/src/lib/sharing/ProvideSharedPlugin.js +1 -3
- package/dist/src/lib/sharing/ProvideSharedPlugin.js.map +1 -1
- package/dist/src/lib/sharing/SharePlugin.d.ts +13 -39
- package/dist/src/lib/sharing/ShareRuntimeModule.d.ts +7 -12
- package/dist/src/lib/sharing/resolveMatchedConfigs.d.ts +8 -12
- package/dist/src/lib/sharing/utils.d.ts +29 -21
- package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.d.ts +11 -0
- package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js +94 -0
- package/dist/src/lib/startup/MfStartupChunkDependenciesPlugin.js.map +1 -0
- package/dist/src/lib/startup/StartupHelpers.d.ts +6 -0
- package/dist/src/lib/startup/StartupHelpers.js +190 -0
- package/dist/src/lib/startup/StartupHelpers.js.map +1 -0
- package/dist/src/webpack.js.map +1 -1
- package/dist/src/wrapper/HoistContainerReferencesPlugin.d.ts +5 -2
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js +7 -3
- package/dist/src/wrapper/HoistContainerReferencesPlugin.js.map +1 -1
- package/package.json +10 -9
- package/dist/src/declarations/plugins/container/Module.d.ts +0 -138
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/enhanced",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"types": "./dist/src/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/module-federation/core/tree/main/packages/enhanced",
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@module-federation/webpack-bundler-runtime": "workspace:*",
|
|
71
|
-
"@types/btoa": "^1.2.5"
|
|
71
|
+
"@types/btoa": "^1.2.5",
|
|
72
|
+
"enhanced-resolve": "^5.0.0"
|
|
72
73
|
},
|
|
73
74
|
"dependencies": {
|
|
74
75
|
"@module-federation/sdk": "workspace:*",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Module } from 'webpack';
|
|
2
|
+
|
|
1
3
|
declare class WebpackError extends Error {
|
|
2
4
|
/**
|
|
3
5
|
* Creates an instance of WebpackError.
|
|
@@ -17,7 +19,6 @@ declare class WebpackError extends Error {
|
|
|
17
19
|
*/
|
|
18
20
|
static captureStackTrace(
|
|
19
21
|
targetObject: object,
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
21
22
|
constructorOpt?: Function,
|
|
22
23
|
): void;
|
|
23
24
|
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ExposeOptions } from './ContainerEntryModule';
|
|
2
|
+
declare const Dependency: typeof import("webpack").Dependency;
|
|
3
3
|
declare class ContainerEntryDependency extends Dependency {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
name: string;
|
|
5
|
+
exposes: [string, ExposeOptions][];
|
|
6
|
+
shareScope: string;
|
|
7
|
+
injectRuntimeEntry: string;
|
|
8
|
+
/**
|
|
9
|
+
* @param {string} name entry name
|
|
10
|
+
* @param {[string, ExposeOptions][]} exposes list of exposed modules
|
|
11
|
+
* @param {string} shareScope name of the share scope
|
|
12
|
+
* @param {string[]} injectRuntimeEntry the path of injectRuntime file.
|
|
13
|
+
*/
|
|
14
|
+
constructor(name: string, exposes: [string, ExposeOptions][], shareScope: string, injectRuntimeEntry: string);
|
|
15
|
+
/**
|
|
16
|
+
* @returns {string | null} an identifier to merge equal requests
|
|
17
|
+
*/
|
|
18
|
+
getResourceIdentifier(): string | null;
|
|
19
|
+
get type(): string;
|
|
20
|
+
get category(): string;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
export { ExposeOptions };
|
|
23
|
-
}
|
|
24
|
-
type ExposeOptions = import('./ContainerEntryModule').ExposeOptions;
|
|
22
|
+
export default ContainerEntryDependency;
|
|
@@ -1,75 +1,82 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Compilation } from 'webpack';
|
|
2
|
+
import type { InputFileSystem, LibIdentOptions, NeedBuildContext, ObjectDeserializerContext, ObjectSerializerContext, RequestShortener, ResolverWithOptions, WebpackOptions } from 'webpack/lib/Module';
|
|
3
|
+
import type WebpackError from 'webpack/lib/WebpackError';
|
|
4
|
+
declare const Module: typeof import("webpack").Module;
|
|
2
5
|
export type ExposeOptions = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
/**
|
|
7
|
+
* requests to exposed modules (last one is exported)
|
|
8
|
+
*/
|
|
9
|
+
import: string[];
|
|
10
|
+
/**
|
|
11
|
+
* custom chunk name for the exposed module
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
11
14
|
};
|
|
12
|
-
type ObjectDeserializerContext =
|
|
13
|
-
import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;
|
|
14
|
-
type WebpackOptions = any;
|
|
15
|
-
type ChunkGraph = import('webpack/lib/ChunkGraph');
|
|
16
|
-
type ChunkGroup = import('webpack/lib/ChunkGroup');
|
|
17
|
-
type Compilation = import('webpack/lib/Compilation');
|
|
18
|
-
type CodeGenerationContext = import('webpack/lib/Module').CodeGenerationContext;
|
|
19
|
-
type CodeGenerationResult = import('webpack/lib/Module').CodeGenerationResult;
|
|
20
|
-
type LibIdentOptions = import('webpack/lib/Module').LibIdentOptions;
|
|
21
|
-
type NeedBuildContext = import('webpack/lib/Module').NeedBuildContext;
|
|
22
|
-
type RequestShortener = import('webpack/lib/RequestShortener');
|
|
23
|
-
type ResolverWithOptions =
|
|
24
|
-
import('webpack/lib/ResolverFactory').ResolverWithOptions;
|
|
25
|
-
type WebpackError = import('webpack/lib/WebpackError');
|
|
26
|
-
type ObjectSerializerContext =
|
|
27
|
-
import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;
|
|
28
|
-
type Hash = import('webpack/lib/util/Hash');
|
|
29
|
-
type InputFileSystem = import('webpack/lib/util/fs').InputFileSystem;
|
|
30
|
-
type ContainerEntryDependency = typeof import('./ContainerEntryDependency');
|
|
31
|
-
|
|
32
15
|
declare class ContainerEntryModule extends Module {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
16
|
+
private _name;
|
|
17
|
+
private _exposes;
|
|
18
|
+
private _shareScope;
|
|
19
|
+
private _injectRuntimeEntry;
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} name container entry name
|
|
22
|
+
* @param {[string, ExposeOptions][]} exposes list of exposed modules
|
|
23
|
+
* @param {string} shareScope name of the share scope
|
|
24
|
+
*/
|
|
25
|
+
constructor(name: string, exposes: [string, ExposeOptions][], shareScope: string, injectRuntimeEntry: string);
|
|
26
|
+
/**
|
|
27
|
+
* @param {ObjectDeserializerContext} context context
|
|
28
|
+
* @returns {ContainerEntryModule} deserialized container entry module
|
|
29
|
+
*/
|
|
30
|
+
static deserialize(context: ObjectDeserializerContext): ContainerEntryModule;
|
|
31
|
+
/**
|
|
32
|
+
* @returns {Set<string>} types available (do not mutate)
|
|
33
|
+
*/
|
|
34
|
+
getSourceTypes(): Set<string>;
|
|
35
|
+
/**
|
|
36
|
+
* @returns {string} a unique identifier of the module
|
|
37
|
+
*/
|
|
38
|
+
identifier(): string;
|
|
39
|
+
/**
|
|
40
|
+
* @param {RequestShortener} requestShortener the request shortener
|
|
41
|
+
* @returns {string} a user readable identifier of the module
|
|
42
|
+
*/
|
|
43
|
+
readableIdentifier(requestShortener: RequestShortener): string;
|
|
44
|
+
/**
|
|
45
|
+
* @param {LibIdentOptions} options options
|
|
46
|
+
* @returns {string | null} an identifier for library inclusion
|
|
47
|
+
*/
|
|
48
|
+
libIdent(options: LibIdentOptions): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* @param {NeedBuildContext} context context info
|
|
51
|
+
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
52
|
+
* @returns {void}
|
|
53
|
+
*/
|
|
54
|
+
needBuild(context: NeedBuildContext, callback: (arg0: (WebpackError | null) | undefined, arg1: boolean | undefined) => void): void;
|
|
55
|
+
/**
|
|
56
|
+
* @param {WebpackOptions} options webpack options
|
|
57
|
+
* @param {Compilation} compilation the compilation
|
|
58
|
+
* @param {ResolverWithOptions} resolver the resolver
|
|
59
|
+
* @param {InputFileSystem} fs the file system
|
|
60
|
+
* @param {function(WebpackError): void} callback callback function
|
|
61
|
+
* @returns {void}
|
|
62
|
+
*/
|
|
63
|
+
build(options: WebpackOptions, compilation: Compilation, resolver: ResolverWithOptions, fs: InputFileSystem, callback: (err?: WebpackError) => void): void;
|
|
64
|
+
/**
|
|
65
|
+
* @param {CodeGenerationContext} context context for code generation
|
|
66
|
+
* @returns {CodeGenerationResult} result
|
|
67
|
+
*/
|
|
68
|
+
codeGeneration({ moduleGraph, chunkGraph, runtimeTemplate }: any): {
|
|
69
|
+
sources: Map<any, any>;
|
|
70
|
+
runtimeRequirements: Set<"__webpack_require__.d" | "__webpack_require__.o" | "__webpack_exports__">;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* @param {string=} type the source type for which the size should be estimated
|
|
74
|
+
* @returns {number} the estimated size of the module (must be non-zero)
|
|
75
|
+
*/
|
|
76
|
+
size(type?: string): number;
|
|
77
|
+
/**
|
|
78
|
+
* @param {ObjectSerializerContext} context context
|
|
79
|
+
*/
|
|
80
|
+
serialize(context: ObjectSerializerContext): void;
|
|
74
81
|
}
|
|
75
82
|
export default ContainerEntryModule;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
declare const ModuleFactory: typeof import("webpack/lib/ModuleFactory");
|
|
2
|
+
import type { ModuleFactoryCreateData, ModuleFactoryResult } from 'webpack/lib/ModuleFactory';
|
|
3
|
+
export default class ContainerEntryModuleFactory extends ModuleFactory {
|
|
4
|
+
/**
|
|
5
|
+
* @param {ModuleFactoryCreateData} data data object
|
|
6
|
+
* @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback
|
|
7
|
+
* @returns {void}
|
|
8
|
+
*/
|
|
9
|
+
create(data: ModuleFactoryCreateData, callback: (error: Error | null, result: ModuleFactoryResult) => void): void;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
-
type ModuleFactoryCreateData =
|
|
12
|
-
import('webpack/lib/ModuleFactory').ModuleFactoryCreateData;
|
|
13
|
-
type ModuleFactoryResult =
|
|
14
|
-
import('webpack/lib/ModuleFactory').ModuleFactoryResult;
|
|
15
|
-
type ContainerEntryDependency = import('./ContainerEntryDependency');
|
|
11
|
+
export {};
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
declare const dependencies: typeof import("webpack").dependencies;
|
|
2
|
+
import type { ObjectDeserializerContext, ObjectSerializerContext } from 'webpack/lib/dependencies/ModuleDependency';
|
|
3
|
+
declare class ContainerExposedDependency extends dependencies.ModuleDependency {
|
|
4
|
+
exposedName: string;
|
|
5
|
+
request: string;
|
|
6
|
+
/**
|
|
7
|
+
* @param {string} exposedName public name
|
|
8
|
+
* @param {string} request request to module
|
|
9
|
+
*/
|
|
10
|
+
constructor(exposedName: string, request: string);
|
|
11
|
+
get type(): string;
|
|
12
|
+
get category(): string;
|
|
13
|
+
/**
|
|
14
|
+
* @returns {string | null} an identifier to merge equal requests
|
|
15
|
+
*/
|
|
16
|
+
getResourceIdentifier(): string | null;
|
|
17
|
+
/**
|
|
18
|
+
* @param {ObjectSerializerContext} context context
|
|
19
|
+
*/
|
|
20
|
+
serialize(context: ObjectSerializerContext): void;
|
|
21
|
+
/**
|
|
22
|
+
* @param {ObjectDeserializerContext} context context
|
|
23
|
+
*/
|
|
24
|
+
deserialize(context: ObjectDeserializerContext): void;
|
|
11
25
|
}
|
|
12
|
-
|
|
13
|
-
export { ObjectDeserializerContext, ObjectSerializerContext };
|
|
14
|
-
}
|
|
15
|
-
import ModuleDependency = require('webpack/lib/dependencies/ModuleDependency');
|
|
16
|
-
type ObjectDeserializerContext =
|
|
17
|
-
import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;
|
|
18
|
-
type ObjectSerializerContext =
|
|
19
|
-
import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;
|
|
26
|
+
export default ContainerExposedDependency;
|
|
@@ -140,9 +140,7 @@ class ContainerPlugin {
|
|
|
140
140
|
exposes, shareScope, federationRuntimePluginInstance.entryFilePath);
|
|
141
141
|
const hasSingleRuntimeChunk = compilation.options?.optimization?.runtimeChunk;
|
|
142
142
|
dep.loc = { name };
|
|
143
|
-
compilation.addEntry(compilation.options.context || '',
|
|
144
|
-
//@ts-ignore
|
|
145
|
-
dep, {
|
|
143
|
+
compilation.addEntry(compilation.options.context || '', dep, {
|
|
146
144
|
name,
|
|
147
145
|
filename,
|
|
148
146
|
runtime: hasSingleRuntimeChunk ? false : runtime,
|
|
@@ -161,9 +159,7 @@ class ContainerPlugin {
|
|
|
161
159
|
});
|
|
162
160
|
// Function to add entry for undefined runtime
|
|
163
161
|
const addEntryToSingleRuntimeChunk = () => {
|
|
164
|
-
compilation.addEntry(compilation.options.context || '',
|
|
165
|
-
//@ts-ignore
|
|
166
|
-
dep, {
|
|
162
|
+
compilation.addEntry(compilation.options.context || '', dep, {
|
|
167
163
|
name: name ? name + '_partial' : undefined, // give unique name name
|
|
168
164
|
runtime: undefined,
|
|
169
165
|
library,
|
|
@@ -175,12 +171,8 @@ class ContainerPlugin {
|
|
|
175
171
|
};
|
|
176
172
|
});
|
|
177
173
|
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation, { normalModuleFactory }) => {
|
|
178
|
-
compilation.dependencyFactories.set(ContainerEntryDependency_1.default,
|
|
179
|
-
|
|
180
|
-
new ContainerEntryModuleFactory_1.default());
|
|
181
|
-
compilation.dependencyFactories.set(
|
|
182
|
-
//@ts-ignore
|
|
183
|
-
ContainerExposedDependency_1.default, normalModuleFactory);
|
|
174
|
+
compilation.dependencyFactories.set(ContainerEntryDependency_1.default, new ContainerEntryModuleFactory_1.default());
|
|
175
|
+
compilation.dependencyFactories.set(ContainerExposedDependency_1.default, normalModuleFactory);
|
|
184
176
|
});
|
|
185
177
|
}
|
|
186
178
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerPlugin.js","sourceRoot":"","sources":["../../../../src/lib/container/ContainerPlugin.ts"],"names":[],"mappings":";;;;;AAAA;;;EAGE;AACF,0FAAqF;AACrF,0FAAkE;AAClE,gGAAwE;AACxE,8FAAsE;AACtE,uCAAyC;AASzC,gGAAwE;AACxE,0GAAyE;AACzE,8FAA6D;AAY7D,MAAM,sBAAsB,GAAG,OAAO,CAC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,CACF,CAAC;YACJ,CAAC,CAAC;QACJ,CAAC,CACF,CAAC;QAEF,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAChC,WAAW,EACX,CAAC,WAAwB,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE;YACpD,WAAW,CAAC,mBAAmB,CAAC,GAAG,CACjC,kCAAwB,EACxB,IAAI,qCAA2B,EAAE,CAClC,CAAC;YAEF,WAAW,CAAC,mBAAmB,CAAC,GAAG,CACjC,oCAA0B,EAC1B,mBAAmB,CACpB,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -63,9 +63,7 @@ class ContainerReferencePlugin {
|
|
|
63
63
|
compiler.hooks.compilation.tap('ContainerReferencePlugin', (compilation, { normalModuleFactory }) => {
|
|
64
64
|
compilation.dependencyFactories.set(RemoteToExternalDependency_1.default, normalModuleFactory);
|
|
65
65
|
compilation.dependencyFactories.set(FallbackItemDependency_1.default, normalModuleFactory);
|
|
66
|
-
compilation.dependencyFactories.set(FallbackDependency_1.default,
|
|
67
|
-
// @ts-ignore
|
|
68
|
-
new FallbackModuleFactory_1.default());
|
|
66
|
+
compilation.dependencyFactories.set(FallbackDependency_1.default, new FallbackModuleFactory_1.default());
|
|
69
67
|
normalModuleFactory.hooks.factorize.tap('ContainerReferencePlugin',
|
|
70
68
|
// @ts-ignore
|
|
71
69
|
(data) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerReferencePlugin.js","sourceRoot":"","sources":["../../../../src/lib/container/ContainerReferencePlugin.ts"],"names":[],"mappings":";;;;;AAKA,0FAGuD;AAEvD,gEAAgE;AAChE,8EAAsD;AACtD,sFAA8D;AAC9D,oFAA4D;AAC5D,kEAA0C;AAC1C,gFAAwD;AACxD,8FAAsE;AACtE,uCAAyC;AAEzC,gGAAwE;AACxE,gHAAsE;AACtE,4HAAkF;
|
|
1
|
+
{"version":3,"file":"Contain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WAAW,CAAC,KAAK,CAAC,wBAAwB;iBACvC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC;iBACxD,GAAG,CAAC,0BAA0B,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBAC9C,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;gBAChD,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAC;gBAChE,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;gBACxD,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;gBAC3D,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;gBACvD,WAAW,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,6BAAmB,EAAE,CAAC,CAAC;YACjE,CAAC,CAAC,CAAC;QACP,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,wBAAwB,CAAC"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import type { ObjectDeserializerContext, ObjectSerializerContext } from 'webpack/lib/Dependency';
|
|
2
|
+
declare const Dependency: typeof import("webpack").Dependency;
|
|
3
|
+
declare class FallbackDependency extends Dependency {
|
|
4
|
+
requests: string[];
|
|
5
|
+
/**
|
|
6
|
+
* @param {string[]} requests requests
|
|
7
|
+
*/
|
|
8
|
+
constructor(requests: string[]);
|
|
9
|
+
/**
|
|
10
|
+
* @returns {string | null} an identifier to merge equal requests
|
|
11
|
+
*/
|
|
12
|
+
getResourceIdentifier(): string | null;
|
|
13
|
+
get type(): string;
|
|
14
|
+
get category(): string;
|
|
15
|
+
/**
|
|
16
|
+
* @param {ObjectSerializerContext} context context
|
|
17
|
+
*/
|
|
18
|
+
serialize(context: ObjectSerializerContext): void;
|
|
19
|
+
static deserialize(context: ObjectDeserializerContext): FallbackDependency;
|
|
15
20
|
}
|
|
21
|
+
export default FallbackDependency;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
declare class FallbackItemDependency extends ModuleDependency {
|
|
3
|
-
|
|
1
|
+
declare const dependencies: typeof import("webpack").dependencies;
|
|
2
|
+
declare class FallbackItemDependency extends dependencies.ModuleDependency {
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} request request
|
|
5
|
+
*/
|
|
6
|
+
constructor(request: string);
|
|
7
|
+
get type(): string;
|
|
8
|
+
get category(): string;
|
|
9
|
+
}
|
|
10
|
+
export default FallbackItemDependency;
|
|
@@ -1,54 +1,72 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Chunk, ChunkGraph } from 'webpack';
|
|
2
|
+
import type { CodeGenerationContext, CodeGenerationResult, Compilation, InputFileSystem, LibIdentOptions, NeedBuildContext, ObjectDeserializerContext, ObjectSerializerContext, RequestShortener, ResolverWithOptions, WebpackError, WebpackOptions } from 'webpack/lib/Module';
|
|
3
|
+
declare const Module: typeof import("webpack").Module;
|
|
2
4
|
declare class FallbackModule extends Module {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
requests: string[];
|
|
6
|
+
private _identifier;
|
|
7
|
+
/**
|
|
8
|
+
* @param {string[]} requests list of requests to choose one
|
|
9
|
+
*/
|
|
10
|
+
constructor(requests: string[]);
|
|
11
|
+
/**
|
|
12
|
+
* @returns {string} a unique identifier of the module
|
|
13
|
+
*/
|
|
14
|
+
identifier(): string;
|
|
15
|
+
/**
|
|
16
|
+
* @param {RequestShortener} requestShortener the request shortener
|
|
17
|
+
* @returns {string} a user readable identifier of the module
|
|
18
|
+
*/
|
|
19
|
+
readableIdentifier(requestShortener: RequestShortener): string;
|
|
20
|
+
/**
|
|
21
|
+
* @param {LibIdentOptions} options options
|
|
22
|
+
* @returns {string | null} an identifier for library inclusion
|
|
23
|
+
*/
|
|
24
|
+
libIdent(options: LibIdentOptions): string | null;
|
|
25
|
+
/**
|
|
26
|
+
* @param {Chunk} chunk the chunk which condition should be checked
|
|
27
|
+
* @param {Compilation} compilation the compilation
|
|
28
|
+
* @returns {boolean} true, if the chunk is ok for the module
|
|
29
|
+
*/
|
|
30
|
+
chunkCondition(chunk: Chunk, { chunkGraph }: {
|
|
31
|
+
chunkGraph: ChunkGraph;
|
|
32
|
+
}): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* @param {NeedBuildContext} context context info
|
|
35
|
+
* @param {function((WebpackError | null)=, boolean=): void} callback callback function, returns true, if the module needs a rebuild
|
|
36
|
+
* @returns {void}
|
|
37
|
+
*/
|
|
38
|
+
needBuild(context: NeedBuildContext, callback: (error: WebpackError | null, result?: boolean) => void): void;
|
|
39
|
+
/**
|
|
40
|
+
* @param {WebpackOptions} options webpack options
|
|
41
|
+
* @param {Compilation} compilation the compilation
|
|
42
|
+
* @param {ResolverWithOptions} resolver the resolver
|
|
43
|
+
* @param {InputFileSystem} fs the file system
|
|
44
|
+
* @param {function(WebpackError=): void} callback callback function
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*/
|
|
47
|
+
build(options: WebpackOptions, compilation: Compilation, resolver: ResolverWithOptions, fs: InputFileSystem, callback: (error?: WebpackError) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* @param {string=} type the source type for which the size should be estimated
|
|
50
|
+
* @returns {number} the estimated size of the module (must be non-zero)
|
|
51
|
+
*/
|
|
52
|
+
size(type?: string): number;
|
|
53
|
+
/**
|
|
54
|
+
* @returns {Set<string>} types available (do not mutate)
|
|
55
|
+
*/
|
|
56
|
+
getSourceTypes(): Set<string>;
|
|
57
|
+
/**
|
|
58
|
+
* @param {CodeGenerationContext} context context for code generation
|
|
59
|
+
* @returns {CodeGenerationResult} result
|
|
60
|
+
*/
|
|
61
|
+
codeGeneration({ runtimeTemplate, moduleGraph, chunkGraph, }: CodeGenerationContext): CodeGenerationResult;
|
|
62
|
+
/**
|
|
63
|
+
* @param {ObjectSerializerContext} context context
|
|
64
|
+
*/
|
|
65
|
+
serialize(context: ObjectSerializerContext): void;
|
|
66
|
+
/**
|
|
67
|
+
* @param {ObjectDeserializerContext} context context
|
|
68
|
+
* @returns {FallbackModule} deserialized fallback module
|
|
69
|
+
*/
|
|
70
|
+
static deserialize(context: ObjectDeserializerContext): FallbackModule;
|
|
14
71
|
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
WebpackOptions,
|
|
18
|
-
Chunk,
|
|
19
|
-
ChunkGraph,
|
|
20
|
-
ChunkGroup,
|
|
21
|
-
Compilation,
|
|
22
|
-
CodeGenerationContext,
|
|
23
|
-
CodeGenerationResult,
|
|
24
|
-
LibIdentOptions,
|
|
25
|
-
NeedBuildContext,
|
|
26
|
-
RequestShortener,
|
|
27
|
-
ResolverWithOptions,
|
|
28
|
-
WebpackError,
|
|
29
|
-
ObjectDeserializerContext,
|
|
30
|
-
ObjectSerializerContext,
|
|
31
|
-
Hash,
|
|
32
|
-
InputFileSystem,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
import Module = require('webpack/lib/Module');
|
|
36
|
-
type ObjectDeserializerContext =
|
|
37
|
-
import('webpack/lib/serialization/ObjectMiddleware').ObjectDeserializerContext;
|
|
38
|
-
type WebpackOptions = any;
|
|
39
|
-
type Chunk = import('webpack/lib/Chunk');
|
|
40
|
-
type ChunkGraph = import('webpack/lib/ChunkGraph');
|
|
41
|
-
type ChunkGroup = import('webpack/lib/ChunkGroup');
|
|
42
|
-
type Compilation = import('webpack/lib/Compilation');
|
|
43
|
-
type CodeGenerationContext = import('webpack/lib/Module').CodeGenerationContext;
|
|
44
|
-
type CodeGenerationResult = import('webpack/lib/Module').CodeGenerationResult;
|
|
45
|
-
type LibIdentOptions = import('webpack/lib/Module').LibIdentOptions;
|
|
46
|
-
type NeedBuildContext = import('webpack/lib/Module').NeedBuildContext;
|
|
47
|
-
type RequestShortener = import('webpack/lib/RequestShortener');
|
|
48
|
-
type ResolverWithOptions =
|
|
49
|
-
import('webpack/lib/ResolverFactory').ResolverWithOptions;
|
|
50
|
-
type WebpackError = import('webpack/lib/WebpackError');
|
|
51
|
-
type ObjectSerializerContext =
|
|
52
|
-
import('webpack/lib/serialization/ObjectMiddleware').ObjectSerializerContext;
|
|
53
|
-
type Hash = import('webpack/lib/util/Hash');
|
|
54
|
-
type InputFileSystem = import('webpack/lib/util/fs').InputFileSystem;
|
|
72
|
+
export default FallbackModule;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { ModuleFactoryCreateData, ModuleFactoryResult } from 'webpack/lib/ModuleFactory';
|
|
2
|
+
declare const ModuleFactory: typeof import("webpack/lib/ModuleFactory");
|
|
3
|
+
export default class FallbackModuleFactory extends ModuleFactory {
|
|
4
|
+
/**
|
|
5
|
+
* @param {ModuleFactoryCreateData} data data object
|
|
6
|
+
* @param {function((Error | null)=, ModuleFactoryResult=): void} callback callback
|
|
7
|
+
* @returns {void}
|
|
8
|
+
*/
|
|
9
|
+
create(data: ModuleFactoryCreateData, callback: (error: Error | null, result?: ModuleFactoryResult) => void): void;
|
|
5
10
|
}
|
|
6
|
-
|
|
7
|
-
type ModuleFactoryCreateData =
|
|
8
|
-
import('webpack/lib/ModuleFactory').ModuleFactoryCreateData;
|
|
9
|
-
type ModuleFactoryResult =
|
|
10
|
-
import('webpack/lib/ModuleFactory').ModuleFactoryResult;
|
|
11
|
-
type FallbackDependency = import('./FallbackDependency');
|
|
11
|
+
export {};
|
|
@@ -4,11 +4,16 @@ import type { Compiler, WebpackPluginInstance } from 'webpack';
|
|
|
4
4
|
* @constructor
|
|
5
5
|
*/
|
|
6
6
|
export declare class HoistContainerReferences implements WebpackPluginInstance {
|
|
7
|
-
private containerName
|
|
8
|
-
|
|
7
|
+
private readonly containerName;
|
|
8
|
+
private readonly entryFilePath?;
|
|
9
|
+
private readonly bundlerRuntimeDep?;
|
|
10
|
+
private readonly explanation;
|
|
11
|
+
constructor(name?: string, entryFilePath?: string, bundlerRuntimeDep?: string);
|
|
9
12
|
apply(compiler: Compiler): void;
|
|
10
|
-
private
|
|
11
|
-
private
|
|
13
|
+
private getAllReferencedModules;
|
|
14
|
+
private findModule;
|
|
15
|
+
private hoistModulesInChunks;
|
|
16
|
+
private cleanUpChunks;
|
|
12
17
|
private getRuntimeChunks;
|
|
13
18
|
}
|
|
14
19
|
export default HoistContainerReferences;
|