@rspack/core 1.4.0 → 1.4.1

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.
@@ -164,7 +164,7 @@ export declare class Compilation {
164
164
  finishModules: liteTapable.AsyncSeriesHook<[Iterable<Module>], void>;
165
165
  chunkHash: liteTapable.SyncHook<[Chunk, Hash], void>;
166
166
  chunkAsset: liteTapable.SyncHook<[Chunk, string], void>;
167
- processWarnings: liteTapable.SyncWaterfallHook<[Error[]]>;
167
+ processWarnings: liteTapable.SyncWaterfallHook<[WebpackError[]]>;
168
168
  succeedModule: liteTapable.SyncHook<[Module], void>;
169
169
  stillValidModule: liteTapable.SyncHook<[Module], void>;
170
170
  statsPreset: liteTapable.HookMap<liteTapable.SyncHook<[
@@ -9,7 +9,8 @@
9
9
  */
10
10
  import type { Compilation } from "../Compilation";
11
11
  import type { HttpUriPluginOptions } from "../builtin-plugin";
12
- import type { Amd, AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryDescription, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, Incremental, InfrastructureLogging, JavascriptParserOptions, LazyCompilationOptions, LibraryOptions, Loader, Mode, Name, NoParseOption, Node, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from "./types";
12
+ import type WebpackError from "../lib/WebpackError";
13
+ import type { Amd, AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryDescription, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, Incremental, InfrastructureLogging, LazyCompilationOptions, LibraryOptions, Loader, Mode, Name, NoParseOption, Node, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from "./types";
13
14
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
14
15
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
15
16
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -108,9 +109,10 @@ export interface ExperimentsNormalized {
108
109
  parallelLoader?: boolean;
109
110
  useInputFileSystem?: false | RegExp[];
110
111
  inlineConst?: boolean;
111
- typeReexportsPresence?: JavascriptParserOptions["typeReexportsPresence"];
112
+ inlineEnum?: boolean;
113
+ typeReexportsPresence?: boolean;
112
114
  }
113
- export type IgnoreWarningsNormalized = ((warning: Error, compilation: Compilation) => boolean)[];
115
+ export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
114
116
  export type OptimizationRuntimeChunkNormalized = false | {
115
117
  name: string | ((entrypoint: {
116
118
  name: string;
@@ -6,6 +6,7 @@ import type { Module } from "../Module";
6
6
  import type ModuleGraph from "../ModuleGraph";
7
7
  import type { HttpUriPluginOptions } from "../builtin-plugin/HttpUriPlugin";
8
8
  import type { Chunk } from "../exports";
9
+ import type WebpackError from "../lib/WebpackError";
9
10
  import type { ResolveCallback } from "./adapterRuleUse";
10
11
  import type { DevServerOptions } from "./devServer";
11
12
  export type FilenameTemplate = string;
@@ -2037,15 +2038,20 @@ export type Experiments = {
2037
2038
  */
2038
2039
  useInputFileSystem?: UseInputFileSystem;
2039
2040
  /**
2040
- * Enable inline constants
2041
+ * Enable inline const feature
2041
2042
  * @default false
2042
2043
  */
2043
2044
  inlineConst?: boolean;
2044
2045
  /**
2045
- * Enable inline constants
2046
+ * Enable inline enum feature
2046
2047
  * @default false
2047
2048
  */
2048
- typeReexportsPresence?: JavascriptParserOptions["typeReexportsPresence"];
2049
+ inlineEnum?: boolean;
2050
+ /**
2051
+ * Enable type reexports presence feature
2052
+ * @default false
2053
+ */
2054
+ typeReexportsPresence?: boolean;
2049
2055
  };
2050
2056
  export type Watch = boolean;
2051
2057
  /** Options for watch mode. */
@@ -2082,9 +2088,22 @@ export interface DevServer extends DevServerOptions {
2082
2088
  }
2083
2089
  export type { Middleware as DevServerMiddleware } from "./devServer";
2084
2090
  /**
2085
- * An array of either regular expressions or functions that determine if a warning should be ignored.
2091
+ * Ignore specific warnings.
2086
2092
  */
2087
- export type IgnoreWarnings = (RegExp | ((error: Error, compilation: Compilation) => boolean))[];
2093
+ export type IgnoreWarnings = (RegExp | {
2094
+ /**
2095
+ * A RegExp to select the origin file for the warning.
2096
+ */
2097
+ file?: RegExp;
2098
+ /**
2099
+ * A RegExp to select the warning message.
2100
+ */
2101
+ message?: RegExp;
2102
+ /**
2103
+ * A RegExp to select the origin module for the warning.
2104
+ */
2105
+ module?: RegExp;
2106
+ } | ((warning: WebpackError, compilation: Compilation) => boolean))[];
2088
2107
  /**
2089
2108
  * Capture a "profile" of the application, including statistics and hints, which can then be dissected using the Analyze tool.
2090
2109
  * */
@@ -400,11 +400,8 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
400
400
  parallelLoader: z.ZodOptional<z.ZodBoolean>;
401
401
  useInputFileSystem: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodCustom<RegExp, RegExp>>]>>;
402
402
  inlineConst: z.ZodOptional<z.ZodBoolean>;
403
- typeReexportsPresence: z.ZodOptional<z.ZodEnum<{
404
- "no-tolerant": "no-tolerant";
405
- tolerant: "tolerant";
406
- "tolerant-no-check": "tolerant-no-check";
407
- }>>;
403
+ inlineEnum: z.ZodOptional<z.ZodBoolean>;
404
+ typeReexportsPresence: z.ZodOptional<z.ZodBoolean>;
408
405
  }, z.core.$strict>>;
409
406
  externals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodCustom<RegExp, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>]>>]>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodCustom<RegExp, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>]>>]>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>]>>;
410
407
  externalsType: z.ZodOptional<z.ZodEnum<{
@@ -476,7 +473,11 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
476
473
  global: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"warn">]>>;
477
474
  }, z.core.$strict>]>>;
