@rspack-canary/core 1.7.0-canary-633193aa-20251218194146 → 1.7.0-canary-702525ba-20251219173301

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,13 +1,11 @@
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";
5
4
  export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> {
6
5
  runtimePlugins?: RuntimePlugins;
7
6
  implementation?: string;
8
7
  shareStrategy?: "version-first" | "loaded-first";
9
8
  manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, "remoteAliasMap" | "globalName" | "name" | "exposes" | "shared">;
10
- experiments?: ModuleFederationRuntimeExperimentsOptions;
11
9
  }
12
10
  export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
13
11
  export declare class ModuleFederationPlugin {
@@ -1,9 +1,5 @@
1
- export interface ModuleFederationRuntimeExperimentsOptions {
2
- asyncStartup?: boolean;
3
- }
4
1
  export interface ModuleFederationRuntimeOptions {
5
2
  entryRuntime?: string;
6
- experiments?: ModuleFederationRuntimeExperimentsOptions;
7
3
  }
8
4
  export declare const ModuleFederationRuntimePlugin: {
9
5
  new (options?: ModuleFederationRuntimeOptions | undefined): {
package/dist/index.js CHANGED
@@ -5832,7 +5832,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5832
5832
  }, applyExperimentsDefaults = (experiments, { development })=>{
5833
5833
  F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "deferImport", !1), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !0), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
5834
5834
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
5835
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-633193aa-20251218194146"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5835
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-702525ba-20251219173301"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5836
5836
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, deferImport })=>{
5837
5837
  if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, { deferImport })=>{
5838
5838
  D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
@@ -7599,7 +7599,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7599
7599
  });
7600
7600
  }
7601
7601
  }
7602
- let CORE_VERSION = "1.7.0-canary-633193aa-20251218194146", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7602
+ let CORE_VERSION = "1.7.0-canary-702525ba-20251219173301", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7603
7603
 
7604
7604
  Help:
