@rspack-canary/browser 1.7.3-canary-fe1e14c1-20260116175137 → 1.7.3-canary-8f09f616-20260116215247
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.
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Compiler } from '../Compiler';
|
|
2
2
|
import { type ModuleFederationManifestPluginOptions } from './ModuleFederationManifestPlugin';
|
|
3
3
|
import type { ModuleFederationPluginV1Options } from './ModuleFederationPluginV1';
|
|
4
|
+
import { type ModuleFederationRuntimeExperimentsOptions } from './ModuleFederationRuntimePlugin';
|
|
4
5
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, 'enhanced'> {
|
|
5
6
|
runtimePlugins?: RuntimePlugins;
|
|
6
7
|
implementation?: string;
|
|
7
8
|
shareStrategy?: 'version-first' | 'loaded-first';
|
|
8
9
|
manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, 'remoteAliasMap' | 'globalName' | 'name' | 'exposes' | 'shared'>;
|
|
10
|
+
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
9
11
|
}
|
|
10
12
|
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
11
13
|
export declare class ModuleFederationPlugin {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export interface ModuleFederationRuntimeExperimentsOptions {
|
|
2
|
+
asyncStartup?: boolean;
|
|
3
|
+
}
|
|
1
4
|
export interface ModuleFederationRuntimeOptions {
|
|
2
5
|
entryRuntime?: string;
|
|
6
|
+
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
7
|
+
asyncStartup?: boolean;
|
|
3
8
|
}
|
|
4
9
|
export declare const ModuleFederationRuntimePlugin: {
|
|
5
10
|
new (options?: ModuleFederationRuntimeOptions | undefined): {
|
package/dist/index.mjs
CHANGED
|
@@ -58267,7 +58267,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58267
58267
|
if ('object' == typeof rspackFuture) {
|
|
58268
58268
|
D(rspackFuture, 'bundlerInfo', {});
|
|
58269
58269
|
if ('object' == typeof rspackFuture.bundlerInfo) {
|
|
58270
|
-
D(rspackFuture.bundlerInfo, 'version', "1.7.3-canary-
|
|
58270
|
+
D(rspackFuture.bundlerInfo, 'version', "1.7.3-canary-8f09f616-20260116215247");
|
|
58271
58271
|
D(rspackFuture.bundlerInfo, 'bundler', 'rspack');
|
|
58272
58272
|
D(rspackFuture.bundlerInfo, 'force', !library);
|
|
58273
58273
|
}
|
|
@@ -60537,7 +60537,7 @@ class MultiStats {
|
|
|
60537
60537
|
return obj;
|
|
60538
60538
|
});
|
|
60539
60539
|
if (childOptions.version) {
|
|
60540
|
-
obj.rspackVersion = "1.7.3-canary-
|
|
60540
|
+
obj.rspackVersion = "1.7.3-canary-8f09f616-20260116215247";
|
|
60541
60541
|
obj.version = "5.75.0";
|
|
60542
60542
|
}
|
|
60543
60543
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
|
|
@@ -62369,7 +62369,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
62369
62369
|
},
|
|
62370
62370
|
version: (object)=>{
|
|
62371
62371
|
object.version = "5.75.0";
|
|
62372
|
-
object.rspackVersion = "1.7.3-canary-
|
|
62372
|
+
object.rspackVersion = "1.7.3-canary-8f09f616-20260116215247";
|
|
62373
62373
|
},
|
|
62374
62374
|
env: (object, _compilation, _context, { _env })=>{
|
|
62375
62375
|
object.env = _env;
|
|
@@ -66470,13 +66470,27 @@ class ModuleFederationPlugin {
|
|
|
66470
66470
|
...compiler.options.resolve.alias
|
|
66471
66471
|
};
|
|
66472
66472
|
const entryRuntime = getDefaultEntryRuntime(paths, this._options, compiler);
|
|
66473
|
+
const asyncStartup = this._options.experiments?.asyncStartup ?? false;
|
|
66474
|
+
const runtimeExperiments = {
|
|
66475
|
+
asyncStartup
|
|
66476
|
+
};
|
|
66473
66477
|
new ModuleFederationRuntimePlugin({
|
|
66474
|
-
entryRuntime
|
|
66478
|
+
entryRuntime,
|
|
66479
|
+
experiments: runtimeExperiments
|
|
66475
66480
|
}).apply(compiler);
|
|
66476
|
-
|
|
66477
|
-
|
|
66481
|
+
const v1Options = {
|
|
66482
|
+
name: this._options.name,
|
|
66483
|
+
exposes: this._options.exposes,
|
|
66484
|
+
filename: this._options.filename,
|
|
66485
|
+
library: this._options.library,
|
|
66486
|
+
remoteType: this._options.remoteType,
|
|
66487
|
+
remotes: this._options.remotes,
|
|
66488
|
+
runtime: this._options.runtime,
|
|
66489
|
+
shareScope: this._options.shareScope,
|
|
66490
|
+
shared: this._options.shared,
|
|
66478
66491
|
enhanced: true
|
|
66479
|
-
}
|
|
66492
|
+
};
|
|
66493
|
+
new webpack.container.ModuleFederationPluginV1(v1Options).apply(compiler);
|
|
66480
66494
|
if (this._options.manifest) {
|
|
66481
66495
|
const manifestOptions = true === this._options.manifest ? {} : {
|
|
66482
66496
|
...this._options.manifest
|
|
@@ -66936,14 +66950,19 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
66936
66950
|
raw(compiler) {
|
|
66937
66951
|
const { remoteType, remotes } = this._options;
|
|
66938
66952
|
const remoteExternals = {};
|
|
66953
|
+
const importExternals = {};
|
|
66939
66954
|
for (const [key, config] of remotes){
|
|
66940
66955
|
let i = 0;
|
|
66941
|
-
for (const external of config.external)
|
|
66942
|
-
|
|
66956
|
+
for (const external of config.external){
|
|
66957
|
+
if (external.startsWith('internal ')) continue;
|
|
66958
|
+
const request = `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`;
|
|
66959
|
+
if (('module' === remoteType || 'module-import' === remoteType) && external.startsWith('.')) importExternals[request] = external;
|
|
66960
|
+
else remoteExternals[request] = external;
|
|
66943
66961
|
i++;
|
|
66944
66962
|
}
|
|
66945
66963
|
}
|
|
66946
66964
|
new ExternalsPlugin(remoteType, remoteExternals, true).apply(compiler);
|
|
66965
|
+
if (Object.keys(importExternals).length > 0) new ExternalsPlugin('import', importExternals, true).apply(compiler);
|
|
66947
66966
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
66948
66967
|
const rawOptions = {
|
|
66949
66968
|
remoteType: this._options.remoteType,
|
|
@@ -67039,7 +67058,7 @@ function transformSync(source, options) {
|
|
|
67039
67058
|
const _options = JSON.stringify(options || {});
|
|
67040
67059
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
67041
67060
|
}
|
|
67042
|
-
const exports_rspackVersion = "1.7.3-canary-
|
|
67061
|
+
const exports_rspackVersion = "1.7.3-canary-8f09f616-20260116215247";
|
|
67043
67062
|
const exports_version = "5.75.0";
|
|
67044
67063
|
const exports_WebpackError = Error;
|
|
67045
67064
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -2477,8 +2477,13 @@ export interface RawModuleFederationManifestPluginOptions {
|
|
|
2477
2477
|
buildInfo?: RawStatsBuildInfo
|
|
2478
2478
|
}
|
|
2479
2479
|
|
|
2480
|
+
export interface RawModuleFederationRuntimeExperimentsOptions {
|
|
2481
|
+
asyncStartup?: boolean
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2480
2484
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2481
2485
|
entryRuntime?: string | undefined
|
|
2486
|
+
experiments?: RawModuleFederationRuntimeExperimentsOptions
|
|
2482
2487
|
}
|
|
2483
2488
|
|
|
2484
2489
|
export interface RawModuleFilenameTemplateFnCtx {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.7.3-canary-
|
|
3
|
+
"version": "1.7.3-canary-8f09f616-20260116215247",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|