@rspack-canary/core 1.6.8-canary-02b3377e-20251215174244 → 1.7.0-canary-a0fc091c-20251217174017

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.
@@ -289,9 +289,14 @@ export declare class Compilation {
289
289
  getLogger(name: string | (() => string)): Logger;
290
290
  fileDependencies: {
291
291
  [Symbol.iterator](): Generator<string, void, unknown>;
292
- has(dep: string): boolean;
292
+ has: (dep: string) => boolean;
293
293
  add: (dep: string) => void;
294
294
  addAll: (deps: Iterable<string>) => void;
295
+ delete: (dep: string) => boolean;
296
+ keys(): SetIterator<string>;
297
+ values(): SetIterator<string>;
298
+ entries(): SetIterator<[string, string]>;
299
+ readonly size: number;
295
300
  };
296
301
  get __internal__addedFileDependencies(): string[];
297
302
  get __internal__removedFileDependencies(): string[];
@@ -301,21 +306,36 @@ export declare class Compilation {
301
306
  get __internal__removedMissingDependencies(): string[];
302
307
  contextDependencies: {
303
308
  [Symbol.iterator](): Generator<string, void, unknown>;
304
- has(dep: string): boolean;
309
+ has: (dep: string) => boolean;
305
310
  add: (dep: string) => void;
306
311
  addAll: (deps: Iterable<string>) => void;
312
+ delete: (dep: string) => boolean;
313
+ keys(): SetIterator<string>;
314
+ values(): SetIterator<string>;
315
+ entries(): SetIterator<[string, string]>;
316
+ readonly size: number;
307
317
  };
308
318
  missingDependencies: {
309
319
  [Symbol.iterator](): Generator<string, void, unknown>;
310
- has(dep: string): boolean;
320
+ has: (dep: string) => boolean;
311
321
  add: (dep: string) => void;
312
322
  addAll: (deps: Iterable<string>) => void;
323
+ delete: (dep: string) => boolean;
324
+ keys(): SetIterator<string>;
325
+ values(): SetIterator<string>;
326
+ entries(): SetIterator<[string, string]>;
327
+ readonly size: number;
313
328
  };
314
329
  buildDependencies: {
315
330
  [Symbol.iterator](): Generator<string, void, unknown>;
316
- has(dep: string): boolean;
331
+ has: (dep: string) => boolean;
317
332
  add: (dep: string) => void;
318
333
  addAll: (deps: Iterable<string>) => void;
334
+ delete: (dep: string) => boolean;
335
+ keys(): SetIterator<string>;
336
+ values(): SetIterator<string>;
337
+ entries(): SetIterator<[string, string]>;
338
+ readonly size: number;
319
339
  };
320
340
  getStats(): Stats;
321
341
  createChildCompiler(name: string, outputOptions: OutputNormalized, plugins: RspackPluginInstance[]): Compiler;
@@ -25,6 +25,6 @@ export interface ResolveRequest {
25
25
  export declare class Resolver {
26
26
  #private;
27
27
  constructor(binding: binding.JsResolver);
28
- resolveSync(context: object, path: string, request: string): string | false;
29
- resolve(context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void;
28
+ resolveSync(_context: object, path: string, request: string): string | false;
29
+ resolve(_context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void;
30
30
  }
@@ -17,7 +17,7 @@ export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
17
17
  export interface EntryStaticNormalized {
18
18
  [k: string]: EntryDescriptionNormalized;
19
19
  }
20
- export type EntryDescriptionNormalized = Pick<EntryDescription, "runtime" | "chunkLoading" | "asyncChunks" | "publicPath" | "baseUri" | "filename" | "library" | "layer"> & {
20
+ export type EntryDescriptionNormalized = Pick<EntryDescription, "runtime" | "chunkLoading" | "wasmLoading" | "asyncChunks" | "publicPath" | "baseUri" | "filename" | "library" | "layer"> & {
21
21
  import?: string[];
22
22
  dependOn?: string[];
23
23
  };
@@ -120,9 +120,18 @@ export interface ExperimentsNormalized {
120
120
  buildHttp?: HttpUriPluginOptions;
121
121
  parallelLoader?: boolean;
122
122
  useInputFileSystem?: false | RegExp[];
123
+ /**
124
+ * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
125
+ */
123
126
  inlineConst?: boolean;
127
+ /**
128
+ * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
129
+ */
124
130
  inlineEnum?: boolean;
125
131
  typeReexportsPresence?: boolean;
132
+ /**
133
+ * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
134
+ */
126
135
  lazyBarrel?: boolean;
127
136
  nativeWatcher?: boolean;
128
137
  deferImport?: boolean;
@@ -858,8 +858,6 @@ export type JavascriptParserOptions = {
858
858
  * Enable magic comments for CommonJS require() expressions.
859
859
  */
860
860
  commonjsMagicComments?: boolean;
861
- /** Inline const values in this module */
862
- inlineConst?: boolean;
863
861
  /** Whether to tolerant exportsPresence for type reexport */
864
862
  typeReexportsPresence?: "no-tolerant" | "tolerant" | "tolerant-no-check";
865
863
  /** Whether to enable JSX parsing */
@@ -1881,6 +1879,13 @@ export type Optimization = {
1881
1879
  * The value is `false` in development mode.
1882
1880
  */
1883
1881
  mangleExports?: "size" | "deterministic" | boolean;
1882
+ /**
1883
+ * Allows to inline exports when possible to reduce code size.
1884
+ *
1885
+ * The value is `true` in production mode.
1886
+ * The value is `false` in development mode.
1887
+ */
1888
+ inlineExports?: boolean;
1884
1889
  /**
1885
1890
  * Tells Rspack to set process.env.NODE_ENV to a given string value.
1886
1891
  * @default false
@@ -2155,21 +2160,25 @@ export type Experiments = {
2155
2160
  /**
2156
2161
  * Enable inline const feature
2157
2162
  * @default false
2163
+ * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
2158
2164
  */
2159
2165
  inlineConst?: boolean;
2160
2166
  /**
2161
2167
  * Enable inline enum feature
2162
2168
  * @default false
2169
+ * @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
2163
2170
  */
2164
2171
  inlineEnum?: boolean;
2165
2172
  /**
2166
2173
  * Enable type reexports presence feature
2167
2174
  * @default false
2175
+ * @deprecated This option is deprecated, it's already stable. Rspack will remove this option in future version
2168
2176
  */
2169
2177
  typeReexportsPresence?: boolean;
2170
2178
  /**
2171
2179
  * Enable lazy make side effects free barrel file
2172
2180
  * @default false
2181
+ * @deprecated This option is deprecated, it's already stable and enabled by default, Rspack will remove this option in future version
2173
2182
  */
2174
2183
  lazyBarrel?: boolean;
2175
2184
  /**
package/dist/exports.d.ts CHANGED
@@ -56,6 +56,7 @@ export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
56
56
  export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
57
57
  export type { OutputFileSystem, WatchFileSystem } from "./util/fs";
58
58
  import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
59
+ export { SubresourceIntegrityPlugin };
59
60
  interface Web {
60
61
  FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
61
62
  }
@@ -142,11 +143,14 @@ interface Experiments {
142
143
  cleanup: () => Promise<void>;
143
144
  };
144
145
  RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin;
146
+ /**
147
+ * @deprecated Use `rspack.SubresourceIntegrityPlugin` instead
148
+ */
149
+ SubresourceIntegrityPlugin: typeof SubresourceIntegrityPlugin;
145
150
  EsmLibraryPlugin: typeof EsmLibraryPlugin;
146
151
  RsdoctorPlugin: typeof RsdoctorPlugin;
147
152
  RstestPlugin: typeof RstestPlugin;
148
153
  RslibPlugin: typeof RslibPlugin;
149
- SubresourceIntegrityPlugin: typeof SubresourceIntegrityPlugin;
150
154
  /**
151
155
  * @deprecated Use `rspack.lazyCompilationMiddleware` instead
152
156
  */
package/dist/index.js CHANGED
@@ -330,9 +330,10 @@ for(var __rspack_i in (()=>{
330
330
  ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
331
331
  MultiCompiler: ()=>MultiCompiler,
332
332
  SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
333
+ SubresourceIntegrityPlugin: ()=>SubresourceIntegrityPlugin,
333
334
  library: ()=>exports_library,
334
- node: ()=>exports_node,
335
335
  RuntimeGlobals: ()=>DefaultRuntimeGlobals,
336
+ node: ()=>exports_node,
336
337
  rspackVersion: ()=>exports_rspackVersion,
337
338
  util: ()=>util,
338
339
  optimize: ()=>optimize,
@@ -402,6 +403,7 @@ for(var __rspack_i in (()=>{
402
403
  SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
403
404
  Stats: ()=>Stats,
404
405
  StatsErrorCode: ()=>statsFactoryUtils_StatsErrorCode,
406
+ SubresourceIntegrityPlugin: ()=>SubresourceIntegrityPlugin,
405
407
  SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
406
408
  Template: ()=>Template,
407
409
  ValidationError: ()=>ValidationError,
@@ -1187,20 +1189,35 @@ for(var __rspack_i in (()=>{
1187
1189
  }
1188
1190
  }
1189
1191
  function createFakeCompilationDependencies(getDeps, addDeps) {
1190
- let addDepsCaller = new MergeCaller(addDeps);
1192
+ let addDepsCaller = new MergeCaller(addDeps), deletedDeps = new Set(), hasDep = (dep)=>!deletedDeps.has(dep) && (addDepsCaller.pendingData().includes(dep) || getDeps().includes(dep)), getAllDeps = ()=>{
1193
+ let deps = new Set([
1194
+ ...getDeps(),
1195
+ ...addDepsCaller.pendingData()
1196
+ ]);
1197
+ for (let deleted of deletedDeps)deps.delete(deleted);
1198
+ return deps;
1199
+ };
1191
1200
  return {
1192
1201
  *[Symbol.iterator] () {
1193
- for (let dep of new Set([
1194
- ...getDeps(),
1195
- ...addDepsCaller.pendingData()
1196
- ]))yield dep;
1202
+ for (let dep of getAllDeps())yield dep;
1197
1203
  },
1198
- has: (dep)=>addDepsCaller.pendingData().includes(dep) || getDeps().includes(dep),
1204
+ has: hasDep,
1199
1205
  add: (dep)=>{
1200
- addDepsCaller.push(dep);
1206
+ deletedDeps.delete(dep), addDepsCaller.push(dep);
1201
1207
  },
1202
1208
  addAll: (deps)=>{
1209
+ for (let dep of deps)deletedDeps.delete(dep);
1203
1210
  addDepsCaller.push(...deps);
1211
+ },
1212
+ delete: (dep)=>{
1213
+ let hadDep = hasDep(dep);
1214
+ return hadDep && deletedDeps.add(dep), hadDep;
1215
+ },
1216
+ keys: ()=>getAllDeps().keys(),
1217
+ values: ()=>getAllDeps().values(),
1218
+ entries: ()=>getAllDeps().entries(),
1219
+ get size () {
1220
+ return getAllDeps().size;
1204
1221
  }
1205
1222
  };
1206
1223
  }
@@ -1478,7 +1495,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1478
1495
  processAssetsHook.tap(getOptions(options), ()=>fn(...getArgs()));
1479
1496
  },
1480
1497
  tapAsync: (options, fn)=>{
1481
- processAssetsHook.tapAsync(getOptions(options), (assets, callback)=>fn(...getArgs(), callback));
1498
+ processAssetsHook.tapAsync(getOptions(options), (_assets, callback)=>fn(...getArgs(), callback));
1482
1499
  },
1483
1500
  tapPromise: (options, fn)=>{
1484
1501
  processAssetsHook.tapPromise(getOptions(options), ()=>fn(...getArgs()));
@@ -2171,7 +2188,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2171
2188
  for (let entry of desc.import)new EntryPlugin(context, entry, options).apply(compiler);
2172
2189
  }
2173
2190
  }
2174
- static entryDescriptionToOptions(compiler, name, desc) {
2191
+ static entryDescriptionToOptions(_compiler, name, desc) {
2175
2192
  return {
2176
2193
  name,
2177
2194
  filename: desc.filename,
@@ -2194,13 +2211,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2194
2211
  } : options)
2195
2212
  }), "make");
2196
2213
  function getRawEntryOptions(entry) {
2197
- let runtime = entry.runtime, chunkLoading = entry.chunkLoading;
2198
2214
  return {
2199
2215
  name: entry.name,
2200
2216
  publicPath: entry.publicPath,
2201
2217
  baseUri: entry.baseUri,
2202
- runtime,
2203
- chunkLoading,
2218
+ runtime: entry.runtime,
2219
+ chunkLoading: entry.chunkLoading,
2220
+ wasmLoading: entry.wasmLoading,
2204
2221
  asyncChunks: entry.asyncChunks,
2205
2222
  filename: entry.filename,
2206
2223
  library: entry.library,
@@ -2289,7 +2306,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2289
2306
  var config;
2290
2307
  let err, logger = compiler.getInfrastructureLogger(EsmLibraryPlugin.PLUGIN_NAME);
2291
2308
  if (!function(options, logger) {
2292
- options.optimization.concatenateModules = !1, options.optimization.removeEmptyChunks = !1, options.output.chunkFormat = !1, options.output.chunkLoading && "import" !== options.output.chunkLoading && (logger.warn(`\`output.chunkLoading\` should be \`"import"\` or \`false\`, but got ${options.output.chunkLoading}, changed it to \`"import"\``), options.output.chunkLoading = "import"), void 0 === options.output.chunkLoading && (options.output.chunkLoading = "import"), options.output.library && (options.output.library = void 0);
2309
+ options.optimization.concatenateModules = !1, options.optimization.removeEmptyChunks = !1, options.output.chunkFormat = !1, options.output.module = !0, options.output.chunkLoading && "import" !== options.output.chunkLoading && (logger.warn(`\`output.chunkLoading\` should be \`"import"\` or \`false\`, but got ${options.output.chunkLoading}, changed it to \`"import"\``), options.output.chunkLoading = "import"), void 0 === options.output.chunkLoading && (options.output.chunkLoading = "import"), options.output.library && (options.output.library = void 0);
2293
2310
  let { splitChunks } = options.optimization;
2294
2311
  void 0 === splitChunks && (splitChunks = options.optimization.splitChunks = {}), !1 !== splitChunks && (splitChunks.chunks = "all", splitChunks.minSize = 0, splitChunks.maxAsyncRequests = 1 / 0, splitChunks.maxInitialRequests = 1 / 0, splitChunks.cacheGroups ??= {}, splitChunks.cacheGroups.default = !1, splitChunks.cacheGroups.defaultVendors = !1);
2295
2312
  }(compiler.options, logger), new RemoveDuplicateModulesPlugin().apply(compiler), 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}`);
@@ -3975,7 +3992,6 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
3975
3992
  commonjs: parser.commonjs,
3976
3993
  importDynamic: parser.importDynamic,
3977
3994
  commonjsMagicComments: parser.commonjsMagicComments,
3978
- inlineConst: parser.inlineConst,
3979
3995
  typeReexportsPresence: parser.typeReexportsPresence,
3980
3996
  jsx: parser.jsx,
3981
3997
  deferImport: parser.deferImport
@@ -5766,12 +5782,16 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5766
5782
  if ("function" != typeof options.entry) for (let key of Object.keys(options.entry))F(options.entry[key], "import", ()=>[
5767
5783
  "./src"
5768
5784
  ]);
5769
- F(options, "devtool", ()=>!!development && "eval"), D(options, "watch", !1), D(options, "profile", !1), D(options, "lazyCompilation", !1), D(options, "bail", !1), F(options, "cache", ()=>development), !1 === options.cache && (options.experiments.cache = !1), applyExperimentsDefaults(options.experiments, {
5785
+ F(options, "devtool", ()=>!!development && "eval"), D(options, "watch", !1), D(options, "profile", !1), F(options, "lazyCompilation", ()=>!!targetProperties && !!targetProperties.web && !targetProperties.electron && !targetProperties.node && !targetProperties.nwjs && {
5786
+ imports: !0,
5787
+ entries: !1
5788
+ }), D(options, "bail", !1), F(options, "cache", ()=>development), !1 === options.cache && (options.experiments.cache = !1), applyExperimentsDefaults(options.experiments, {
5770
5789
  development
5771
5790
  }), applyOptimizationDefaults(options.optimization, {
5772
5791
  production,
5773
5792
  development,
5774
- css: options.experiments.css
5793
+ css: options.experiments.css,
5794
+ deprecatedInline: options.experiments.inlineConst || options.experiments.inlineEnum
5775
5795
  }), applySnapshotDefaults(options.snapshot, {
5776
5796
  production
5777
5797
  }), applyModuleDefaults(options.module, {
@@ -5781,17 +5801,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5781
5801
  targetProperties,
5782
5802
  mode: options.mode,
5783
5803
  uniqueName: options.output.uniqueName,
5784
- usedExports: !!options.optimization.usedExports,
5785
- inlineConst: options.experiments.inlineConst,
5786
5804
  deferImport: options.experiments.deferImport
5787
5805
  }), applyOutputDefaults(options.output, {
5788
5806
  context: options.context,
5789
5807
  targetProperties,
5790
5808
  isAffectedByBrowserslist: void 0 === target || "string" == typeof target && target.startsWith("browserslist") || Array.isArray(target) && target.some((target)=>target.startsWith("browserslist")),
5791
5809
  outputModule: options.experiments.outputModule,
5792
- development,
5793
- entry: options.entry,
5794
- futureDefaults: options.experiments.futureDefaults
5810
+ entry: options.entry
5795
5811
  }), applybundlerInfoDefaults(options.experiments.rspackFuture, options.output.library), applyExternalsPresetsDefaults(options.externalsPresets, {
5796
5812
  targetProperties,
5797
5813
  buildHttp: !!options.experiments.buildHttp
@@ -5814,17 +5830,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5814
5830
  let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
5815
5831
  D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
5816
5832
  }, applyExperimentsDefaults = (experiments, { development })=>{
5817
- 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);
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);
5818
5834
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
5819
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.8-canary-02b3377e-20251215174244"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5820
- }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
5821
- 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 })=>{
5835
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.7.0-canary-a0fc091c-20251217174017"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5836
+ }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, deferImport })=>{
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 })=>{
5822
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", [
5823
5839
  "..."
5824
- ]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", usedExports && inlineConst), D(parserOptions, "typeReexportsPresence", "no-tolerant"), D(parserOptions, "jsx", !1), D(parserOptions, "deferImport", deferImport);
5840
+ ]), D(parserOptions, "importMeta", !0), D(parserOptions, "typeReexportsPresence", "no-tolerant"), D(parserOptions, "jsx", !1), D(parserOptions, "deferImport", deferImport);
5825
5841
  })(module1.parser.javascript, {
5826
- usedExports,
5827
- inlineConst,
5828
5842
  deferImport
5829
5843
  }), F(module1.parser, "json", ()=>({})), assertNotNill(module1.parser.json), D(module1.parser.json, "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module1.generator, "json", ()=>({})), assertNotNill(module1.generator.json), D(module1.generator.json, "JSONParse", !0), css) {
5830
5844
  F(module1.parser, "css", ()=>({})), assertNotNill(module1.parser.css), D(module1.parser.css, "namedExports", !0), D(module1.parser.css, "url", !0), F(module1.parser, "css/auto", ()=>({})), assertNotNill(module1.parser["css/auto"]), D(module1.parser["css/auto"], "namedExports", !0), D(module1.parser["css/auto"], "url", !0), F(module1.parser, "css/module", ()=>({})), assertNotNill(module1.parser["css/module"]), D(module1.parser["css/module"], "namedExports", !0), D(module1.parser["css/module"], "url", !0), F(module1.generator, "css", ()=>({})), assertNotNill(module1.generator.css), D(module1.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator.css, "esModule", !0), F(module1.generator, "css/auto", ()=>({})), assertNotNill(module1.generator["css/auto"]), D(module1.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module1.generator["css/auto"], "exportsConvention", "as-is");
@@ -5945,15 +5959,20 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5945
5959
  type: "json"
5946
5960
  },
5947
5961
  type: "json"
5962
+ }, {
5963
+ with: {
5964
+ type: "text"
5965
+ },
5966
+ type: "asset/source"
5948
5967
  }), rules;
5949
5968
  });
5950
- }, applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist, development, entry, futureDefaults })=>{
5969
+ }, applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist, entry })=>{
5951
5970
  let getLibraryName = (library)=>{
5952
5971
  let libraryName = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library.name : library;
5953
5972
  return Array.isArray(libraryName) ? libraryName.join(".") : "object" == typeof libraryName ? getLibraryName(libraryName.root) : "string" == typeof libraryName ? libraryName : "";
5954
5973
  };
5955
5974
  F(output, "uniqueName", ()=>{
5956
- let libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (m, a, d1, d2, b, c)=>{
5975
+ let libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (_, a, d1, d2, b, c)=>{
5957
5976
  let content = a || b || c;
5958
5977
  return content.startsWith("\\") && content.endsWith("\\") ? `${d2 || ""}[${content.slice(1, -1)}]${d1 || ""}` : "";
5959
5978
  });
@@ -6066,7 +6085,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6066
6085
  if (tp) {
6067
6086
  if (tp.fetchWasm) return "fetch";
6068
6087
  if (tp.nodeBuiltins) return "async-node";
6069
- null === tp.nodeBuiltins || tp.fetchWasm;
6088
+ if ((null === tp.nodeBuiltins || null === tp.fetchWasm) && output.module && environment.dynamicImport) return "universal";
6070
6089
  }
6071
6090
  return !1;
6072
6091
  }), F(output, "workerWasmLoading", ()=>output.wasmLoading), F(output, "globalObject", ()=>{
@@ -6093,7 +6112,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6093
6112
  }), Array.from(enabledChunkLoadingTypes);
6094
6113
  }), A(output, "enabledWasmLoadingTypes", ()=>{
6095
6114
  let enabledWasmLoadingTypes = new Set();
6096
- return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), Array.from(enabledWasmLoadingTypes);
6115
+ return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
6116
+ desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
6117
+ }), Array.from(enabledWasmLoadingTypes);
6097
6118
  });
6098
6119
  }, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp })=>{
6099
6120
  D(externalsPresets, "web", !buildHttp && targetProperties?.web), D(externalsPresets, "node", targetProperties?.node), D(externalsPresets, "electron", targetProperties?.electron), D(externalsPresets, "electronMain", targetProperties?.electron && targetProperties.electronMain), D(externalsPresets, "electronPreload", targetProperties?.electron && targetProperties.electronPreload), D(externalsPresets, "electronRenderer", targetProperties?.electron && targetProperties.electronRenderer), D(externalsPresets, "nwjs", targetProperties?.nwjs);
@@ -6110,8 +6131,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6110
6131
  !1 !== node && (F(node, "global", ()=>!targetProperties?.global && "warn"), F(node, "__dirname", ()=>targetProperties?.node ? outputModule ? "node-module" : "eval-only" : "warn-mock"), F(node, "__filename", ()=>targetProperties?.node ? outputModule ? "node-module" : "eval-only" : "warn-mock"));
6111
6132
  }, applyPerformanceDefaults = (performance, { production })=>{
6112
6133
  !1 !== performance && (D(performance, "maxAssetSize", 250000), D(performance, "maxEntrypointSize", 250000), F(performance, "hints", ()=>!!production && "warning"));
6113
- }, applyOptimizationDefaults = (optimization, { production, development, css })=>{
6114
- D(optimization, "removeAvailableModules", !0), D(optimization, "removeEmptyChunks", !0), D(optimization, "mergeDuplicateChunks", !0), F(optimization, "moduleIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "chunkIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "sideEffects", ()=>!!production || "flag"), D(optimization, "mangleExports", production), D(optimization, "providedExports", !0), D(optimization, "usedExports", production), D(optimization, "innerGraph", production), D(optimization, "emitOnErrors", !production), D(optimization, "runtimeChunk", !1), D(optimization, "realContentHash", production), D(optimization, "avoidEntryIife", !1), D(optimization, "minimize", production), D(optimization, "concatenateModules", production), A(optimization, "minimizer", ()=>[
6134
+ }, applyOptimizationDefaults = (optimization, { production, development, css, deprecatedInline })=>{
6135
+ D(optimization, "removeAvailableModules", !0), D(optimization, "removeEmptyChunks", !0), D(optimization, "mergeDuplicateChunks", !0), F(optimization, "moduleIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "chunkIds", ()=>production ? "deterministic" : development ? "named" : "natural"), F(optimization, "sideEffects", ()=>!!production || "flag"), D(optimization, "mangleExports", production), D(optimization, "inlineExports", deprecatedInline && production), D(optimization, "providedExports", !0), D(optimization, "usedExports", production), D(optimization, "innerGraph", production), D(optimization, "emitOnErrors", !production), D(optimization, "runtimeChunk", !1), D(optimization, "realContentHash", production), D(optimization, "avoidEntryIife", !1), D(optimization, "minimize", production), D(optimization, "concatenateModules", production), A(optimization, "minimizer", ()=>[
6115
6136
  new SwcJsMinimizerRspackPlugin(),
6116
6137
  new LightningCssMinimizerRspackPlugin()
6117
6138
  ]), F(optimization, "nodeEnv", ()=>production ? "production" : !!development && "development");
@@ -6430,7 +6451,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6430
6451
  plugins: nestedArray(config.plugins, (p)=>[
6431
6452
  ...p
6432
6453
  ]),
6433
- experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`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.")(), experiments.parallelCodeSplitting && external_node_util_default().deprecate(()=>{}, "`experiments.parallelCodeSplitting` config has been deprecated and will be removed in next minor. It has huge regression in some edge cases where the chunk graph has lots of cycles, we'll improve the performance of build_chunk_graph in the future instead")(), {
6454
+ experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`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.")(), experiments.parallelCodeSplitting && external_node_util_default().deprecate(()=>{}, "`experiments.parallelCodeSplitting` config has been deprecated and will be removed in next minor. It has huge regression in some edge cases where the chunk graph has lots of cycles, we'll improve the performance of build_chunk_graph in the future instead")(), experiments.lazyBarrel && external_node_util_default().deprecate(()=>{}, "`experiments.lazyBarrel` config has been deprecated and will be removed in Rspack v2.0. Lazy barrel is already stable and enabled by default. Please remove this option from your Rspack configuration.")(), experiments.inlineConst && external_node_util_default().deprecate(()=>{}, "`experiments.inlineConst` config has been deprecated and will be removed in Rspack v2.0. Inline Const is already stable and enabled by default. Please remove this option from your Rspack configuration.")(), experiments.inlineEnum && external_node_util_default().deprecate(()=>{}, "`experiments.inlineEnum` config has been deprecated and will be removed in Rspack v2.0. Inline Enum is already stable. Please remove this option from your Rspack configuration.")(), experiments.typeReexportsPresence && external_node_util_default().deprecate(()=>{}, "`experiments.typeReexportsPresence` config has been deprecated and will be removed in Rspack v2.0. typeReexportsPresence is already stable. Please remove this option from your Rspack configuration.")(), {
6434
6455
  ...experiments,
6435
6456
  cache: optionalNestedConfig(experiments.cache, (cache)=>{
6436
6457
  if ("boolean" == typeof cache || "memory" === cache.type) return cache;
@@ -6449,7 +6470,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6449
6470
  managedPaths: optionalNestedArray(snapshot.managedPaths, (p)=>[
6450
6471
  ...p
6451
6472
  ]) || [
6452
- /\/node_modules\//
6473
+ /[\\/]node_modules[\\/][^.]/
6453
6474
  ]
6454
6475
  },
6455
6476
  storage: {
@@ -6916,7 +6937,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6916
6937
  constructor(fs){
6917
6938
  if (Object.assign(this, NOOP_FILESYSTEM), !fs) return;
6918
6939
  this.writeFile = memoizeFn(()=>external_node_util_default().promisify(fs.writeFile.bind(fs))), this.removeFile = memoizeFn(()=>external_node_util_default().promisify(fs.unlink.bind(fs))), this.mkdir = memoizeFn(()=>external_node_util_default().promisify(fs.mkdir.bind(fs))), this.mkdirp = memoizeFn(()=>external_node_util_default().promisify(mkdirp.bind(null, fs))), this.removeDirAll = memoizeFn(()=>external_node_util_default().promisify((function rmrf(fs, p, callback) {
6919
- fs.stat(p, (err, stats)=>{
6940
+ (fs.lstat || fs.stat)(p, (err, stats)=>{
6920
6941
  if (err) return "ENOENT" === err.code ? callback() : callback(err);
6921
6942
  stats.isDirectory() ? fs.readdir(p, (err, files)=>{
6922
6943
  if (err) return callback(err);
@@ -6971,7 +6992,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6971
6992
  readFn(fd, {
6972
6993
  position,
6973
6994
  length
6974
- }, (err, bytesRead, buffer)=>{
6995
+ }, (err, _bytesRead, buffer)=>{
6975
6996
  err ? resolve(err) : resolve(buffer);
6976
6997
  });
6977
6998
  });
@@ -7266,10 +7287,10 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7266
7287
  constructor(binding){
7267
7288
  this.#binding = binding;
7268
7289
  }
7269
- resolveSync(context, path, request) {
7290
+ resolveSync(_context, path, request) {
7270
7291
  return this.#binding.resolveSync(path, request) ?? !1;
7271
7292
  }
7272
- resolve(context, path, request, resolveContext, callback) {
7293
+ resolve(_context, path, request, resolveContext, callback) {
7273
7294
  this.#binding.resolve(path, request, (error, text)=>{
7274
7295
  if (error) return void callback(error);
7275
7296
  let req = text ? JSON.parse(text) : void 0;
@@ -7578,7 +7599,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7578
7599
  });
7579
7600
  }
7580
7601
  }
7581
- let CORE_VERSION = "1.6.8-canary-02b3377e-20251215174244", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7602
+ let CORE_VERSION = "1.7.0-canary-a0fc091c-20251217174017", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7582
7603
 
7583
7604
  Help:
7584
7605
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -8211,11 +8232,11 @@ Help:
8211
8232
  parser: Object.fromEntries(Object.entries(parser = module1.parser).map(([k, v])=>[
8212
8233
  k,
8213
8234
  getRawParserOptions(v, k)
8214
- ]).filter(([k, v])=>void 0 !== v)),
8235
+ ]).filter(([_, v])=>void 0 !== v)),
8215
8236
  generator: Object.fromEntries(Object.entries(generator = module1.generator).map(([k, v])=>[
8216
8237
  k,
8217
8238
  getRawGeneratorOptions(v, k)
8218
- ]).filter(([k, v])=>void 0 !== v)),
8239
+ ]).filter(([_, v])=>void 0 !== v)),
8219
8240
  noParse: module1.noParse,
8220
8241
  unsafeCache: module1.unsafeCache
8221
8242
  };
@@ -8887,7 +8908,7 @@ Help:
8887
8908
  obj.children = this.stats.map((stat, idx)=>{
8888
8909
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8889
8910
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8890
- }), childOptions.version && (obj.rspackVersion = "1.6.8-canary-02b3377e-20251215174244", 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-a0fc091c-20251217174017", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8891
8912
  let mapError = (j, obj)=>({
8892
8913
  ...obj,
8893
8914
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -9797,7 +9818,7 @@ Help:
9797
9818
  object.hash = context.getStatsCompilation(compilation).hash;
9798
9819
  },
9799
9820
  version: (object)=>{
9800
- object.version = "5.75.0", object.rspackVersion = "1.6.8-canary-02b3377e-20251215174244";
9821
+ object.version = "5.75.0", object.rspackVersion = "1.7.0-canary-a0fc091c-20251217174017";
9801
9822
  },
9802
9823
  env: (object, _compilation, _context, { _env })=>{
9803
9824
  object.env = _env;
@@ -9845,7 +9866,7 @@ Help:
9845
9866
  }), options.assetsSpace ?? 1 / 0);
9846
9867
  object.assets = limited.children, object.filteredAssets = limited.filteredChildren;
9847
9868
  },
9848
- chunks: (object, compilation, context, options, factory)=>{
9869
+ chunks: (object, compilation, context, _options, factory)=>{
9849
9870
  let { type, getStatsCompilation } = context, chunks = getStatsCompilation(compilation).chunks;
9850
9871
  object.chunks = factory.create(`${type}.chunks`, chunks, context);
9851
9872
  },
@@ -10299,8 +10320,8 @@ Help:
10299
10320
  warningsFilter: (value)=>(Array.isArray(value) ? value : value ? [
10300
10321
  value
10301
10322
  ] : []).map((filter)=>{
10302
- if ("string" == typeof filter) return (warning, warningString)=>warningString.includes(filter);
10303
- if (filter instanceof RegExp) return (warning, warningString)=>filter.test(warningString);
10323
+ if ("string" == typeof filter) return (_warning, warningString)=>warningString.includes(filter);
10324
+ if (filter instanceof RegExp) return (_warning, warningString)=>filter.test(warningString);
10304
10325
  if ("function" == typeof filter) return filter;
10305
10326
  throw Error(`Can only filter warnings with Strings or RegExps. (Given: ${filter})`);
10306
10327
  }),
@@ -11136,7 +11157,7 @@ Help:
11136
11157
  moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
11137
11158
  namespace: options.output.devtoolNamespace
11138
11159
  }).apply(compiler);
11139
- if (new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), (options.experiments.inlineConst || options.experiments.inlineEnum) && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin("size" !== options.optimization.mangleExports).apply(compiler), options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) for (let type of options.output.enabledLibraryTypes)new EnableLibraryPlugin(type).apply(compiler);
11160
+ if (new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.inlineExports && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin("size" !== options.optimization.mangleExports).apply(compiler), options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) for (let type of options.output.enabledLibraryTypes)new EnableLibraryPlugin(type).apply(compiler);
11140
11161
  options.optimization.splitChunks && new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler), options.optimization.removeEmptyChunks && new RemoveEmptyChunksPlugin().apply(compiler), options.optimization.realContentHash && new RealContentHashPlugin().apply(compiler);
11141
11162
  let moduleIds = options.optimization.moduleIds;
11142
11163
  if (moduleIds) switch(moduleIds){
@@ -12016,7 +12037,7 @@ Help:
12016
12037
  let _options = JSON.stringify(options || {});
12017
12038
  return binding_default().transform(source, _options);
12018
12039
  }
12019
- let exports_rspackVersion = "1.6.8-canary-02b3377e-20251215174244", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
12040
+ let exports_rspackVersion = "1.7.0-canary-a0fc091c-20251217174017", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
12020
12041
  getNormalizedRspackOptions: getNormalizedRspackOptions,
12021
12042
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
12022
12043
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -12124,7 +12145,7 @@ Help:
12124
12145
  }), sum;
12125
12146
  }, {}), manifestExposes = function(exposes) {
12126
12147
  if (!exposes) return;
12127
- let result = parseOptions(exposes, (value, key)=>({
12148
+ let result = parseOptions(exposes, (value)=>({
12128
12149
  import: Array.isArray(value) ? value : [
12129
12150
  value
12130
12151
  ],
@@ -12220,11 +12241,11 @@ Help:
12220
12241
  }
12221
12242
  },
12222
12243
  RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
12244
+ SubresourceIntegrityPlugin: SubresourceIntegrityPlugin,
12223
12245
  EsmLibraryPlugin: EsmLibraryPlugin,
12224
12246
  RsdoctorPlugin: RsdoctorPluginImpl,
12225
12247
  RstestPlugin: RstestPlugin,
12226
12248
  RslibPlugin: RslibPlugin,
12227
- SubresourceIntegrityPlugin: SubresourceIntegrityPlugin,
12228
12249
  lazyCompilationMiddleware: lazyCompilationMiddleware,
12229
12250
  swc: {
12230
12251
  minify: minify,
@@ -12335,7 +12356,7 @@ Help:
12335
12356
  }, exports_namespaceObject);
12336
12357
  src_fn.rspack = src_fn, src_fn.webpack = src_fn;
12337
12358
  let src_rspack_0 = src_fn, src_0 = src_rspack_0;
12338
- })(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.lazyCompilationMiddleware = __webpack_exports__.lazyCompilationMiddleware, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
12359
+ })(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SubresourceIntegrityPlugin = __webpack_exports__.SubresourceIntegrityPlugin, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.lazyCompilationMiddleware = __webpack_exports__.lazyCompilationMiddleware, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
12339
12360
  "AsyncDependenciesBlock",
12340
12361
  "BannerPlugin",
12341
12362
  "CircularDependencyRspackPlugin",
@@ -12381,6 +12402,7 @@ Help:
12381
12402
  "SourceMapDevToolPlugin",
12382
12403
  "Stats",
12383
12404
  "StatsErrorCode",
12405
+ "SubresourceIntegrityPlugin",
12384
12406
  "SwcJsMinimizerRspackPlugin",
12385
12407
  "Template",
12386
12408
  "ValidationError",
@@ -28,6 +28,6 @@ export declare class EntryOptionPlugin {
28
28
  * @param desc entry description
29
29
  * @returns options for the entry
30
30
  */
31
- static entryDescriptionToOptions(compiler: Compiler, name: string, desc: EntryDescriptionNormalized): EntryOptions;
31
+ static entryDescriptionToOptions(_compiler: Compiler, name: string, desc: EntryDescriptionNormalized): EntryOptions;
32
32
  }
33
33
  export default EntryOptionPlugin;
@@ -3,7 +3,12 @@ export type FakeHook<T> = T & {
3
3
  };
4
4
  export declare function createFakeCompilationDependencies(getDeps: () => string[], addDeps: (deps: string[]) => void): {
5
5
  [Symbol.iterator](): Generator<string, void, unknown>;
6
- has(dep: string): boolean;
6
+ has: (dep: string) => boolean;
7
7
  add: (dep: string) => void;
8
8
  addAll: (deps: Iterable<string>) => void;
9
+ delete: (dep: string) => boolean;
10
+ keys(): SetIterator<string>;
11
+ values(): SetIterator<string>;
12
+ entries(): SetIterator<[string, string]>;
13
+ readonly size: number;
9
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/core",
3
- "version": "1.6.8-canary-02b3377e-20251215174244",
3
+ "version": "1.7.0-canary-a0fc091c-20251217174017",
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.6.8-canary-02b3377e-20251215174244"
61
+ "@rspack/binding": "npm:@rspack-canary/binding@1.7.0-canary-a0fc091c-20251217174017"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@swc/helpers": ">=0.5.1"