7605
7605
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -8908,7 +8908,7 @@ Help:
8908
8908
  obj.children = this.stats.map((stat, idx)=>{
8909
8909
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8910
8910
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8911
- }), childOptions.version && (obj.rspackVersion = "1.7.0-canary-633193aa-20251218194146", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8911
+ }), childOptions.version && (obj.rspackVersion = "1.7.0-canary-702525ba-20251219173301", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8912
8912
  let mapError = (j, obj)=>({
8913
8913
  ...obj,
8914
8914
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -9818,7 +9818,7 @@ Help:
9818
9818
  object.hash = context.getStatsCompilation(compilation).hash;
9819
9819
  },
9820
9820
  version: (object)=>{
9821
- object.version = "5.75.0", object.rspackVersion = "1.7.0-canary-633193aa-20251218194146";
9821
+ object.version = "5.75.0", object.rspackVersion = "1.7.0-canary-702525ba-20251219173301";
9822
9822
  },
9823
9823
  env: (object, _compilation, _context, { _env })=>{
9824
9824
  object.env = _env;
@@ -12012,16 +12012,12 @@ Help:
12012
12012
  };
12013
12013
  }
12014
12014
  raw(compiler) {
12015
- let { remoteType, remotes } = this._options, remoteExternals = {}, importExternals = {};
12015
+ let { remoteType, remotes } = this._options, remoteExternals = {};
12016
12016
  for (let [key, config] of remotes){
12017
12017
  let i = 0;
12018
- for (let external of config.external){
12019
- if (external.startsWith("internal ")) continue;
12020
- let request = `webpack/container/reference/${key}${i ? `/fallback-${i}` : ""}`;
12021
- ("module" === remoteType || "module-import" === remoteType) && external.startsWith(".") ? importExternals[request] = external : remoteExternals[request] = external, i++;
12022
- }
12018
+ for (let external of config.external)!external.startsWith("internal ") && (remoteExternals[`webpack/container/reference/${key}${i ? `/fallback-${i}` : ""}`] = external, i++);
12023
12019
  }
12024
- new ExternalsPlugin(remoteType, remoteExternals, !0).apply(compiler), Object.keys(importExternals).length > 0 && new ExternalsPlugin("import", importExternals, !0).apply(compiler), new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
12020
+ new ExternalsPlugin(remoteType, remoteExternals, !0).apply(compiler), new ShareRuntimePlugin(this._options.enhanced).apply(compiler);
12025
12021
  let rawOptions = {
12026
12022
  remoteType: this._options.remoteType,
12027
12023
  remotes: this._options.remotes.map(([key, r])=>({
@@ -12041,7 +12037,7 @@ Help:
12041
12037
  let _options = JSON.stringify(options || {});
12042
12038
  return binding_default().transform(source, _options);
12043
12039
  }
12044
- let exports_rspackVersion = "1.7.0-canary-633193aa-20251218194146", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
12040
+ let exports_rspackVersion = "1.7.0-canary-702525ba-20251219173301", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
12045
12041
  getNormalizedRspackOptions: getNormalizedRspackOptions,
12046
12042
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
12047
12043
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -12102,49 +12098,34 @@ Help:
12102
12098
  bundlerRuntime: bundlerRuntimePath,
12103
12099
  runtime: runtimePath
12104
12100
  });
12105
- compiler.options.resolve.alias = {
12101
+ if (compiler.options.resolve.alias = {
12106
12102
  "@module-federation/runtime-tools": paths.runtimeTools,
12107
12103
  "@module-federation/runtime": paths.runtime,
12108
12104
  ...compiler.options.resolve.alias
12109
- };
12110
- let entryRuntime = function(paths, options, compiler) {
12111
- let runtimePlugins = options.runtimePlugins ?? [], remoteInfos = getRemoteInfos(options), runtimePluginImports = [], runtimePluginVars = [];
12112
- for(let i = 0; i < runtimePlugins.length; i++){
12113
- let runtimePluginVar = `__module_federation_runtime_plugin_${i}__`, pluginSpec = runtimePlugins[i], pluginPath = Array.isArray(pluginSpec) ? pluginSpec[0] : pluginSpec, pluginParams = Array.isArray(pluginSpec) ? pluginSpec[1] : void 0;
12114
- runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
12115
- let paramsCode = void 0 === pluginParams ? "undefined" : JSON.stringify(pluginParams);
12116
- runtimePluginVars.push(`${runtimePluginVar}(${paramsCode})`);
12117
- }
12118
- let content = [
12119
- `import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,
12120
- ...runtimePluginImports,
12121
- `const __module_federation_runtime_plugins__ = [${runtimePluginVars.join(", ")}]`,
12122
- `const __module_federation_remote_infos__ = ${JSON.stringify(remoteInfos)}`,
12123
- `const __module_federation_container_name__ = ${JSON.stringify(options.name ?? compiler.options.output.uniqueName)}`,
12124
- `const __module_federation_share_strategy__ = ${JSON.stringify(options.shareStrategy ?? "version-first")}`,
12125
- compiler.webpack.Template.getFunctionContent(__webpack_require__("./moduleFederationDefaultRuntime.js"))
12126
- ].join(";");
12127
- return `@module-federation/runtime/rspack.js!=!data:text/javascript,${content}`;
12128
- }(paths, this._options, compiler);
12129
- new ModuleFederationRuntimePlugin({
12130
- entryRuntime,
12131
- experiments: {
12132
- asyncStartup: this._options.experiments?.asyncStartup ?? !1
12133
- }
12134
- }).apply(compiler);
12135
- let v1Options = {
12136
- name: this._options.name,
12137
- exposes: this._options.exposes,
12138
- filename: this._options.filename,
12139
- library: this._options.library,
12140
- remoteType: this._options.remoteType,
12141
- remotes: this._options.remotes,
12142
- runtime: this._options.runtime,
12143
- shareScope: this._options.shareScope,
12144
- shared: this._options.shared,
12105
+ }, new ModuleFederationRuntimePlugin({
12106
+ entryRuntime: function(paths, options, compiler) {
12107
+ let runtimePlugins = options.runtimePlugins ?? [], remoteInfos = getRemoteInfos(options), runtimePluginImports = [], runtimePluginVars = [];
12108
+ for(let i = 0; i < runtimePlugins.length; i++){
12109
+ let runtimePluginVar = `__module_federation_runtime_plugin_${i}__`, pluginSpec = runtimePlugins[i], pluginPath = Array.isArray(pluginSpec) ? pluginSpec[0] : pluginSpec, pluginParams = Array.isArray(pluginSpec) ? pluginSpec[1] : void 0;
12110
+ runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
12111
+ let paramsCode = void 0 === pluginParams ? "undefined" : JSON.stringify(pluginParams);
12112
+ runtimePluginVars.push(`${runtimePluginVar}(${paramsCode})`);
12113
+ }
12114
+ let content = [
12115
+ `import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,
12116
+ ...runtimePluginImports,
12117
+ `const __module_federation_runtime_plugins__ = [${runtimePluginVars.join(", ")}]`,
12118
+ `const __module_federation_remote_infos__ = ${JSON.stringify(remoteInfos)}`,
12119
+ `const __module_federation_container_name__ = ${JSON.stringify(options.name ?? compiler.options.output.uniqueName)}`,
12120
+ `const __module_federation_share_strategy__ = ${JSON.stringify(options.shareStrategy ?? "version-first")}`,
12121
+ compiler.webpack.Template.getFunctionContent(__webpack_require__("./moduleFederationDefaultRuntime.js"))
12122
+ ].join(";");
12123
+ return `@module-federation/runtime/rspack.js!=!data:text/javascript,${content}`;
12124
+ }(paths, this._options, compiler)
12125
+ }).apply(compiler), new webpack.container.ModuleFederationPluginV1({
12126
+ ...this._options,
12145
12127
  enhanced: !0
12146
- };
12147
- if (new webpack.container.ModuleFederationPluginV1(v1Options).apply(compiler), this._options.manifest) {
12128
+ }).apply(compiler), this._options.manifest) {
12148
12129
  let manifestOptions = !0 === this._options.manifest ? {} : {
12149
12130
  ...this._options.manifest
12150
12131
  }, containerName = manifestOptions.name ?? this._options.name, globalName = manifestOptions.globalName ?? function(library) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/core",
3
- "version": "1.7.0-canary-633193aa-20251218194146",
3
+ "version": "1.7.0-canary-702525ba-20251219173301",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -58,7 +58,7 @@
58
58
  "dependencies": {
59
59
  "@module-federation/runtime-tools": "0.21.6",
60
60
  "@rspack/lite-tapable": "1.1.0",
61
- "@rspack/binding": "npm:@rspack-canary/binding@1.7.0-canary-633193aa-20251218194146"
61
+ "@rspack/binding": "npm:@rspack-canary/binding@1.7.0-canary-702525ba-20251219173301"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@swc/helpers": ">=0.5.1"