@rspack-canary/core 1.6.7-canary-f7e6adf4-20251211131042 → 1.6.7-canary-4c2435c7-20251212073856

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.
Files changed (2) hide show
  1. package/dist/index.js +34 -26
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -5785,7 +5785,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5785
5785
  }, applyExperimentsDefaults = (experiments, { development })=>{
5786
5786
  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", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
5787
5787
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
5788
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.7-canary-f7e6adf4-20251211131042"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5788
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.7-canary-4c2435c7-20251212073856"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5789
5789
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
5790
5790
  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, { usedExports, inlineConst, deferImport })=>{
5791
5791
  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", [
@@ -7545,7 +7545,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7545
7545
  });
7546
7546
  }
7547
7547
  }
7548
- let CORE_VERSION = "1.6.7-canary-f7e6adf4-20251211131042", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7548
+ let CORE_VERSION = "1.6.7-canary-4c2435c7-20251212073856", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7549
7549
 
7550
7550
  Help:
7551
7551
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -8854,7 +8854,7 @@ Help:
8854
8854
  obj.children = this.stats.map((stat, idx)=>{
8855
8855
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8856
8856
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8857
- }), childOptions.version && (obj.rspackVersion = "1.6.7-canary-f7e6adf4-20251211131042", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8857
+ }), childOptions.version && (obj.rspackVersion = "1.6.7-canary-4c2435c7-20251212073856", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8858
8858
  let mapError = (j, obj)=>({
8859
8859
  ...obj,
8860
8860
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -9753,7 +9753,7 @@ Help:
9753
9753
  object.hash = context.getStatsCompilation(compilation).hash;
9754
9754
  },
9755
9755
  version: (object)=>{
9756
- object.version = "5.75.0", object.rspackVersion = "1.6.7-canary-f7e6adf4-20251211131042";
9756
+ object.version = "5.75.0", object.rspackVersion = "1.6.7-canary-4c2435c7-20251212073856";
9757
9757
  },
9758
9758
  env: (object, _compilation, _context, { _env })=>{
9759
9759
  object.env = _env;
@@ -12304,6 +12304,27 @@ Help:
12304
12304
  }
12305
12305
  return remoteInfos;
12306
12306
  }
12307
+ function getDefaultEntryRuntime(paths, options, compiler, treeshakeShareFallbacks) {
12308
+ let runtimePlugins = options.runtimePlugins ?? [], remoteInfos = getRemoteInfos(options), runtimePluginImports = [], runtimePluginVars = [], libraryType = options.library?.type || "var";
12309
+ for(let i = 0; i < runtimePlugins.length; i++){
12310
+ 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;
12311
+ runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
12312
+ let paramsCode = void 0 === pluginParams ? "undefined" : JSON.stringify(pluginParams);
12313
+ runtimePluginVars.push(`${runtimePluginVar}(${paramsCode})`);
12314
+ }
12315
+ let content = [
12316
+ `import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,
12317
+ ...runtimePluginImports,
12318
+ `const __module_federation_runtime_plugins__ = [${runtimePluginVars.join(", ")}]`,
12319
+ `const __module_federation_remote_infos__ = ${JSON.stringify(remoteInfos)}`,
12320
+ `const __module_federation_container_name__ = ${JSON.stringify(options.name ?? compiler.options.output.uniqueName)}`,
12321
+ `const __module_federation_share_strategy__ = ${JSON.stringify(options.shareStrategy ?? "version-first")}`,
12322
+ `const __module_federation_share_fallbacks__ = ${JSON.stringify(treeshakeShareFallbacks)}`,
12323
+ `const __module_federation_library_type__ = ${JSON.stringify(libraryType)}`,
12324
+ compiler.webpack.Template.getFunctionContent(__webpack_require__("./moduleFederationDefaultRuntime.js"))
12325
+ ].join(";");
12326
+ return `@module-federation/runtime/rspack.js!=!data:text/javascript,${content}`;
12327
+ }
12307
12328
  class ContainerPlugin extends RspackBuiltinPlugin {
12308
12329
  name = binding_.BuiltinPluginName.ContainerPlugin;
12309
12330
  _options;
@@ -12395,7 +12416,7 @@ Help:
12395
12416
  let _options = JSON.stringify(options || {});
12396
12417
  return binding_default().transform(source, _options);
12397
12418
  }
12398
- let exports_rspackVersion = "1.6.7-canary-f7e6adf4-20251211131042", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
12419
+ let exports_rspackVersion = "1.6.7-canary-4c2435c7-20251212073856", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
12399
12420
  getNormalizedRspackOptions: getNormalizedRspackOptions,
12400
12421
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
12401
12422
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -12479,27 +12500,14 @@ Help:
12479
12500
  stage: 100
12480
12501
  }, async ()=>{
12481
12502
  runtimePluginApplied || (runtimePluginApplied = !0, new ModuleFederationRuntimePlugin({
12482
- entryRuntime: function(paths, options, compiler, treeshakeShareFallbacks) {
12483
- let runtimePlugins = options.runtimePlugins ?? [], remoteInfos = getRemoteInfos(options), runtimePluginImports = [], runtimePluginVars = [], libraryType = options.library?.type || "var";
12484
- for(let i = 0; i < runtimePlugins.length; i++){
12485
- 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;
12486
- runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
12487
- let paramsCode = void 0 === pluginParams ? "undefined" : JSON.stringify(pluginParams);
12488
- runtimePluginVars.push(`${runtimePluginVar}(${paramsCode})`);
12489
- }
12490
- let content = [
12491
- `import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,
12492
- ...runtimePluginImports,
12493
- `const __module_federation_runtime_plugins__ = [${runtimePluginVars.join(", ")}]`,
12494
- `const __module_federation_remote_infos__ = ${JSON.stringify(remoteInfos)}`,
12495
- `const __module_federation_container_name__ = ${JSON.stringify(options.name ?? compiler.options.output.uniqueName)}`,
12496
- `const __module_federation_share_strategy__ = ${JSON.stringify(options.shareStrategy ?? "version-first")}`,
12497
- `const __module_federation_share_fallbacks__ = ${JSON.stringify(treeshakeShareFallbacks)}`,
12498
- `const __module_federation_library_type__ = ${JSON.stringify(libraryType)}`,
12499
- compiler.webpack.Template.getFunctionContent(__webpack_require__("./moduleFederationDefaultRuntime.js"))
12500
- ].join(";");
12501
- return `@module-federation/runtime/rspack.js!=!data:text/javascript,${content}`;
12502
- }(paths, this._options, compiler, this._treeShakeSharedPlugin?.buildAssets || {})
12503
+ entryRuntime: getDefaultEntryRuntime(paths, this._options, compiler, this._treeShakeSharedPlugin?.buildAssets || {})
12504
+ }).apply(compiler));
12505
+ }), compiler.hooks.watchRun.tapPromise({
12506
+ name: "ModuleFederationPlugin",
12507
+ stage: 100
12508
+ }, async ()=>{
12509
+ runtimePluginApplied || (runtimePluginApplied = !0, new ModuleFederationRuntimePlugin({
12510
+ entryRuntime: getDefaultEntryRuntime(paths, this._options, compiler, this._treeShakeSharedPlugin?.buildAssets || {})
12503
12511
  }).apply(compiler));
12504
12512
  }), new webpack.container.ModuleFederationPluginV1({
12505
12513
  ...this._options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/core",
3
- "version": "1.6.7-canary-f7e6adf4-20251211131042",
3
+ "version": "1.6.7-canary-4c2435c7-20251212073856",
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.0.0-feat-shared-treeshake-poc-20251208061713",
60
60
  "@rspack/lite-tapable": "1.1.0",
61
- "@rspack/binding": "npm:@rspack-canary/binding@1.6.7-canary-f7e6adf4-20251211131042"
61
+ "@rspack/binding": "npm:@rspack-canary/binding@1.6.7-canary-4c2435c7-20251212073856"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@swc/helpers": ">=0.5.1"