@rspack-canary/core 1.5.8-canary-15732646-20250927173602 → 1.5.8-canary-e88f22dc-20250928174002

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.
@@ -0,0 +1,5 @@
1
+ import type { Compiler } from "../Compiler";
2
+ export declare class EsmLibraryPlugin {
3
+ static PLUGIN_NAME: string;
4
+ apply(compiler: Compiler): void;
5
+ }
@@ -26,6 +26,7 @@ export * from "./EnableLibraryPlugin";
26
26
  export * from "./EnableWasmLoadingPlugin";
27
27
  export * from "./EnsureChunkConditionsPlugin";
28
28
  export * from "./EntryPlugin";
29
+ export * from "./EsmLibraryPlugin";
29
30
  export * from "./EvalDevToolModulePlugin";
30
31
  export * from "./EvalSourceMapDevToolPlugin";
31
32
  export * from "./ExternalsPlugin";
package/dist/exports.d.ts CHANGED
@@ -57,7 +57,7 @@ export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
57
57
  export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
58
58
  export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
59
59
  export type { OutputFileSystem } from "./util/fs";
60
- import { FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
60
+ import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
61
61
  interface Web {
62
62
  FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
63
63
  }
@@ -143,6 +143,7 @@ interface Experiments {
143
143
  cleanup: () => Promise<void>;
144
144
  };
145
145
  RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin;
146
+ EsmLibraryPlugin: typeof EsmLibraryPlugin;
146
147
  RsdoctorPlugin: typeof RsdoctorPlugin;
147
148
  RstestPlugin: typeof RstestPlugin;
148
149
  RslibPlugin: typeof RslibPlugin;
package/dist/index.js CHANGED
@@ -2304,7 +2304,22 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2304
2304
  if (!enabled.has(type)) return enabled.add(type), (0, builtin_plugin_base.no)(this.name, type);
2305
2305
  }
2306
2306
  }
2307
- let EnableWasmLoadingPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}), EvalDevToolModulePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation"), EvalSourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
2307
+ let EnableWasmLoadingPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}), RemoveDuplicateModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveDuplicateModulesPlugin, ()=>({}));
2308
+ class EsmLibraryPlugin {
2309
+ static PLUGIN_NAME = "EsmLibraryPlugin";
2310
+ apply(compiler) {
2311
+ var config;
2312
+ let err;
2313
+ new RemoveDuplicateModulesPlugin().apply(compiler);
2314
+ let { splitChunks } = compiler.options.optimization;
2315
+ if (splitChunks && (splitChunks.chunks = "all", splitChunks.minSize = 0), err = (config = compiler.options).optimization.concatenateModules ? "You should disable `config.optimization.concatenateModules`" : !1 !== config.output.chunkFormat ? "You should disable default chunkFormat by `config.output.chunkFormat = false`" : void 0) throw new src_0.WebpackError(`Conflicted config for ${EsmLibraryPlugin.PLUGIN_NAME}: ${err}`);
2316
+ compiler.__internal__registerBuiltinPlugin({
2317
+ name: binding_.BuiltinPluginName.EsmLibraryPlugin,
2318
+ options: {}
2319
+ });
2320
+ }
2321
+ }
2322
+ let EvalDevToolModulePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation"), EvalSourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
2308
2323
  function isNil(value) {
2309
2324
  return null == value;
2310
2325
  }
@@ -7421,7 +7436,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7421
7436
  ]), [
7422
7437
  key,
7423
7438
  value
7424
- ]))), "compilation"), RealContentHashPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation"), RemoveDuplicateModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveDuplicateModulesPlugin, ()=>({})), RemoveEmptyChunksPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveEmptyChunksPlugin, ()=>{}, "compilation"), RsdoctorPluginImpl = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
7439
+ ]))), "compilation"), RealContentHashPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation"), RemoveEmptyChunksPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveEmptyChunksPlugin, ()=>{}, "compilation"), RsdoctorPluginImpl = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
7425
7440
  moduleGraphFeatures: !0,