478
475
  loader: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
479
- ignoreWarnings: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodCustom<RegExp, RegExp>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>>>;
476
+ ignoreWarnings: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodCustom<RegExp, RegExp>, z.ZodCustom<(...args: unknown[]) => any, (...args: unknown[]) => any>]>, z.ZodObject<{
477
+ file: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
478
+ message: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
479
+ module: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
480
+ }, z.core.$strip>]>>>;
480
481
  watchOptions: z.ZodOptional<z.ZodObject<{
481
482
  aggregateTimeout: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodLiteral<number>]>>;
482
483
  followSymlinks: z.ZodOptional<z.ZodBoolean>;
package/dist/index.js CHANGED
@@ -356,7 +356,7 @@ for(var __webpack_i__ in (()=>{
356
356
  Compiler: ()=>Compiler,
357
357
  wasm: ()=>exports_wasm
358
358
  });
359
- var RequestType, StatsErrorCode, _computedKey, Compilation_computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
359
+ var RequestType, StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
360
360
  __webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
361
361
  resolve: ()=>browserslistTargetHandler_resolve
362
362
  });
@@ -880,18 +880,22 @@ for(var __webpack_i__ in (()=>{
880
880
  }
881
881
  let external_node_util_namespaceObject = require("node:util");
882
882
  var external_node_util_default = __webpack_require__.n(external_node_util_namespaceObject);
883
- _computedKey = external_node_util_namespaceObject.inspect.custom;
884
- let WebpackError = class extends Error {
883
+ class WebpackError_WebpackError extends Error {
885
884
  loc;
886
885
  file;
887
886
  chunk;
888
887
  module;
889
888
  details;
890
889
  hideStack;
891
- [_computedKey]() {
890
+ }
891
+ Object.defineProperty(WebpackError_WebpackError.prototype, external_node_util_namespaceObject.inspect.custom, {
892
+ value: function() {
892
893
  return this.stack + (this.details ? `\n${this.details}` : "");
893
- }
894
- }, LogType = Object.freeze({
894
+ },
895
+ enumerable: !1,
896
+ configurable: !0
897
+ });
898
+ let WebpackError = WebpackError_WebpackError, LogType = Object.freeze({
895
899
  error: "error",
896
900
  warn: "warn",
897
901
  info: "info",
@@ -1574,7 +1578,7 @@ for(var __webpack_i__ in (()=>{
1574
1578
  let checkCompilation = (compilation)=>{
1575
1579
  if (!(compilation instanceof Compilation)) throw TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
1576
1580
  };
1577
- Compilation_computedKey = binding_.COMPILATION_HOOKS_MAP_SYMBOL;
1581
+ _computedKey = binding_.COMPILATION_HOOKS_MAP_SYMBOL;
1578
1582
  class Compilation {
1579
1583
  #inner;
1580
1584
  #shutdown;
@@ -1601,7 +1605,7 @@ for(var __webpack_i__ in (()=>{
1601
1605
  needAdditionalPass;
1602
1606
  #addIncludeDispatcher;
1603
1607
  #addEntryDispatcher;
1604
- [Compilation_computedKey];
1608
+ [_computedKey];
1605
1609
  constructor(compiler, inner){
1606
1610
  this.#inner = inner, this.#shutdown = !1;
1607
1611
  let processAssetsHook = new lite_tapable_namespaceObject.AsyncSeriesHook([
@@ -9390,9 +9394,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9390
9394
  css: options.experiments.css,
9391
9395
  targetProperties,
9392
9396
  mode: options.mode,
9393
- uniqueName: options.output.uniqueName,
9394
- inlineConst: options.experiments.inlineConst,
9395
- typeReexportsPresence: options.experiments.typeReexportsPresence
9397
+ uniqueName: options.output.uniqueName
9396
9398
  }), applyOutputDefaults(options.output, {
9397
9399
  context: options.context,
9398
9400
  targetProperties,
@@ -9429,17 +9431,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9429
9431
  let tty = infrastructureLogging.stream.isTTY && "dumb" !== process.env.TERM;
9430
9432
  D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
9431
9433
  }, applyExperimentsDefaults = (experiments, { production, development })=>{
9432
- 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), 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", !0), 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", !0), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "typeReexportsPresence", "no-tolerant");
9434
+ 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), 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", !0), 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", !0), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1);
9433
9435
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
9434
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.0"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
9435
- }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions, inlineConst, typeReexportsPresence)=>{
9436
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.1"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
9437
+ }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
9436
9438
  D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !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, "importDynamic", !0), D(parserOptions, "worker", [
9437
9439
  "..."
9438
- ]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", inlineConst), D(parserOptions, "typeReexportsPresence", typeReexportsPresence);
9440
+ ]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", !1), D(parserOptions, "typeReexportsPresence", "no-tolerant");
9439
9441
  }, applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
9440
9442
  D(generatorOptions, "JSONParse", !0);
9441
- }, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, inlineConst, typeReexportsPresence })=>{
9442
- 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), applyJavascriptParserOptionsDefaults(module.parser.javascript, inlineConst, typeReexportsPresence), defaults_F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), defaults_F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css) {
9443
+ }, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName })=>{
9444
+ 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), applyJavascriptParserOptionsDefaults(module.parser.javascript), defaults_F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), defaults_F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css) {
9443
9445
  defaults_F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), defaults_F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), defaults_F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), defaults_F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), defaults_F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is");
