@rspack-canary/browser 1.7.1-canary-ba0d4097-20260101174630 → 1.7.1-canary-5eaa0135-20260103025009

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,9 @@
1
+ export interface ModuleFederationRuntimeExperimentsOptions {
2
+ asyncStartup?: boolean;
3
+ }
1
4
  export interface ModuleFederationRuntimeOptions {
2
5
  entryRuntime?: string;
6
+ experiments?: ModuleFederationRuntimeExperimentsOptions;
3
7
  }
4
8
  export declare const ModuleFederationRuntimePlugin: {
5
9
  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-ba0d4097-20260101174630");
58175
+ D(rspackFuture.bundlerInfo, 'version', "1.7.1-canary-5eaa0135-20260103025009");
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-ba0d4097-20260101174630";
62368
+ obj.rspackVersion = "1.7.1-canary-5eaa0135-20260103025009";
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-ba0d4097-20260101174630";
63684
+ object.rspackVersion = "1.7.1-canary-5eaa0135-20260103025009";
63685
63685
  },
63686
63686
  env: (object, _compilation, _context, { _env })=>{
63687
63687
  object.env = _env;
@@ -66249,13 +66249,26 @@ class ModuleFederationPlugin {
66249
66249
  ...compiler.options.resolve.alias
66250
66250
  };
66251
66251
  const entryRuntime = getDefaultEntryRuntime(paths, this._options, compiler);
66252
+ const runtimeExperiments = {
66253
+ asyncStartup: this._options.experiments?.asyncStartup ?? false
66254
+ };
66252
66255
  new ModuleFederationRuntimePlugin({
66253
- entryRuntime
66256
+ entryRuntime,
66257
+ experiments: runtimeExperiments
66254
66258
  }).apply(compiler);
66255
- new webpack.container.ModuleFederationPluginV1({
66256
- ...this._options,
66259
+ const v1Options = {
66260
+ name: this._options.name,
66261
+ exposes: this._options.exposes,
66262
+ filename: this._options.filename,
66263
+ library: this._options.library,
66264
+ remoteType: this._options.remoteType,
66265
+ remotes: this._options.remotes,
66266
+ runtime: this._options.runtime,
66267
+ shareScope: this._options.shareScope,
66268
+ shared: this._options.shared,
66257
66269
  enhanced: true
66258
- }).apply(compiler);
66270
+ };
66271
+ new webpack.container.ModuleFederationPluginV1(v1Options).apply(compiler);
66259
66272
  if (this._options.manifest) {
66260
66273
  const manifestOptions = true === this._options.manifest ? {} : {
66261
66274
  ...this._options.manifest
@@ -66715,14 +66728,19 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin {
66715
66728
  raw(compiler) {
66716
66729
  const { remoteType, remotes } = this._options;
66717
66730
  const remoteExternals = {};
66731
+ const importExternals = {};
66718
66732
  for (const [key, config] of remotes){
66719
66733
  let i = 0;
66720
- for (const external of config.external)if (!external.startsWith('internal ')) {
66721
- remoteExternals[`webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`] = external;
66734
+ for (const external of config.external){
66735
+ if (external.startsWith('internal ')) continue;
66736
+ const request = `webpack/container/reference/${key}${i ? `/fallback-${i}` : ''}`;
66737
+ if (('module' === remoteType || 'module-import' === remoteType) && external.startsWith('.')) importExternals[request] = external;
66738
+ else remoteExternals[request] = external;
66722
66739
  i++;
66723
66740
  }
66724
66741
  }
66725
66742
  new ExternalsPlugin(remoteType, remoteExternals, true).apply(compiler);
66743
+ if (Object.keys(importExternals).length > 0) new ExternalsPlugin('import', importExternals, true).apply(compiler);
66726
66744
  new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
66727
66745
  const rawOptions = {
66728
66746
  remoteType: this._options.remoteType,
@@ -66818,7 +66836,7 @@ function transformSync(source, options) {
66818
66836
  const _options = JSON.stringify(options || {});
66819
66837
  return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
66820
66838
  }
66821
- const exports_rspackVersion = "1.7.1-canary-ba0d4097-20260101174630";
66839
+ const exports_rspackVersion = "1.7.1-canary-5eaa0135-20260103025009";
66822
66840
  const exports_version = "5.75.0";
66823
66841
  const exports_WebpackError = Error;
66824
66842
  const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
@@ -2470,8 +2470,13 @@ 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
2475
2480
  }
2476
2481
 
2477
2482
  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-ba0d4097-20260101174630",
3
+ "version": "1.7.1-canary-5eaa0135-20260103025009",
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.",