7426
7441
  chunkGraphFeatures: !0
7427
7442
  }) {
@@ -8655,7 +8670,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8655
8670
  }, applyExperimentsDefaults = (experiments, { development })=>{
8656
8671
  defaults_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, "layers", !1), !1 === experiments.topLevelAwait && console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration."), D(experiments, "topLevelAwait", !0), 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", !1);
8657
8672
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
8658
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.8-canary-15732646-20250927173602"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
8673
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.8-canary-e88f22dc-20250928174002"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
8659
8674
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst })=>{
8660
8675
  if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), ((parserOptions, { usedExports, inlineConst })=>{
8661
8676
  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", [
@@ -10299,7 +10314,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
10299
10314
  });
10300
10315
  }
10301
10316
  }
10302
- let CORE_VERSION = "1.5.8-canary-15732646-20250927173602", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
10317
+ let CORE_VERSION = "1.5.8-canary-e88f22dc-20250928174002", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
10303
10318
 
10304
10319
  Help:
10305
10320
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -11583,7 +11598,7 @@ Help:
11583
11598
  obj.children = this.stats.map((stat, idx)=>{
11584
11599
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
11585
11600
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
11586
- }), childOptions.version && (obj.rspackVersion = "1.5.8-canary-15732646-20250927173602", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11601
+ }), childOptions.version && (obj.rspackVersion = "1.5.8-canary-e88f22dc-20250928174002", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11587
11602
  let mapError = (j, obj)=>({
11588
11603
  ...obj,
11589
11604
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -12408,6 +12423,7 @@ Help:
12408
12423
  LogType.warn,
12409
12424
  LogType.info,
12410
12425
  LogType.log,
12426
+ LogType.debug,
12411
12427
  LogType.group,
12412
12428
  LogType.groupEnd,
12413
12429
  LogType.groupCollapsed,
@@ -12479,7 +12495,7 @@ Help:
12479
12495
  object.hash = context.getStatsCompilation(compilation).hash;
12480
12496
  },
12481
12497
  version: (object)=>{
12482
- object.version = "5.75.0", object.rspackVersion = "1.5.8-canary-15732646-20250927173602";
12498
+ object.version = "5.75.0", object.rspackVersion = "1.5.8-canary-e88f22dc-20250928174002";
12483
12499
  },
12484
12500
  env: (object, _compilation, _context, { _env })=>{
12485
12501
  object.env = _env;
@@ -15804,7 +15820,7 @@ Help:
15804
15820
  let _options = JSON.stringify(options || {});
15805
15821
  return binding_default().transform(source, _options);
15806
15822
  }
15807
- let exports_rspackVersion = "1.5.8-canary-15732646-20250927173602", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
15823
+ let exports_rspackVersion = "1.5.8-canary-e88f22dc-20250928174002", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
15808
15824
  getNormalizedRspackOptions: getNormalizedRspackOptions,
15809
15825
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
15810
15826
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -15995,6 +16011,7 @@ Help:
15995
16011
  }
15996
16012
  },
15997
16013
  RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
16014
+ EsmLibraryPlugin: EsmLibraryPlugin,
15998
16015
  RsdoctorPlugin: RsdoctorPluginImpl,
15999
16016
  RstestPlugin: RstestPlugin,
16000
16017
  RslibPlugin: RslibPlugin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/core",
3
- "version": "1.5.8-canary-15732646-20250927173602",
3
+ "version": "1.5.8-canary-e88f22dc-20250928174002",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -60,7 +60,7 @@
60
60
  "dependencies": {
61
61
  "@module-federation/runtime-tools": "0.18.0",
62
62
  "@rspack/lite-tapable": "1.0.1",
63
- "@rspack/binding": "npm:@rspack-canary/binding@1.5.8-canary-15732646-20250927173602"
63
+ "@rspack/binding": "npm:@rspack-canary/binding@1.5.8-canary-e88f22dc-20250928174002"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@swc/helpers": ">=0.5.1"