9444
9446
  let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
9445
9447
  D(module.generator["css/auto"], "localIdentName", localIdentName), D(module.generator["css/auto"], "esModule", !0), defaults_F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", localIdentName), D(module.generator["css/module"], "esModule", !0);
@@ -9854,7 +9856,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9854
9856
  }, getPnpDefault = ()=>!!process.versions.pnp, getNormalizedRspackOptions = (config)=>{
9855
9857
  let fn;
9856
9858
  return {
9857
- ignoreWarnings: void 0 !== config.ignoreWarnings ? config.ignoreWarnings.map((ignore)=>"function" == typeof ignore ? ignore : (warning)=>ignore.test(warning.message)) : void 0,
9859
+ ignoreWarnings: config.ignoreWarnings ? config.ignoreWarnings.map((ignore)=>{
9860
+ if ("function" == typeof ignore) return ignore;
9861
+ let i = ignore instanceof RegExp ? {
9862
+ message: ignore
9863
+ } : ignore;
9864
+ return (warning)=>(!!i.message || !!i.module || !!i.file) && (!i.message || !!i.message.test(warning.message)) && (!i.module || !!warning.module && !!i.module.test(warning.module.readableIdentifier())) && (!i.file || !!warning.file && !!i.file.test(warning.file));
9865
+ }) : void 0,
9858
9866
  name: config.name,
9859
9867
  dependencies: config.dependencies,
9860
9868
  context: config.context,
@@ -10331,7 +10339,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
10331
10339
  },
10332
10340
  arm: "gnueabihf"
10333
10341
  }
10334
- }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.0", getAddonPlatformArchAbi = ()=>{
10342
+ }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.1", getAddonPlatformArchAbi = ()=>{
10335
10343
  let { platform, arch } = process, binding = "";
10336
10344
  binding += platform;
10337
10345
  let abi = NodePlatformArchToAbi[platform][arch];
