@rspack-canary/browser 1.7.1-canary-b9e2cc88-20260102173700 → 1.7.1-canary-becc2931-20260103070024
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
|
@@ -58172,7 +58172,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58172
58172
|
if ('object' == typeof rspackFuture) {
|
|
58173
58173
|
D(rspackFuture, 'bundlerInfo', {});
|
|
58174
58174
|
if ('object' == typeof rspackFuture.bundlerInfo) {
|
|
58175
|
-
D(rspackFuture.bundlerInfo, 'version', "1.7.1-canary-
|
|
58175
|
+
D(rspackFuture.bundlerInfo, 'version', "1.7.1-canary-becc2931-20260103070024");
|
|
58176
58176
|
D(rspackFuture.bundlerInfo, 'bundler', 'rspack');
|
|
58177
58177
|
D(rspackFuture.bundlerInfo, 'force', !library);
|
|
58178
58178
|
}
|
|
@@ -62365,7 +62365,7 @@ class MultiStats {
|
|
|
62365
62365
|
return obj;
|
|
62366
62366
|
});
|
|
62367
62367
|
if (childOptions.version) {
|
|
62368
|
-
obj.rspackVersion = "1.7.1-canary-
|
|
62368
|
+
obj.rspackVersion = "1.7.1-canary-becc2931-20260103070024";
|
|
62369
62369
|
obj.version = "5.75.0";
|
|
62370
62370
|
}
|
|
62371
62371
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
|
|
@@ -63681,7 +63681,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63681
63681
|
},
|
|
63682
63682
|
version: (object)=>{
|
|
63683
63683
|
object.version = "5.75.0";
|
|
63684
|
-
object.rspackVersion = "1.7.1-canary-
|
|
63684
|
+
object.rspackVersion = "1.7.1-canary-becc2931-20260103070024";
|
|
63685
63685
|
},
|
|
63686
63686
|
env: (object, _compilation, _context, { _env })=>{
|
|
63687
63687
|
object.env = _env;
|
|
@@ -66249,13 +66249,28 @@ class ModuleFederationPlugin {
|
|
|
66249
66249
|
...compiler.options.resolve.alias
|
|
66250
66250
|
};
|
|
66251
66251
|
const entryRuntime = getDefaultEntryRuntime(paths, this._options, compiler);
|
|
66252
|
+
const asyncStartup = this._options.experiments?.asyncStartup ?? false;
|
|
66253
|
+
const runtimeExperiments = {
|
|
66254
|
+
asyncStartup
|
|
66255
|
+
};
|
|
66252
66256
|
new ModuleFederationRuntimePlugin({
|
|
66253
|
-
entryRuntime
|
|
66257
|
+
entryRuntime,
|
|
66258
|
+
experiments: runtimeExperiments,
|
|
66259
|
+
asyncStartup
|
|
66254
66260
|
}).apply(compiler);
|
|
66255
|
-
|
|
66256
|
-
|
|
66261
|
+
const v1Options = {
|
|
66262
|
+
name: this._options.name,
|
|
66263
|
+
exposes: this._options.exposes,
|
|
66264
|
+
filename: this._options.filename,
|
|
66265
|
+
library: this._options.library,
|
|
66266
|
+
remoteType: this._options.remoteType,
|
|
66267
|
+
remotes: this._options.remotes,
|
|
66268
|
+
runtime: this._options.runtime,
|
|
66269
|
+
shareScope: this._options.shareScope,
|
|
66270
|
+
shared: this._options.shared,
|
|
66257
66271
|
enhanced: true
|
|
66258
|
-
}
|
|
66272
|
+
};
|
|
66273
|
+
new webpack.container.ModuleFederationPluginV1(v1Options).apply(compiler);
|
|
66259
66274
|
if (this._options.manifest) {
|
|
66260
66275
|
const manifestOptions = true === this._options.manifest ? {} : {
|
|
66261
66276
|
...this._options.manifest
|
|
@@ -66715,14 +66730,19 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
|
66715
66730
|
raw(compiler) {
|
|
66716
66731
|
const { remoteType, remotes } = this._options;
|
|
66717
66732
|
const remoteExternals = {};
|
|
66733
|
+
const importExternals = {};
|
|
66718
66734
|
for (const [key, config] of remotes){
|
|
66719
66735
|
let i = 0;
|
|
66720
|
-
for (const external of config.external)
|
|
66721
|
-
|
|
66736
|
+
for (const external of config.external){
|
|
66737
|
+
if (external.startsWith('internal ')) continue;
|
|
66738
|
+
const request = `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`;
|
|
66739
|
+
if (('module' === remoteType || 'module-import' === remoteType) && external.startsWith('.')) importExternals[request] = external;
|
|
66740
|
+
else remoteExternals[request] = external;
|
|
66722
66741
|
i++;
|
|
66723
66742
|
}
|
|
66724
66743
|
}
|
|
66725
66744
|
new ExternalsPlugin(remoteType, remoteExternals, true).apply(compiler);
|
|
66745
|
+
if (Object.keys(importExternals).length > 0) new ExternalsPlugin('import', importExternals, true).apply(compiler);
|
|
66726
66746
|
new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
66727
66747
|
const rawOptions = {
|
|
66728
66748
|
remoteType: this._options.remoteType,
|
|
@@ -66818,7 +66838,7 @@ function transformSync(source, options) {
|
|
|
66818
66838
|
const _options = JSON.stringify(options || {});
|
|
66819
66839
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66820
66840
|
}
|
|
66821
|
-
const exports_rspackVersion = "1.7.1-canary-
|
|
66841
|
+
const exports_rspackVersion = "1.7.1-canary-becc2931-20260103070024";
|
|
66822
66842
|
const exports_version = "5.75.0";
|
|
66823
66843
|
const exports_WebpackError = Error;
|
|
66824
66844
|
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
|
@@ -2470,8 +2470,14 @@ export interface RawModuleFederationManifestPluginOptions {
|
|
|
2470
2470
|
buildInfo?: RawStatsBuildInfo
|
|
2471
2471
|
}
|
|
2472
2472
|
|
|
2473
|
+
export interface RawModuleFederationRuntimeExperimentsOptions {
|
|
2474
|
+
asyncStartup?: boolean
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2473
2477
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2474
2478
|
entryRuntime?: string | undefined
|
|
2479
|
+
experiments?: RawModuleFederationRuntimeExperimentsOptions
|
|
2480
|
+
asyncStartup?: boolean
|
|
2475
2481
|
}
|
|
2476
2482
|
|
|
2477
2483
|
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.1-canary-
|
|
3
|
+
"version": "1.7.1-canary-becc2931-20260103070024",
|
|
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.",
|