@rspack-canary/browser 1.6.1-canary-17ec8965-20251105023104 → 1.6.1-canary-72453ec6-20251216043959

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.
@@ -33,6 +33,7 @@ type Headers = {
33
33
  value: string;
34
34
  }[] | Record<string, string | string[]>;
35
35
  type OutputFileSystem = import("..").OutputFileSystem & {
36
+ createReadStream?: typeof import("fs").createReadStream;
36
37
  statSync: import("fs").StatSyncFn;
37
38
  readFileSync: typeof import("fs").readFileSync;
38
39
  };
@@ -123,7 +123,6 @@ export interface ExperimentsNormalized {
123
123
  lazyBarrel?: boolean;
124
124
  nativeWatcher?: boolean;
125
125
  deferImport?: boolean;
126
- mfAsyncStartup?: boolean;
127
126
  }
128
127
  export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
129
128
  export type OptimizationRuntimeChunkNormalized = false | {
@@ -2156,11 +2156,6 @@ export type Experiments = {
2156
2156
  * @default false
2157
2157
  */
2158
2158
  deferImport?: boolean;
2159
- /**
2160
- * Enable async startup for Module Federation
2161
- * @default false
2162
- */
2163
- mfAsyncStartup?: boolean;
2164
2159
  };
2165
2160
  export type Watch = boolean;
2166
2161
  /** Options for watch mode. */
package/dist/index.mjs CHANGED
@@ -53396,16 +53396,16 @@ function applyLimits(options, logger) {
53396
53396
  }
53397
53397
  if (void 0 === options.output.chunkLoading) options.output.chunkLoading = "import";
53398
53398
  if (options.output.library) options.output.library = void 0;
53399
- let { splitChunks } = options.optimization;
53400
- if (void 0 === splitChunks) splitChunks = options.optimization.splitChunks = {};
53401
- if (false !== splitChunks) {
53399
+ const { splitChunks } = options.optimization;
53400
+ if (splitChunks) {
53402
53401
  splitChunks.chunks = "all";
53403
53402
  splitChunks.minSize = 0;
53404
53403
  splitChunks.maxAsyncRequests = 1 / 0;
53405
53404
  splitChunks.maxInitialRequests = 1 / 0;
53406
- splitChunks.cacheGroups ??= {};
53407
- splitChunks.cacheGroups.default = false;
53408
- splitChunks.cacheGroups.defaultVendors = false;
53405
+ if (splitChunks.cacheGroups) {
53406
+ splitChunks.cacheGroups.default = false;
53407
+ splitChunks.cacheGroups.defaultVendors = false;
53408
+ }
53409
53409
  }
53410
53410
  }
53411
53411
  class EsmLibraryPlugin {
@@ -58126,7 +58126,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
58126
58126
  if ("object" == typeof rspackFuture) {
58127
58127
  D(rspackFuture, "bundlerInfo", {});
58128
58128
  if ("object" == typeof rspackFuture.bundlerInfo) {
58129
- D(rspackFuture.bundlerInfo, "version", "1.6.1-canary-17ec8965-20251105023104");
58129
+ D(rspackFuture.bundlerInfo, "version", "1.6.1-canary-72453ec6-20251216043959");
58130
58130
  D(rspackFuture.bundlerInfo, "bundler", "rspack");
58131
58131
  D(rspackFuture.bundlerInfo, "force", !library);
58132
58132
  }
@@ -59020,8 +59020,7 @@ const getNormalizedRspackOptions = (config)=>({
59020
59020
  parallelCodeSplitting: experiments.parallelCodeSplitting,
59021
59021
  buildHttp: experiments.buildHttp,
59022
59022
  parallelLoader: experiments.parallelLoader,
59023
- useInputFileSystem: experiments.useInputFileSystem,
59024
- mfAsyncStartup: experiments.mfAsyncStartup ?? false
59023
+ useInputFileSystem: experiments.useInputFileSystem
59025
59024
  };
59026
59025
  }),
59027
59026
  watch: config.watch,
@@ -59671,7 +59670,7 @@ class MergedEtag {
59671
59670
  }
59672
59671
  const dualObjectMap = new WeakMap();
59673
59672
  const objectStringMap = new WeakMap();
59674
- const mergeEtags = (first, second)=>{
59673
+ const mergeEtags_mergeEtags = (first, second)=>{
59675
59674
  let a = first;
59676
59675
  let b = second;
59677
59676
  if ("string" == typeof a) {
@@ -59762,9 +59761,9 @@ class ItemCacheFacade {
59762
59761
  this._etag = etag;
59763
59762
  }
59764
59763
  }
59765
- class CacheFacade {
59764
+ class CacheFacade_CacheFacade {
59766
59765
  getChildCache(name) {
59767
- return new CacheFacade(this._cache, `${this._name}|${name}`, this._hashFunction);
59766
+ return new CacheFacade_CacheFacade(this._cache, `${this._name}|${name}`, this._hashFunction);
59768
59767
  }
59769
59768
  getItemCache(identifier, etag) {
59770
59769
  return new ItemCacheFacade(this._cache, `${this._name}|${identifier}`, etag);
@@ -59773,7 +59772,7 @@ class CacheFacade {
59773
59772
  return getLazyHashedEtag_getter(obj, this._hashFunction);
59774
59773
  }
59775
59774
  mergeEtags(a, b) {
59776
- return mergeEtags(a, b);
59775
+ return mergeEtags_mergeEtags(a, b);
59777
59776
  }
59778
59777
  get(identifier, etag, callback) {
59779
59778
  this._cache.get(`${this._name}|${identifier}`, etag, callback);
@@ -59826,7 +59825,7 @@ class CacheFacade {
59826
59825
  this._hashFunction = hashFunction;
59827
59826
  }
59828
59827
  }
59829
- const lib_CacheFacade = CacheFacade;
59828
+ const CacheFacade = CacheFacade_CacheFacade;
59830
59829
  function NormalModuleFactory_define_property(obj, key, value) {
59831
59830
  if (key in obj) Object.defineProperty(obj, key, {
59832
59831
  value: value,
@@ -60529,9 +60528,7 @@ const createCompilerHooksRegisters = (getCompiler, createTap)=>({
60529
60528
  targetPath,
60530
60529
  outputPath,
60531
60530
  get source () {
60532
- const source = getCompiler().__internal__get_compilation().getAsset(filename)?.source;
60533
- if (!source) throw new Error(`Asset ${filename} not found`);
60534
- return source;
60531
+ return getCompiler().__internal__get_compilation().getAsset(filename)?.source;
60535
60532
  },
60536
60533
  get content () {
60537
60534
  return this.source?.buffer();
@@ -61434,7 +61431,7 @@ class Compiler {
61434
61431
  return Compiler_class_private_field_get(this, _ruleSet);
61435
61432
  }
61436
61433
  getCache(name) {
61437
- return new lib_CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
61434
+ return new CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
61438
61435
  }
61439
61436
  getInfrastructureLogger(name) {
61440
61437
  if (!name) throw new TypeError("Compiler.getInfrastructureLogger(name) called without a name");
@@ -61846,8 +61843,8 @@ class Compiler {
61846
61843
  ]),
61847
61844
  additionalPass: new AsyncSeriesHook([])
61848
61845
  };
61849
- this.webpack = src_rspack_0;
61850
- this.rspack = src_rspack_0;
61846
+ this.webpack = src_rspack;
61847
+ this.rspack = src_rspack;
61851
61848
  this.root = this;
61852
61849
  this.outputPath = "";
61853
61850
  this.inputFileSystem = null;
@@ -62069,7 +62066,7 @@ class MultiStats {
62069
62066
  return obj;
62070
62067
  });
62071
62068
  if (childOptions.version) {
62072
- obj.rspackVersion = "1.6.1-canary-17ec8965-20251105023104";
62069
+ obj.rspackVersion = "1.6.1-canary-72453ec6-20251216043959";
62073
62070
  obj.version = "5.75.0";
62074
62071
  }
62075
62072
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
@@ -62236,7 +62233,7 @@ function ArrayQueue_define_property(obj, key, value) {
62236
62233
  var ArrayQueue_computedKey;
62237
62234
  ArrayQueue_computedKey = Symbol.iterator;
62238
62235
  let ArrayQueue_computedKey1 = ArrayQueue_computedKey;
62239
- class ArrayQueue {
62236
+ class ArrayQueue_ArrayQueue {
62240
62237
  get length() {
62241
62238
  return this._list.length + this._listReversed.length;
62242
62239
  }
@@ -62278,7 +62275,7 @@ class ArrayQueue {
62278
62275
  this._listReversed = [];
62279
62276
  }
62280
62277
  }
62281
- const util_ArrayQueue = ArrayQueue;
62278
+ const ArrayQueue = ArrayQueue_ArrayQueue;
62282
62279
  var MultiCompiler_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
62283
62280
  function MultiCompiler_check_private_redeclaration(obj, privateCollection) {
62284
62281
  if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
@@ -62497,7 +62494,7 @@ function runGraph(setup, run, callback) {
62497
62494
  parent.children.push(node);
62498
62495
  }
62499
62496
  }
62500
- const queue = new util_ArrayQueue();
62497
+ const queue = new ArrayQueue();
62501
62498
  for (const node of nodes)if (0 === node.parents.length) {
62502
62499
  node.state = "queued";
62503
62500
  queue.enqueue(node);
@@ -63374,7 +63371,7 @@ const SIMPLE_EXTRACTORS = {
63374
63371
  },
63375
63372
  version: (object)=>{
63376
63373
  object.version = "5.75.0";
63377
- object.rspackVersion = "1.6.1-canary-17ec8965-20251105023104";
63374
+ object.rspackVersion = "1.6.1-canary-72453ec6-20251216043959";
63378
63375
  },
63379
63376
  env: (object, _compilation, _context, { _env })=>{
63380
63377
  object.env = _env;
@@ -66340,7 +66337,7 @@ function transformSync(source, options) {
66340
66337
  const _options = JSON.stringify(options || {});
66341
66338
  return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
66342
66339
  }
66343
- const exports_rspackVersion = "1.6.1-canary-17ec8965-20251105023104";
66340
+ const exports_rspackVersion = "1.6.1-canary-72453ec6-20251216043959";
66344
66341
  const exports_version = "5.75.0";
66345
66342
  const exports_WebpackError = Error;
66346
66343
  const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
@@ -66434,9 +66431,6 @@ const ERROR_PREFIX = "Invalid Rspack configuration:";
66434
66431
  const validateContext = ({ context })=>{
66435
66432
  if (context && !(0, path_browserify.isAbsolute)(context)) throw new Error(`${ERROR_PREFIX} "context" must be an absolute path, get "${context}".`);
66436
66433
  };
66437
- const validateOutputPath = ({ output })=>{
66438
- if (output?.path && !(0, path_browserify.isAbsolute)(output.path)) throw new Error(`${ERROR_PREFIX} "output.path" must be an absolute path, get "${output.path}".`);
66439
- };
66440
66434
  const validateSplitChunks = ({ optimization })=>{
66441
66435
  if (optimization?.splitChunks) {
66442
66436
  const { minChunks } = optimization.splitChunks;
@@ -66466,7 +66460,6 @@ const validateExternalUmd = ({ output, externals, externalsType })=>{
66466
66460
  };
66467
66461
  function validateRspackConfig(config) {
66468
66462
  validateContext(config);
66469
- validateOutputPath(config);
66470
66463
  validateSplitChunks(config);
66471
66464
  validateExternalUmd(config);
66472
66465
  }
@@ -66499,7 +66492,7 @@ function createCompiler(userOptions) {
66499
66492
  function isMultiRspackOptions(o) {
66500
66493
  return Array.isArray(o);
66501
66494
  }
66502
- function rspack(options, callback) {
66495
+ function rspack_rspack(options, callback) {
66503
66496
  try {
66504
66497
  if (isMultiRspackOptions(options)) for (const option of options)validateRspackConfig(option);
66505
66498
  else validateRspackConfig(options);
@@ -66549,11 +66542,11 @@ function rspack(options, callback) {
66549
66542
  return compiler;
66550
66543
  }
66551
66544
  }
66552
- const src_fn = Object.assign(rspack, exports_namespaceObject);
66545
+ const src_fn = Object.assign(rspack_rspack, exports_namespaceObject);
66553
66546
  src_fn.rspack = src_fn;
66554
66547
  src_fn.webpack = src_fn;
66555
- const src_rspack_0 = src_fn;
66556
- const src_0 = src_rspack_0;
66548
+ const src_rspack = src_fn;
66549
+ const src_0 = src_rspack;
66557
66550
  function BrowserHttpImportEsmPlugin_define_property(obj, key, value) {
66558
66551
  if (key in obj) Object.defineProperty(obj, key, {
66559
66552
  value: value,
@@ -66751,4 +66744,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
66751
66744
  var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
66752
66745
  var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
66753
66746
  var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
66754
- export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, lib_EntryOptionPlugin as EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, exports_library as library, exports_node as node, optimize, src_rspack_0 as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };
66747
+ export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, lib_EntryOptionPlugin as EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, exports_library as library, exports_node as node, optimize, src_rspack as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };
@@ -707,11 +707,11 @@ export interface JsBeforeEmitData {
707
707
  }
708
708
 
709
709
  export interface JsBuildMeta {
710
- strictEsmModule?: boolean
711
- hasTopLevelAwait?: boolean
712
- esm?: boolean
713
- exportsType?: undefined | 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
714
- defaultObject?: undefined | 'false' | 'redirect' | JsBuildMetaDefaultObjectRedirectWarn
710
+ strictEsmModule: boolean
711
+ hasTopLevelAwait: boolean
712
+ esm: boolean
713
+ exportsType: 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
714
+ defaultObject: 'false' | 'redirect' | JsBuildMetaDefaultObjectRedirectWarn
715
715
  sideEffectFree?: boolean
716
716
  exportsFinalName?: Array<[string, string]> | undefined
717
717
  }
@@ -2123,7 +2123,6 @@ inlineEnum: boolean
2123
2123
  typeReexportsPresence: boolean
2124
2124
  lazyBarrel: boolean
2125
2125
  deferImport: boolean
2126
- mfAsyncStartup: boolean
2127
2126
  }
2128
2127
 
2129
2128
  export interface RawExperimentSnapshotOptions {
@@ -2733,6 +2732,12 @@ export interface RawRslibPluginOptions {
2733
2732
  * @default `false`
2734
2733
  */
2735
2734
  interceptApiPlugin?: boolean
2735
+ /**
2736
+ * Use the compact runtime for dynamic import from `modern-module`, commonly used in CommonJS output.
2737
+ * This field should not be set to `true` when using `modern-module` with ESM output, as it is already in use.
2738
+ * @default `false`
2739
+ */
2740
+ compactExternalModuleDynamicImport?: boolean
2736
2741
  /**
2737
2742
  * Add shims for javascript/esm modules
2738
2743
  * @default `false`
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/browser",
3
- "version": "1.6.1-canary-17ec8965-20251105023104",
3
+ "version": "1.6.1-canary-72453ec6-20251216043959",
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.",