@rspack-canary/core 1.7.0-canary-c8f933e3-20251224124051 → 1.7.0-canary-8fb5a12e-20251225173433

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/BuildInfo.d.ts +4 -4
  2. package/dist/Chunk.d.ts +3 -3
  3. package/dist/ChunkGraph.d.ts +3 -3
  4. package/dist/Chunks.d.ts +2 -2
  5. package/dist/Compilation.d.ts +40 -40
  6. package/dist/Compiler.d.ts +25 -22
  7. package/dist/ConcatenatedModule.d.ts +1 -1
  8. package/dist/ContextModule.d.ts +1 -1
  9. package/dist/ContextModuleFactory.d.ts +2 -2
  10. package/dist/Diagnostics.d.ts +2 -2
  11. package/dist/Entrypoint.d.ts +1 -1
  12. package/dist/ExecuteModulePlugin.d.ts +1 -1
  13. package/dist/ExportsInfo.d.ts +2 -2
  14. package/dist/ExternalModule.d.ts +1 -1
  15. package/dist/FileSystem.d.ts +3 -3
  16. package/dist/Module.d.ts +6 -6
  17. package/dist/ModuleGraph.d.ts +3 -3
  18. package/dist/MultiCompiler.d.ts +8 -8
  19. package/dist/MultiStats.d.ts +3 -3
  20. package/dist/MultiWatching.d.ts +3 -3
  21. package/dist/NativeWatchFileSystem.d.ts +5 -5
  22. package/dist/NormalModule.d.ts +6 -6
  23. package/dist/NormalModuleFactory.d.ts +4 -4
  24. package/dist/Resolver.d.ts +2 -2
  25. package/dist/ResolverFactory.d.ts +3 -3
  26. package/dist/RspackError.d.ts +2 -2
  27. package/dist/RuntimeGlobals.d.ts +2 -2
  28. package/dist/RuntimeModule.d.ts +4 -4
  29. package/dist/Stats.d.ts +4 -4
  30. package/dist/VirtualModulesPlugin.d.ts +1 -1
  31. package/dist/Watching.d.ts +5 -5
  32. package/dist/builtin-loader/index.d.ts +1 -1
  33. package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +1 -1
  34. package/dist/builtin-loader/swc/index.d.ts +5 -5
  35. package/dist/builtin-loader/swc/types.d.ts +10 -4
  36. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/{WarnCaseSensitiveModulesPlugin.d.ts → CaseSensitivePlugin.d.ts} +1 -1
  38. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +5 -10
  39. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -2
  40. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +2 -2
  42. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +2 -2
  43. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +4 -4
  45. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +3 -3
  47. package/dist/builtin-plugin/EntryPlugin.d.ts +3 -3
  48. package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -3
  52. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +2 -2
  53. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +3 -3
  54. package/dist/builtin-plugin/HttpUriPlugin.d.ts +4 -4
  55. package/dist/builtin-plugin/IgnorePlugin.d.ts +4 -4
  56. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +6 -6
  57. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +2 -2
  59. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +2 -2
  60. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +2 -2
  61. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +2 -2
  62. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +2 -2
  63. package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
  66. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +8 -8
  67. package/dist/builtin-plugin/RslibPlugin.d.ts +2 -2
  68. package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
  69. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/RuntimePlugin.d.ts +5 -5
  71. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  72. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +4 -4
  73. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +5 -5
  74. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -3
  75. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +3 -3
  76. package/dist/builtin-plugin/WorkerPlugin.d.ts +4 -4
  77. package/dist/builtin-plugin/base.d.ts +3 -3
  78. package/dist/builtin-plugin/css-extract/index.d.ts +7 -7
  79. package/dist/builtin-plugin/css-extract/loader.d.ts +2 -2
  80. package/dist/builtin-plugin/css-extract/utils.d.ts +1 -1
  81. package/dist/builtin-plugin/html-plugin/hooks.d.ts +4 -4
  82. package/dist/builtin-plugin/html-plugin/index.d.ts +2 -2
  83. package/dist/builtin-plugin/html-plugin/options.d.ts +6 -6
  84. package/dist/builtin-plugin/html-plugin/plugin.d.ts +5 -5
  85. package/dist/builtin-plugin/html-plugin/taps.d.ts +1 -1
  86. package/dist/builtin-plugin/index.d.ts +84 -84
  87. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  88. package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +2 -2
  89. package/dist/config/adapter.d.ts +7 -7
  90. package/dist/config/adapterRuleUse.d.ts +16 -16
  91. package/dist/config/browserslistTargetHandler.d.ts +1 -1
  92. package/dist/config/defaults.d.ts +11 -2
  93. package/dist/config/devServer.d.ts +32 -32
  94. package/dist/config/index.d.ts +5 -5
  95. package/dist/config/normalization.d.ts +9 -13
  96. package/dist/config/target.d.ts +6 -6
  97. package/dist/config/types.d.ts +75 -79
  98. package/dist/container/ContainerPlugin.d.ts +4 -4
  99. package/dist/container/ContainerReferencePlugin.d.ts +4 -4
  100. package/dist/container/ModuleFederationManifestPlugin.d.ts +6 -13
  101. package/dist/container/ModuleFederationPlugin.d.ts +6 -21
  102. package/dist/container/ModuleFederationPluginV1.d.ts +5 -5
  103. package/dist/container/index.d.ts +4 -4
  104. package/dist/cssExtractHmr.js +19 -19
  105. package/dist/cssExtractLoader.js +16 -16
  106. package/dist/exports.d.ts +76 -75
  107. package/dist/index.d.ts +3 -3
  108. package/dist/index.js +2101 -2473
  109. package/dist/lib/AbstractMethodError.d.ts +1 -1
  110. package/dist/lib/Cache.d.ts +2 -2
  111. package/dist/lib/CacheFacade.d.ts +3 -3
  112. package/dist/lib/DllPlugin.d.ts +1 -1
  113. package/dist/lib/DllReferencePlugin.d.ts +5 -5
  114. package/dist/lib/EntryOptionPlugin.d.ts +2 -2
  115. package/dist/lib/EnvironmentPlugin.d.ts +1 -1
  116. package/dist/lib/HookWebpackError.d.ts +2 -2
  117. package/dist/lib/IgnoreWarningsPlugin.d.ts +1 -1
  118. package/dist/lib/LoaderOptionsPlugin.d.ts +2 -2
  119. package/dist/lib/LoaderTargetPlugin.d.ts +2 -2
  120. package/dist/lib/WebpackError.d.ts +3 -3
  121. package/dist/lib/cache/MemoryCachePlugin.d.ts +1 -1
  122. package/dist/lib/cache/getLazyHashedEtag.d.ts +1 -1
  123. package/dist/lib/cache/mergeEtags.d.ts +1 -1
  124. package/dist/loader-runner/ModuleError.d.ts +1 -1
  125. package/dist/loader-runner/index.d.ts +3 -3
  126. package/dist/loader-runner/loadLoader.d.ts +2 -2
  127. package/dist/loader-runner/service.d.ts +8 -8
  128. package/dist/loader-runner/utils.d.ts +3 -3
  129. package/dist/loader-runner/worker.d.ts +3 -3
  130. package/dist/logging/createConsoleLogger.d.ts +4 -4
  131. package/dist/moduleFederationDefaultRuntime.js +1 -1
  132. package/dist/node/NodeEnvironmentPlugin.d.ts +2 -2
  133. package/dist/node/NodeTemplatePlugin.d.ts +1 -1
  134. package/dist/node/NodeWatchFileSystem.d.ts +3 -3
  135. package/dist/node/nodeConsole.d.ts +2 -2
  136. package/dist/rspack.d.ts +15 -6
  137. package/dist/rspackOptionsApply.d.ts +1 -1
  138. package/dist/sharing/ConsumeSharedPlugin.d.ts +3 -19
  139. package/dist/sharing/ProvideSharedPlugin.d.ts +4 -23
  140. package/dist/sharing/SharePlugin.d.ts +1 -37
  141. package/dist/sharing/ShareRuntimePlugin.d.ts +3 -3
  142. package/dist/sharing/utils.d.ts +0 -1
  143. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +15 -15
  144. package/dist/stats/DefaultStatsPresetPlugin.d.ts +1 -1
  145. package/dist/stats/DefaultStatsPrinterPlugin.d.ts +1 -1
  146. package/dist/stats/StatsFactory.d.ts +5 -5
  147. package/dist/stats/StatsPrinter.d.ts +3 -3
  148. package/dist/stats/statsFactoryUtils.d.ts +5 -5
  149. package/dist/swc.d.ts +2 -2
  150. package/dist/taps/compilation.d.ts +2 -2
  151. package/dist/taps/compiler.d.ts +1 -1
  152. package/dist/taps/contextModuleFactory.d.ts +1 -1
  153. package/dist/taps/index.d.ts +6 -6
  154. package/dist/taps/javascriptModules.d.ts +1 -1
  155. package/dist/taps/normalModuleFactory.d.ts +1 -1
  156. package/dist/taps/types.d.ts +3 -3
  157. package/dist/trace/index.d.ts +4 -4
  158. package/dist/trace/traceHookPlugin.d.ts +1 -1
  159. package/dist/util/SplitChunkSize.d.ts +1 -1
  160. package/dist/util/createHash.d.ts +1 -1
  161. package/dist/util/createReadonlyMap.d.ts +1 -1
  162. package/dist/util/fs.d.ts +14 -14
  163. package/dist/util/hash/wasm-hash.d.ts +1 -1
  164. package/dist/util/identifier.d.ts +1 -1
  165. package/dist/util/index.d.ts +2 -1
  166. package/dist/util/source.d.ts +2 -2
  167. package/dist/util/validateConfig.d.ts +1 -1
  168. package/dist/worker.js +111 -111
  169. package/hot/dev-server.js +64 -64
  170. package/hot/emitter.js +11 -11
  171. package/hot/lazy-compilation-node.js +41 -41
  172. package/hot/lazy-compilation-web.js +52 -52
  173. package/hot/log-apply-result.js +36 -36
  174. package/hot/log.js +30 -30
  175. package/hot/only-dev-server.js +92 -92
  176. package/hot/poll.js +31 -31
  177. package/hot/signal.js +53 -53
  178. package/module.d.ts +215 -215
  179. package/package.json +4 -4
  180. package/dist/sharing/CollectSharedEntryPlugin.d.ts +0 -22
  181. package/dist/sharing/IndependentSharedPlugin.d.ts +0 -35
  182. package/dist/sharing/SharedContainerPlugin.d.ts +0 -23
  183. package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +0 -14
  184. package/dist/sharing/TreeShakeSharedPlugin.d.ts +0 -19
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import WebpackError from "./WebpackError";
10
+ import WebpackError from './WebpackError';
11
11
  /**
12
12
  * Error for abstract method
13
13
  * @example
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import { AsyncParallelHook, AsyncSeriesBailHook, SyncHook } from "@rspack/lite-tapable";
11
- import type { WebpackError } from "./WebpackError";
10
+ import { AsyncParallelHook, AsyncSeriesBailHook, SyncHook } from '@rspack/lite-tapable';
11
+ import type { WebpackError } from './WebpackError';
12
12
  export interface Etag {
13
13
  toString(): string;
14
14
  }
@@ -7,9 +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 type { Cache, CallbackCache, Etag } from "./Cache";
11
- import type { HashableObject, HashConstructor } from "./cache/getLazyHashedEtag";
12
- import type WebpackError from "./WebpackError";
10
+ import type { Cache, CallbackCache, Etag } from './Cache';
11
+ import type { HashableObject, HashConstructor } from './cache/getLazyHashedEtag';
12
+ import type WebpackError from './WebpackError';
13
13
  type CallbackNormalErrorCache<T> = (err?: WebpackError | null, result?: T) => void;
14
14
  declare abstract class BaseCache {
15
15
  abstract get<T>(callback: CallbackCache<T>): void;
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Compiler } from "../Compiler";
10
+ import type { Compiler } from '../Compiler';
11
11
  export type DllPluginOptions = {
12
12
  /**
13
13
  * Context of requests in the manifest file (defaults to the webpack context).
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { JsBuildMeta } from "@rspack/binding";
11
- import type { Compiler } from "../Compiler";
10
+ import type { JsBuildMeta } from '@rspack/binding';
11
+ import type { Compiler } from '../Compiler';
12
12
  export type DllReferencePluginOptions = {
13
13
  /**
14
14
  * Context of requests in the manifest (or content property) as absolute path.
@@ -37,7 +37,7 @@ export type DllReferencePluginOptions = {
37
37
  /**
38
38
  * The way how the export of the dll bundle is used.
39
39
  */