@@ -11630,7 +11638,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11630
11638
  obj.children = this.stats.map((stat, idx)=>{
11631
11639
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
11632
11640
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
11633
- }), childOptions.version && (obj.rspackVersion = "1.4.0", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11641
+ }), childOptions.version && (obj.rspackVersion = "1.4.1", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11634
11642
  let mapError = (j, obj)=>({
11635
11643
  ...obj,
11636
11644
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -12533,7 +12541,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12533
12541
  object.hash = context.getStatsCompilation(compilation).hash;
12534
12542
  },
12535
12543
  version: (object)=>{
12536
- object.version = "5.75.0", object.rspackVersion = "1.4.0";
12544
+ object.version = "5.75.0", object.rspackVersion = "1.4.1";
12537
12545
  },
12538
12546
  env: (object, _compilation, _context, { _env })=>{
12539
12547
  object.env = _env;
@@ -15563,14 +15571,19 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
15563
15571
  parallelLoader: schemas_boolean(),
15564
15572
  useInputFileSystem: useInputFileSystem,
15565
15573
  inlineConst: schemas_boolean(),
15566
- typeReexportsPresence: typeReexportsPresence
15574
+ inlineEnum: schemas_boolean(),
15575
+ typeReexportsPresence: schemas_boolean()
15567
15576
  }).partial(), watch = schemas_boolean(), watchOptions = strictObject({
15568
15577
  aggregateTimeout: numberOrInfinity,
15569
15578
  followSymlinks: schemas_boolean(),
15570
15579
  ignored: schemas_string().array().or(_instanceof(RegExp)).or(schemas_string()),
15571
15580
  poll: numberOrInfinity.or(schemas_boolean()),
15572
15581
  stdin: schemas_boolean()
15573
- }).partial(), devServer = custom(), ignoreWarnings = _instanceof(RegExp).or(anyFunction).array(), profile = schemas_boolean(), amd = literal(!1).or(record(schemas_string(), any())), bail = schemas_boolean(), performance = strictObject({
15582
+ }).partial(), devServer = custom(), ignoreWarnings = _instanceof(RegExp).or(anyFunction).or(schemas_object({
15583
+ file: _instanceof(RegExp).optional(),
15584
+ message: _instanceof(RegExp).optional(),
15585
+ module: _instanceof(RegExp).optional()
15586
+ })).array(), profile = schemas_boolean(), amd = literal(!1).or(record(schemas_string(), any())), bail = schemas_boolean(), performance = strictObject({
15574
15587
  assetFilter: anyFunction,
15575
15588
  hints: schemas_enum([
15576
15589
  "error",
@@ -16008,7 +16021,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
16008
16021
  let _options = JSON.stringify(options || {});
16009
16022
  return binding_default().transform(source, _options);
16010
16023
  }
16011
- let exports_rspackVersion = "1.4.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
16024
+ let exports_rspackVersion = "1.4.1", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
16012
16025
  getNormalizedRspackOptions: getNormalizedRspackOptions,
16013
16026
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
16014
16027
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -7,10 +7,9 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import { inspect } from "node:util";
10
+ import type { DependencyLocation } from "@rspack/binding";
11
11
  import type { Chunk } from "../Chunk";
12
12
  import type { Module } from "../Module";
13
- type DependencyLocation = any;
14
13
  export declare class WebpackError extends Error {
15
14
  loc?: DependencyLocation;
16
15
  file?: string;
@@ -18,6 +17,5 @@ export declare class WebpackError extends Error {
18
17
  module?: Module;
19
18
  details?: string;
20
19
  hideStack?: boolean;
21
- [inspect.custom](): string;
22
20
  }
23
21
  export default WebpackError;
package/dist/worker.js CHANGED
@@ -184,19 +184,23 @@ var __webpack_modules__ = {
184
184
  j: ()=>createHash
185
185
  });
186
186
  let external_node_crypto_namespaceObject = require("node:crypto");
187
- var _computedKey, external_node_crypto_default = __webpack_require__.n(external_node_crypto_namespaceObject);
188
- _computedKey = __webpack_require__("node:util").inspect.custom;
189
- let lib_WebpackError = class extends Error {
187
+ var external_node_crypto_default = __webpack_require__.n(external_node_crypto_namespaceObject), external_node_util_ = __webpack_require__("node:util");
188
+ class WebpackError_WebpackError extends Error {
190
189
  loc;
191
190
  file;
192
191
  chunk;
193
192
  module;
194
193
  details;
195
194
  hideStack;
196
- [_computedKey]() {
195
+ }
196
+ Object.defineProperty(WebpackError_WebpackError.prototype, external_node_util_.inspect.custom, {
197
+ value: function() {
197
198
  return this.stack + (this.details ? `\n${this.details}` : "");
198
- }
199
- }, CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/;
199
+ },
200
+ enumerable: !1,
201
+ configurable: !0
202
+ });
203
+ let WebpackError = WebpackError_WebpackError, CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/;
200
204
  function createMessage(method) {
201
205
  return `Abstract method${method ? ` ${method}` : ""}. Must be overridden.`;
202
206
  }
@@ -207,7 +211,7 @@ var __webpack_modules__ = {
207
211
  this.message = match?.[1] ? createMessage(match[1]) : createMessage();
208
212
  }
209
213
  }
210
- class AbstractMethodError extends lib_WebpackError {
214
+ class AbstractMethodError extends WebpackError {
211
215
  constructor(){
212
216
  super(new Message().message), this.name = "AbstractMethodError";
213
217
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -57,7 +57,7 @@
57
57
  "dependencies": {
58
58
  "@module-federation/runtime-tools": "0.15.0",
59
59
  "@rspack/lite-tapable": "1.0.1",
60
- "@rspack/binding": "1.4.0"
60
+ "@rspack/binding": "1.4.1"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@swc/helpers": ">=0.5.1"