40
- type?: "require" | "object";
40
+ type?: 'require' | 'object';
41
41
  } | {
42
42
  /**
43
43
  * The mappings from request to module info.
@@ -66,12 +66,12 @@ export type DllReferencePluginOptions = {
66
66
  /**
67
67
  * The way how the export of the dll bundle is used.
68
68
  */
69
- type?: "require" | "object";
69
+ type?: 'require' | 'object';
70
70
  };
71
71
  /**
72
72
  * The type how the dll is exposed (external type).
73
73
  */
74
- export type DllReferencePluginOptionsSourceType = "var" | "assign" | "this" | "window" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system";
74
+ export type DllReferencePluginOptionsSourceType = 'var' | 'assign' | 'this' | 'window' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system';
75
75
  /**
76
76
  * An object containing content, name and type.
77
77
  */
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Compiler, EntryDescriptionNormalized, EntryNormalized } from "..";
11
- import type { EntryOptions } from "../builtin-plugin";
10
+ import type { Compiler, EntryDescriptionNormalized, EntryNormalized } from '..';
11
+ import type { EntryOptions } from '../builtin-plugin';
12
12
  export declare class EntryOptionPlugin {
13
13
  /**
14
14
  * @param compiler the compiler instance one is tapping into
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Compiler } from "../Compiler";
10
+ import type { Compiler } from '../Compiler';
11
11
  declare class EnvironmentPlugin {
12
12
  keys: string[];
13
13
  defaultValues: Record<string, string | undefined | null>;
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Callback } from "@rspack/lite-tapable";
11
- import WebpackError from "./WebpackError";
10
+ import type { Callback } from '@rspack/lite-tapable';
11
+ import WebpackError from './WebpackError';
12
12
  export declare class HookWebpackError extends WebpackError {
13
13
  hook: string;
14
14
  error: Error;
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Compiler, IgnoreWarningsNormalized, RspackPluginInstance } from "..";
10
+ import type { Compiler, IgnoreWarningsNormalized, RspackPluginInstance } from '..';
11
11
  declare class IgnoreWarningsPlugin implements RspackPluginInstance {
12
12
  _ignorePattern: IgnoreWarningsNormalized;
13
13
  name: string;
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Compiler } from "../Compiler";
11
- import type { MatchObject } from "./ModuleFilenameHelpers";
10
+ import type { Compiler } from '../Compiler';
11
+ import type { MatchObject } from './ModuleFilenameHelpers';
12
12
  type LoaderOptionsPluginOptions = MatchObject & {
13
13
  [key: string]: unknown;
14
14
  };
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Compiler } from "../Compiler";
11
- import type { Target } from "../config";
10
+ import type { Compiler } from '../Compiler';
11
+ import type { Target } from '../config';
12
12
  export declare class LoaderTargetPlugin {
13
13
  readonly target: Target;
14
14
  /**
@@ -7,9 +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 type { DependencyLocation } from "@rspack/binding";
11
- import type { Chunk } from "../Chunk";
12
- import type { Module } from "../Module";
10
+ import type { DependencyLocation } from '@rspack/binding';
11
+ import type { Chunk } from '../Chunk';
12
+ import type { Module } from '../Module';
13
13
  export declare class WebpackError extends Error {
14
14
  loc?: DependencyLocation;
15
15
  file?: string;
@@ -1,4 +1,4 @@
1
- import type { Compiler } from "../../Compiler";
1
+ import type { Compiler } from '../../Compiler';
2
2
  export default class MemoryCachePlugin {
3
3
  static PLUGIN_NAME: string;
4
4
  apply(compiler: Compiler): void;
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type Hash from "../../util/hash";
10
+ import type Hash from '../../util/hash';
11
11
  export type HashConstructor = typeof Hash;
12
12
  export interface HashableObject {
13
13
  updateHash(hash: Hash): void;
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Etag } from "../Cache";
10
+ import type { Etag } from '../Cache';
11
11
  /**
12
12
  * @param first first
13
13
  * @param second second
@@ -1,4 +1,4 @@
1
- import WebpackError from "../lib/WebpackError";
1
+ import WebpackError from '../lib/WebpackError';
2
2
  export declare class ModuleError extends WebpackError {
3
3
  error?: Error;
4
4
  constructor(err: Error, { from }?: {
@@ -1,5 +1,5 @@
1
- import { type JsLoaderContext, type JsLoaderItem } from "@rspack/binding";
2
- import type { Compiler } from "../Compiler";
1
+ import { type JsLoaderContext, type JsLoaderItem } from '@rspack/binding';
2
+ import type { Compiler } from '../Compiler';
3
3
  export declare class LoaderObject {
4
4
  request: string;
5
5
  path: string;
@@ -10,7 +10,7 @@ export declare class LoaderObject {
10
10
  normal?: Function;
11
11
  pitch?: Function;
12
12
  raw?: boolean;
13
- type?: "module" | "commonjs";
13
+ type?: 'module' | 'commonjs';
14
14
  parallel?: boolean | {
15
15
  maxWorkers?: number;
16
16
  };
@@ -7,6 +7,6 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/loader-runner/blob/main/LICENSE
9
9
  */
10
- import type { Compiler } from "../exports";
11
- import type { LoaderObject } from ".";
10
+ import type { Compiler } from '../exports';
11
+ import type { LoaderObject } from '.';
12
12
  export default function loadLoader(loader: LoaderObject, compiler: Compiler, callback: (err: unknown) => void): void;
@@ -1,31 +1,31 @@
1
- import type { Tinypool } from "tinypool" with { "resolution-mode": "import" };
2
- type RunOptions = Parameters<Tinypool["run"]>[1];
1
+ import type { Tinypool } from 'tinypool' with { 'resolution-mode': 'import' };
2
+ type RunOptions = Parameters<Tinypool['run']>[1];
3
3
  export interface WorkerResponseMessage {
4
- type: "response";
4
+ type: 'response';
5
5
  id: number;
6
6
  data: any;
7
7
  }
8
8
  export interface WorkerResponseErrorMessage {
9
- type: "response-error";
9
+ type: 'response-error';
10
10
  id: number;
11
11
  error: WorkerError;
12
12
  }
13
13
  interface WorkerDoneMessage {
14
- type: "done";
14
+ type: 'done';
15
15
  data: WorkerArgs;
16
16
  }
17
17
  interface WorkerDoneErrorMessage {
18
- type: "done-error";
18
+ type: 'done-error';
19
19
  error: WorkerError;
20
20
  }
21
21
  export interface WorkerRequestMessage {
22
- type: "request";
22
+ type: 'request';
23
23
  id: number;
24
24
  requestType: RequestType;
25
25
  data: WorkerArgs;
26
26
  }
27
27
  export interface WorkerRequestSyncMessage {
28
- type: "request-sync";
28
+ type: 'request-sync';
29
29
  id: number;
30
30
  requestType: RequestSyncType;
31
31
  data: WorkerArgs;
@@ -1,6 +1,6 @@
1
- import type { LoaderContext } from "../config/adapterRuleUse";
2
- import type { Compiler } from "../exports";
3
- import type { LoaderObject } from ".";
1
+ import type { LoaderContext } from '../config/adapterRuleUse';
2
+ import type { Compiler } from '../exports';
3
+ import type { LoaderObject } from '.';
4
4
  export declare function convertArgs(args: any[], raw: boolean): void;
5
5
  export declare const loadLoader: (loaderObject: LoaderObject, compiler: Compiler) => Promise<void>;
6
6
  export declare const runSyncOrAsync: (arg1: Function, arg2: LoaderContext<{}>, arg3: any[]) => Promise<any[]>;
@@ -1,6 +1,6 @@
1
- import { type MessagePort } from "node:worker_threads";
2
- import { JsLoaderState } from "@rspack/binding";
3
- import type { LoaderContext } from "../config";
1
+ import { type MessagePort } from 'node:worker_threads';
2
+ import { JsLoaderState } from '@rspack/binding';
3
+ import type { LoaderContext } from '../config';
4
4
  interface WorkerOptions {
5
5
  loaderContext: LoaderContext;
6
6
  loaderState: JsLoaderState;
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { FilterTypes } from "../config";
11
- import { type LogTypeEnum } from "./Logger";
10
+ import type { FilterTypes } from '../config';
11
+ import { type LogTypeEnum } from './Logger';
12
12
  export type FilterFunction = (ident: string) => boolean;
13
13
  export type LoggerConsole = {
14
14
  clear: () => void;
@@ -27,9 +27,9 @@ export type LoggerConsole = {
27
27
  logTime?: (...args: any[]) => void;
28
28
  };
29
29
  export type LoggerOptions = {
30
- level: "none" | "error" | "warn" | "info" | "log" | "verbose" | boolean;
30
+ level: 'none' | 'error' | 'warn' | 'info' | 'log' | 'verbose' | boolean;
31
31
  debug: FilterTypes | boolean;
32
32
  console: LoggerConsole;
33
33
  };
34
- declare const createConsoleLogger: ({ level, debug, console }: LoggerOptions) => (name: string, type: LogTypeEnum, args: any[]) => void;
34
+ declare const createConsoleLogger: ({ level, debug, console, }: LoggerOptions) => (name: string, type: LogTypeEnum, args: any[]) => void;
35
35
  export { createConsoleLogger };
@@ -1 +1 @@
1
- var __module_federation_bundler_runtime__,__module_federation_runtime_plugins__,__module_federation_remote_infos__,__module_federation_container_name__,__module_federation_share_strategy__,__module_federation_share_fallbacks__,__module_federation_library_type__;module.exports=function(){if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var _ref;const remotesLoadingChunkMapping=(_ref=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&_ref!==void 0?_ref:{};var _ref1;const remotesLoadingModuleIdToRemoteDataMapping=(_ref1=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&_ref1!==void 0?_ref1:{};var _ref2;const initializeSharingScopeToInitDataMapping=(_ref2=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&_ref2!==void 0?_ref2:{};var _ref3;const consumesLoadingChunkMapping=(_ref3=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&_ref3!==void 0?_ref3:{};var _ref4;const consumesLoadingModuleToConsumeDataMapping=(_ref4=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&_ref4!==void 0?_ref4:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,"libraryType",()=>__module_federation_library_type__);early(__webpack_require__.federation,"sharedFallback",()=>__module_federation_share_fallbacks__);const sharedFallback=__webpack_require__.federation.sharedFallback;early(__webpack_require__.federation,"consumesLoadingModuleToHandlerMapping",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){var __webpack_require___federation_bundlerRuntime;consumesLoadingModuleToHandlerMapping[moduleId]={getter:sharedFallback?(__webpack_require___federation_bundlerRuntime=__webpack_require__.federation.bundlerRuntime)===null||__webpack_require___federation_bundlerRuntime===void 0?void 0:__webpack_require___federation_bundlerRuntime.getSharedFallbackGetter({shareKey:data.shareKey,factory:data.fallback,webpackRequire:__webpack_require__,libraryType:__webpack_require__.federation.libraryType}):data.fallback,treeshakeGetter:sharedFallback?data.fallback:undefined,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey,treeshake:__webpack_require__.federation.sharedFallback?{get:data.fallback,strategy:data.treeshakeStrategy}:undefined}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,"initOptions",()=>({}));early(__webpack_require__.federation.initOptions,"name",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,"shareStrategy",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,"shared",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage==="object"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion,treeshakeStrategy}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!=="undefined"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory,treeshake:treeshakeStrategy?{strategy:treeshakeStrategy}:undefined};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,"remotes",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType==="script"));merge(__webpack_require__.federation.initOptions,"plugins",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,"bundlerRuntimeOptions",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,"remotes",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,"S",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,"remotes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,"consumes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,"I",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,"initContainer",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,"getContainer",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module "'+module1+'" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.bundlerRuntime.init({webpackRequire:__webpack_require__});if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}};
1
+ var __module_federation_bundler_runtime__,__module_federation_runtime_plugins__,__module_federation_remote_infos__,__module_federation_container_name__,__module_federation_share_strategy__;module.exports=function(){if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var _ref,_ref1,_ref2,_ref3,_ref4;var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key,_;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){var _obj1,_key1,_1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key,_;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};const remotesLoadingChunkMapping=(_ref=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&_ref!==void 0?_ref:{};const remotesLoadingModuleIdToRemoteDataMapping=(_ref1=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&_ref1!==void 0?_ref1:{};const initializeSharingScopeToInitDataMapping=(_ref2=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&_ref2!==void 0?_ref2:{};const consumesLoadingChunkMapping=(_ref3=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&_ref3!==void 0?_ref3:{};const consumesLoadingModuleToConsumeDataMapping=(_ref4=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&_ref4!==void 0?_ref4:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,"consumesLoadingModuleToHandlerMapping",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,"initOptions",()=>({}));early(__webpack_require__.federation.initOptions,"name",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,"shareStrategy",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,"shared",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage==="object"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!=="undefined"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,"remotes",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType==="script"));merge(__webpack_require__.federation.initOptions,"plugins",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,"bundlerRuntimeOptions",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,"remotes",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,"S",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,"remotes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,"consumes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,"I",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,"initContainer",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,"getContainer",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module "'+module1+'" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}};
@@ -1,5 +1,5 @@
1
- import type { Compiler } from "..";
2
- import type { InfrastructureLogging } from "../config";
1
+ import type { Compiler } from '..';
2
+ import type { InfrastructureLogging } from '../config';
3
3
  export interface NodeEnvironmentPluginOptions {
4
4
  infrastructureLogging: InfrastructureLogging;
5
5
  }
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { Compiler } from "../Compiler";
10
+ import type { Compiler } from '../Compiler';
11
11
  export type NodeTemplatePluginOptions = {
12
12
  asyncChunkLoading?: boolean;
13
13
  };
@@ -7,12 +7,12 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type Watchpack from "../../compiled/watchpack";
11
- import type { FileSystemInfoEntry, InputFileSystem, Watcher, WatchFileSystem } from "../util/fs";
10
+ import type Watchpack from '../../compiled/watchpack';
11
+ import type { FileSystemInfoEntry, InputFileSystem, Watcher, WatchFileSystem } from '../util/fs';
12
12
  export default class NodeWatchFileSystem implements WatchFileSystem {
13
13
  inputFileSystem: InputFileSystem;
14
14
  watcherOptions: Watchpack.WatchOptions;
15
15
  watcher?: Watchpack;
16
16
  constructor(inputFileSystem: InputFileSystem);
17
- watch(files: Iterable<string>, directories: Iterable<string>, missing: Iterable<string>, startTime: number, options: Watchpack.WatchOptions, callback: (error: Error | null, fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, changedFiles: Set<string>, removedFiles: Set<string>) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher;
17
+ watch(files: Iterable<string>, directories: Iterable<string>, missing: Iterable<string>, startTime: number, options: Watchpack.WatchOptions, callback: (error: Error | null, fileTimeInfoEntries: Map<string, FileSystemInfoEntry | 'ignore'>, contextTimeInfoEntries: Map<string, FileSystemInfoEntry | 'ignore'>, changedFiles: Set<string>, removedFiles: Set<string>) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher;
18
18
  }
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { LoggerConsole } from "../logging/createConsoleLogger";
11
- export default function ({ colors, appendOnly, stream }: {
10
+ import type { LoggerConsole } from '../logging/createConsoleLogger';
11
+ export default function ({ colors, appendOnly, stream, }: {
12
12
  colors?: boolean;
13
13
  appendOnly?: boolean;
14
14
  stream: NodeJS.WritableStream;
package/dist/rspack.d.ts CHANGED
@@ -1,9 +1,18 @@
1
- import type { Callback } from "@rspack/lite-tapable";
2
- import { Compiler } from "./Compiler";
3
- import { type RspackOptions } from "./config";
4
- import { MultiCompiler, type MultiRspackOptions } from "./MultiCompiler";
5
- import MultiStats from "./MultiStats";
6
- import { Stats } from "./Stats";
1
+ /**
2
+ * The following code is modified based on
3
+ * https://github.com/webpack/webpack/blob/4b4ca3b/lib
4
+ *
5
+ * MIT Licensed
6
+ * Author Tobias Koppers @sokra
7
+ * Copyright (c) JS Foundation and other contributors
8
+ * https://github.com/webpack/webpack/blob/main/LICENSE
9
+ */
10
+ import type { Callback } from '@rspack/lite-tapable';
11
+ import { Compiler } from './Compiler';
12
+ import { type RspackOptions } from './config';
13
+ import { MultiCompiler, type MultiRspackOptions } from './MultiCompiler';
14
+ import MultiStats from './MultiStats';
15
+ import { Stats } from './Stats';
7
16
  declare function createMultiCompiler(options: MultiRspackOptions): MultiCompiler;
8
17
  declare function createCompiler(userOptions: RspackOptions): Compiler;
9
18
  declare function rspack(options: MultiRspackOptions): MultiCompiler;
@@ -1,4 +1,4 @@
1
- import type { Compiler, RspackOptionsNormalized } from ".";
1
+ import type { Compiler, RspackOptionsNormalized } from '.';
2
2
  export declare class RspackOptionsApply {
3
3
  process(options: RspackOptionsNormalized, compiler: Compiler): void;
4
4
  }
@@ -1,6 +1,6 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
- import { RspackBuiltinPlugin } from "../builtin-plugin/base";
3
- import type { Compiler } from "../Compiler";
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
2
+ import { RspackBuiltinPlugin } from '../builtin-plugin/base';
3
+ import type { Compiler } from '../Compiler';
4
4
  export type ConsumeSharedPluginOptions = {
5
5
  consumes: Consumes;
6
6
  shareScope?: string;
@@ -20,22 +20,7 @@ export type ConsumesConfig = {
20
20
  shareScope?: string;
21
21
  singleton?: boolean;
22
22
  strictVersion?: boolean;
23
- /**
24
- * Tree shaking strategy for the shared module.
25
- */
26
- treeshakeStrategy?: "server" | "infer";
27
23
  };
28
- export declare function normalizeConsumeShareOptions(consumes: Consumes, shareScope?: string): [string, {
29
- import: string | undefined;
30
- shareScope: string;
31
- shareKey: string;
32
- requiredVersion: string | false | undefined;
33
- strictVersion: boolean;
34
- packageName: string | undefined;
35
- singleton: boolean;
36
- eager: boolean;
37
- treeshakeStrategy: "server" | "infer" | undefined;
38
- }][];
39
24
  export declare class ConsumeSharedPlugin extends RspackBuiltinPlugin {
40
25
  name: BuiltinPluginName;
41
26
  _options: {
@@ -48,7 +33,6 @@ export declare class ConsumeSharedPlugin extends RspackBuiltinPlugin {
48
33
  packageName: string | undefined;
49
34
  singleton: boolean;
50
35
  eager: boolean;
51
- treeshakeStrategy: "server" | "infer" | undefined;
52
36
  }][];
53
37
  enhanced: boolean;
54
38
  };
@@ -1,6 +1,6 @@
1
- import { type BuiltinPlugin, BuiltinPluginName, type RawProvideOptions } from "@rspack/binding";
2
- import { RspackBuiltinPlugin } from "../builtin-plugin/base";
3
- import type { Compiler } from "../Compiler";
1
+ import { type BuiltinPlugin, BuiltinPluginName, type RawProvideOptions } from '@rspack/binding';
2
+ import { RspackBuiltinPlugin } from '../builtin-plugin/base';
3
+ import type { Compiler } from '../Compiler';
4
4
  export type ProvideSharedPluginOptions<Enhanced extends boolean = false> = {
5
5
  provides: Provides<Enhanced>;
6
6
  shareScope?: string;
@@ -23,29 +23,10 @@ type ProvidesEnhancedExtraConfig = {
23
23
  singleton?: boolean;
24
24
  strictVersion?: boolean;
25
25
  requiredVersion?: false | string;
26
- /**
27
- * Tree shaking strategy for the shared module.
28
- */
29
- treeshakeStrategy?: "server" | "infer";
30
26
  };
31
- export declare function normalizeProvideShareOptions<Enhanced extends boolean = false>(options: Provides<Enhanced>, shareScope?: string, enhanced?: boolean): [string, {
32
- shareKey: string;
33
- version: string | false | undefined;
34
- shareScope: string;
35
- eager: boolean;
36
- } | {
37
- singleton: boolean | undefined;
38
- requiredVersion: string | false | undefined;
39
- strictVersion: boolean | undefined;
40
- treeshakeStrategy: "server" | "infer" | undefined;
41
- shareKey: string;
42
- version: string | false | undefined;
43
- shareScope: string;
44
- eager: boolean;
45
- }][];
46
27
  export declare class ProvideSharedPlugin<Enhanced extends boolean = false> extends RspackBuiltinPlugin {
47
28
  name: BuiltinPluginName;
48
- _provides: [string, Omit<RawProvideOptions, "key">][];
29
+ _provides: [string, Omit<RawProvideOptions, 'key'>][];
49
30
  _enhanced?: Enhanced;
50
31
  constructor(options: ProvideSharedPluginOptions<Enhanced>);
51
32
  raw(compiler: Compiler): BuiltinPlugin;
@@ -1,4 +1,4 @@
1
- import type { Compiler } from "../Compiler";
1
+ import type { Compiler } from '../Compiler';
2
2
  export type SharePluginOptions = {
3
3
  shareScope?: string;
4
4
  shared: Shared;
@@ -9,11 +9,6 @@ export type SharedItem = string;
9
9
  export type SharedObject = {
10
10
  [k: string]: SharedConfig | SharedItem;
11
11
  };
12
- export type TreeshakeConfig = {
13
- usedExports?: string[];
14
- strategy?: "server" | "infer";
15
- filename?: string;
16
- };
17
12
  export type SharedConfig = {
18
13
  eager?: boolean;
19
14
  import?: false | SharedItem;
@@ -24,35 +19,7 @@ export type SharedConfig = {
24
19
  singleton?: boolean;
25
20
  strictVersion?: boolean;
26
21
  version?: false | string;
27
- treeshake?: TreeshakeConfig;
28
22
  };
29
- export type NormalizedSharedOptions = [string, SharedConfig][];
30
- export declare function normalizeSharedOptions(shared: Shared): NormalizedSharedOptions;
31
- export declare function createProvideShareOptions(normalizedSharedOptions: NormalizedSharedOptions): {
32
- [x: string]: {
33
- shareKey: string;
34
- shareScope: string | undefined;
35
- version: string | false | undefined;
36
- eager: boolean | undefined;
37
- singleton: boolean | undefined;
38
- requiredVersion: string | false | undefined;
39
- strictVersion: boolean | undefined;
40
- treeshakeStrategy: "server" | "infer" | undefined;
41
- };
42
- }[];
43
- export declare function createConsumeShareOptions(normalizedSharedOptions: NormalizedSharedOptions): {
44
- [x: string]: {
45
- import: string | false | undefined;
46
- shareKey: string;
47
- shareScope: string | undefined;
48
- requiredVersion: string | false | undefined;
49
- strictVersion: boolean | undefined;
50
- singleton: boolean | undefined;
51
- packageName: string | undefined;
52
- eager: boolean | undefined;
53
- treeshakeStrategy: "server" | "infer" | undefined;
54
- };
55
- }[];
56
23
  export declare class SharePlugin {
57
24
  _shareScope: string | undefined;
58
25
  _consumes: {
@@ -65,7 +32,6 @@ export declare class SharePlugin {
65
32
  singleton: boolean | undefined;
66
33
  packageName: string | undefined;
67
34
  eager: boolean | undefined;
68
- treeshakeStrategy: "server" | "infer" | undefined;
69
35
  };
70
36
  }[];
71
37
  _provides: {
@@ -77,11 +43,9 @@ export declare class SharePlugin {
77
43
  singleton: boolean | undefined;
78
44
  requiredVersion: string | false | undefined;
79
45
  strictVersion: boolean | undefined;
80
- treeshakeStrategy: "server" | "infer" | undefined;
81
46
  };
82
47
  }[];
83
48
  _enhanced: boolean;
84
- _sharedOptions: NormalizedSharedOptions;
85
49
  constructor(options: SharePluginOptions);
86
50
  apply(compiler: Compiler): void;
87
51
  }
@@ -1,6 +1,6 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
- import { RspackBuiltinPlugin } from "../builtin-plugin/base";
3
- import type { Compiler } from "../Compiler";
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
2
+ import { RspackBuiltinPlugin } from '../builtin-plugin/base';
3
+ import type { Compiler } from '../Compiler';
4
4
  export declare class ShareRuntimePlugin extends RspackBuiltinPlugin {
5
5
  private enhanced;
6
6
  name: BuiltinPluginName;
@@ -1,2 +1 @@
1
1
  export declare function isRequiredVersion(str: string): boolean;
2
- export declare const encodeName: (name: string, prefix?: string, withExt?: boolean) => string;