@rspack/core 0.7.2-canary-fdfff21-20240606140946 → 0.7.2-canary-3dcf0a9-20240607151650

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 (93) hide show
  1. package/dist/Compilation.d.ts +49 -5
  2. package/dist/Compilation.js +25 -43
  3. package/dist/Compiler.d.ts +5 -5
  4. package/dist/Compiler.js +9 -9
  5. package/dist/ContextModuleFactory.d.ts +1 -1
  6. package/dist/MultiCompiler.d.ts +1 -1
  7. package/dist/MultiCompiler.js +1 -1
  8. package/dist/NormalModule.js +1 -1
  9. package/dist/NormalModuleFactory.d.ts +1 -1
  10. package/dist/Stats.d.ts +1 -3
  11. package/dist/Stats.js +1 -26
  12. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  13. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  14. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  15. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  16. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  17. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  18. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  21. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  23. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/DynamicEntryPlugin.js +1 -1
  28. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -3
  36. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/SplitChunksPlugin.js +1 -1
  66. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/WorkerPlugin.js +1 -1
  71. package/dist/builtin-plugin/base.d.ts +1 -1
  72. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  73. package/dist/config/defaults.js +1 -1
  74. package/dist/config/normalization.d.ts +1 -1
  75. package/dist/config/zod.d.ts +795 -399
  76. package/dist/config/zod.js +58 -4
  77. package/dist/container/ContainerPlugin.d.ts +1 -1
  78. package/dist/container/ContainerReferencePlugin.d.ts +2 -2
  79. package/dist/container/ContainerReferencePlugin.js +1 -1
  80. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  81. package/dist/loader-runner/index.js +1 -1
  82. package/dist/node/NodeEnvironmentPlugin.js +1 -1
  83. package/dist/node/NodeWatchFileSystem.d.ts +1 -1
  84. package/dist/rspack.d.ts +1 -1
  85. package/dist/rspack.js +3 -3
  86. package/dist/rspackOptionsApply.js +3 -1
  87. package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
  88. package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
  89. package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
  90. package/dist/stats/DefaultStatsPresetPlugin.d.ts +4 -0
  91. package/dist/stats/DefaultStatsPresetPlugin.js +307 -0
  92. package/dist/stats/statsFactoryUtils.d.ts +1 -6
  93. package/package.json +4 -4
@@ -11,18 +11,18 @@
11
11
  import type { ExternalObject, JsCompilation, JsModule, JsPathData, JsRuntimeModule, JsStatsError, JsStatsWarning } from "@rspack/binding";
12
12
  import * as tapable from "tapable";
13
13
  import { Source } from "webpack-sources";
14
- import { Filename, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance, StatsOptions, StatsValue } from "./config";
15
14
  import { ContextModuleFactory } from "./ContextModuleFactory";
15
+ import { Filename, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance, StatsOptions, StatsValue } from "./config";
16
16
  import * as liteTapable from "./lite-tapable";
17
17
  import ResolverFactory = require("./ResolverFactory");
18
18
  import { Chunk } from "./Chunk";
19
19
  import { ChunkGraph } from "./ChunkGraph";
20
20
  import { Compiler } from "./Compiler";
21
21
  import { Entrypoint } from "./Entrypoint";
22
- import { Logger } from "./logging/Logger";
23
22
  import { CodeGenerationResult, Module } from "./Module";
24
23
  import { NormalModuleFactory } from "./NormalModuleFactory";
25
- import { Stats } from "./Stats";
24
+ import { Stats, StatsAsset, StatsError, StatsModule } from "./Stats";
25
+ import { Logger } from "./logging/Logger";
26
26
  import { StatsFactory } from "./stats/StatsFactory";
27
27
  import { StatsPrinter } from "./stats/StatsPrinter";
28
28
  import { type AssetInfo } from "./util/AssetInfo";
@@ -60,7 +60,46 @@ export interface ExecuteModuleArgument {
60
60
  export interface ExecuteModuleContext {
61
61
  __webpack_require__: (id: string) => any;
62
62
  }
63
- type CreateStatsOptionsContext = KnownCreateStatsOptionsContext & Record<string, any>;
63
+ export interface KnownNormalizedStatsOptions {
64
+ context: string;
65
+ chunksSort: string;
66
+ modulesSort: string;
67
+ chunkModulesSort: string;
68
+ nestedModulesSort: string;
69
+ assetsSort: string;
70
+ ids: boolean;
71
+ cachedAssets: boolean;
72
+ groupAssetsByEmitStatus: boolean;
73
+ groupAssetsByPath: boolean;
74
+ groupAssetsByExtension: boolean;
75
+ assetsSpace: number;
76
+ excludeAssets: ((value: string, asset: StatsAsset) => boolean)[];
77
+ excludeModules: ((name: string, module: StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean)[];
78
+ warningsFilter: ((warning: StatsError, textValue: string) => boolean)[];
79
+ cachedModules: boolean;
80
+ orphanModules: boolean;
81
+ dependentModules: boolean;
82
+ runtimeModules: boolean;
83
+ groupModulesByCacheStatus: boolean;
84
+ groupModulesByLayer: boolean;
85
+ groupModulesByAttributes: boolean;
86
+ groupModulesByPath: boolean;
87
+ groupModulesByExtension: boolean;
88
+ groupModulesByType: boolean;
89
+ entrypoints: boolean | "auto";
90
+ chunkGroups: boolean;
91
+ chunkGroupAuxiliary: boolean;
92
+ chunkGroupChildren: boolean;
93
+ chunkGroupMaxAssets: number;
94
+ modulesSpace: number;
95
+ chunkModulesSpace: number;
96
+ nestedModulesSpace: number;
97
+ logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
98
+ loggingDebug: ((value: string) => boolean)[];
99
+ loggingTrace: boolean;
100
+ }
101
+ export type CreateStatsOptionsContext = KnownCreateStatsOptionsContext & Record<string, any>;
102
+ export type NormalizedStatsOptions = KnownNormalizedStatsOptions & Omit<StatsOptions, keyof KnownNormalizedStatsOptions> & Record<string, any>;
64
103
  export declare class Compilation {
65
104
  #private;
66
105
  hooks: {
@@ -84,6 +123,11 @@ export declare class Compilation {
84
123
  processWarnings: tapable.SyncWaterfallHook<[Error[]]>;
85
124
  succeedModule: liteTapable.SyncHook<[Module], void>;
86
125
  stillValidModule: liteTapable.SyncHook<[Module], void>;
126
+ statsPreset: tapable.HookMap<tapable.SyncHook<[Partial<StatsOptions>, CreateStatsOptionsContext], void>>;
127
+ statsNormalize: tapable.SyncHook<[
128
+ Partial<StatsOptions>,
129
+ CreateStatsOptionsContext
130
+ ], void>;
87
131
  statsFactory: tapable.SyncHook<[StatsFactory, StatsOptions], void>;
88
132
  statsPrinter: tapable.SyncHook<[StatsPrinter, StatsOptions], void>;
89
133
  buildModule: liteTapable.SyncHook<[Module]>;
@@ -147,7 +191,7 @@ export declare class Compilation {
147
191
  buildMeta: Record<string, unknown>;
148
192
  };
149
193
  getCache(name: string): import("./lib/CacheFacade");
150
- createStatsOptions(optionsOrPreset: StatsValue | undefined, context?: CreateStatsOptionsContext): StatsOptions;
194
+ createStatsOptions(optionsOrPreset: StatsValue | undefined, context?: CreateStatsOptionsContext): NormalizedStatsOptions;
151
195
  createStatsFactory(options: StatsOptions): StatsFactory;
152
196
  createStatsPrinter(options: StatsOptions): StatsPrinter;
153
197
  /**
@@ -45,17 +45,17 @@ const Chunk_1 = require("./Chunk");
45
45
  const ChunkGraph_1 = require("./ChunkGraph");
46
46
  const Entrypoint_1 = require("./Entrypoint");
47
47
  const ErrorHelpers_1 = __importDefault(require("./ErrorHelpers"));
48
- const Logger_1 = require("./logging/Logger");
49
48
  const Module_1 = require("./Module");
50
49
  const NormalModule_1 = require("./NormalModule");
51
50
  const Stats_1 = require("./Stats");
51
+ const Logger_1 = require("./logging/Logger");
52
52
  const StatsFactory_1 = require("./stats/StatsFactory");
53
53
  const StatsPrinter_1 = require("./stats/StatsPrinter");
54
54
  const util_1 = require("./util");
55
55
  const AssetInfo_1 = require("./util/AssetInfo");
56
+ const MergeCaller_1 = __importDefault(require("./util/MergeCaller"));
56
57
  const fake_1 = require("./util/fake");
57
58
  const memoize_1 = require("./util/memoize");
58
- const MergeCaller_1 = __importDefault(require("./util/MergeCaller"));
59
59
  const source_1 = require("./util/source");
60
60
  class Compilation {
61
61
  constructor(compiler, inner) {
@@ -149,6 +149,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
149
149
  processWarnings: new tapable.SyncWaterfallHook(["warnings"]),
150
150
  succeedModule: new liteTapable.SyncHook(["module"]),
151
151
  stillValidModule: new liteTapable.SyncHook(["module"]),
152
+ statsPreset: new tapable.HookMap(() => new tapable.SyncHook(["options", "context"])),
153
+ statsNormalize: new tapable.SyncHook(["options", "context"]),
152
154
  statsFactory: new tapable.SyncHook(["statsFactory", "options"]),
153
155
  statsPrinter: new tapable.SyncHook(["statsPrinter", "options"]),
154
156
  buildModule: new liteTapable.SyncHook(["module"]),
@@ -239,49 +241,29 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
239
241
  return this.compiler.getCache(name);
240
242
  }
241
243
  createStatsOptions(optionsOrPreset, context = {}) {
242
- optionsOrPreset = (0, Stats_1.normalizeStatsPreset)(optionsOrPreset);
243
- let options = {};
244
+ if (typeof optionsOrPreset === "boolean" ||
245
+ typeof optionsOrPreset === "string") {
246
+ optionsOrPreset = { preset: optionsOrPreset };
247
+ }
244
248
  if (typeof optionsOrPreset === "object" && optionsOrPreset !== null) {
245
- options = Object.assign({}, optionsOrPreset);
249
+ // We use this method of shallow cloning this object to include
250
+ // properties in the prototype chain
251
+ const options = {};
252
+ for (const key in optionsOrPreset) {
253
+ options[key] =
254
+ optionsOrPreset[key];
255
+ }
256
+ if (options.preset !== undefined) {
257
+ this.hooks.statsPreset.for(options.preset).call(options, context);
258
+ }
259
+ this.hooks.statsNormalize.call(options, context);
260
+ return options;
261
+ }
262
+ else {
263
+ const options = {};
264
+ this.hooks.statsNormalize.call(options, context);
265
+ return options;
246
266
  }
247
- const all = options.all;
248
- const optionOrLocalFallback = (v, def) => v !== undefined ? v : all !== undefined ? all : def;
249
- options.assets = optionOrLocalFallback(options.assets, true);
250
- options.chunks = optionOrLocalFallback(options.chunks, !context.forToString);
251
- options.chunkModules = optionOrLocalFallback(options.chunkModules, !context.forToString);
252
- options.chunkRelations = optionOrLocalFallback(options.chunkRelations, !context.forToString);
253
- options.modules = optionOrLocalFallback(options.modules, true);
254
- options.runtimeModules = optionOrLocalFallback(options.runtimeModules, !context.forToString);
255
- options.reasons = optionOrLocalFallback(options.reasons, !context.forToString);
256
- options.usedExports = optionOrLocalFallback(options.usedExports, !context.forToString);
257
- options.optimizationBailout = optionOrLocalFallback(options.optimizationBailout, !context.forToString);
258
- options.providedExports = optionOrLocalFallback(options.providedExports, !context.forToString);
259
- options.entrypoints = optionOrLocalFallback(options.entrypoints, true);
260
- options.chunkGroups = optionOrLocalFallback(options.chunkGroups, !context.forToString);
261
- options.errors = optionOrLocalFallback(options.errors, true);
262
- options.errorsCount = optionOrLocalFallback(options.errorsCount, true);
263
- options.warnings = optionOrLocalFallback(options.warnings, true);
264
- options.warningsCount = optionOrLocalFallback(options.warningsCount, true);
265
- options.hash = optionOrLocalFallback(options.hash, true);
266
- options.version = optionOrLocalFallback(options.version, true);
267
- options.publicPath = optionOrLocalFallback(options.publicPath, true);
268
- options.outputPath = optionOrLocalFallback(options.outputPath, !context.forToString);
269
- options.timings = optionOrLocalFallback(options.timings, true);
270
- options.builtAt = optionOrLocalFallback(options.builtAt, !context.forToString);
271
- options.moduleAssets = optionOrLocalFallback(options.moduleAssets, true);
272
- options.nestedModules = optionOrLocalFallback(options.nestedModules, !context.forToString);
273
- options.source = optionOrLocalFallback(options.source, false);
274
- options.logging = optionOrLocalFallback(options.logging, context.forToString ? "info" : true);
275
- options.loggingTrace = optionOrLocalFallback(options.loggingTrace, !context.forToString);
276
- options.loggingDebug = []
277
- .concat((0, Stats_1.optionsOrFallback)(options.loggingDebug, []) || [])
278
- .map(Stats_1.normalizeFilter);
279
- options.modulesSpace =
280
- options.modulesSpace || (context.forToString ? 15 : Infinity);
281
- options.ids = optionOrLocalFallback(options.ids, !context.forToString);
282
- options.children = optionOrLocalFallback(options.children, !context.forToString);
283
- options.orphanModules = optionOrLocalFallback(options.orphanModules, context.forToString ? false : true);
284
- return options;
285
267
  }
286
268
  createStatsFactory(options) {
287
269
  const statsFactory = new StatsFactory_1.StatsFactory();
@@ -13,22 +13,22 @@ import * as tapable from "tapable";
13
13
  import { Callback } from "tapable";
14
14
  import type Watchpack from "../compiled/watchpack";
15
15
  import { Compilation, CompilationParams } from "./Compilation";
16
- import { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config";
17
16
  import { ContextModuleFactory } from "./ContextModuleFactory";
18
- import { rspack } from "./index";
19
- import * as liteTapable from "./lite-tapable";
20
17
  import { RuleSetCompiler } from "./RuleSetCompiler";
21
18
  import { Stats } from "./Stats";
19
+ import { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config";
20
+ import { rspack } from "./index";
21
+ import * as liteTapable from "./lite-tapable";
22
22
  import ResolverFactory = require("./ResolverFactory");
23
23
  import Cache = require("./lib/Cache");
24
24
  import CacheFacade = require("./lib/CacheFacade");
25
25
  import { Source } from "webpack-sources";
26
26
  import { Chunk } from "./Chunk";
27
27
  import { FileSystemInfoEntry } from "./FileSystemInfo";
28
- import { Logger } from "./logging/Logger";
29
28
  import { NormalModuleFactory } from "./NormalModuleFactory";
30
- import { OutputFileSystem, WatchFileSystem } from "./util/fs";
31
29
  import { Watching } from "./Watching";
30
+ import { Logger } from "./logging/Logger";
31
+ import { OutputFileSystem, WatchFileSystem } from "./util/fs";
32
32
  export interface AssetEmittedInfo {
33
33
  content: Buffer;
34
34
  source: Source;
package/dist/Compiler.js CHANGED
@@ -52,32 +52,32 @@ const binding = __importStar(require("@rspack/binding"));
52
52
  const tapable = __importStar(require("tapable"));
53
53
  const tapable_1 = require("tapable");
54
54
  const Compilation_1 = require("./Compilation");
55
- const config_1 = require("./config");
56
55
  const ContextModuleFactory_1 = require("./ContextModuleFactory");
57
- const index_1 = require("./index");
58
- const liteTapable = __importStar(require("./lite-tapable"));
59
56
  const RuleSetCompiler_1 = require("./RuleSetCompiler");
60
57
  const Stats_1 = require("./Stats");
58
+ const config_1 = require("./config");
59
+ const index_1 = require("./index");
60
+ const liteTapable = __importStar(require("./lite-tapable"));
61
61
  const ResolverFactory = require("./ResolverFactory");
62
62
  const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
63
63
  const fileSystem_1 = require("./fileSystem");
64
64
  const Cache = require("./lib/Cache");
65
65
  const CacheFacade = require("./lib/CacheFacade");
66
- const builtin_plugin_1 = require("./builtin-plugin");
67
- const base_1 = require("./builtin-plugin/base");
68
66
  const Chunk_1 = require("./Chunk");
69
- const defaults_1 = require("./config/defaults");
70
67
  const ExecuteModulePlugin_1 = __importDefault(require("./ExecuteModulePlugin"));
71
- const HookWebpackError_1 = require("./lib/HookWebpackError");
72
- const Logger_1 = require("./logging/Logger");
73
68
  const Module_1 = require("./Module");
74
69
  const NormalModuleFactory_1 = require("./NormalModuleFactory");
75
70
  const RuntimeGlobals_1 = require("./RuntimeGlobals");
71
+ const Watching_1 = require("./Watching");
72
+ const builtin_plugin_1 = require("./builtin-plugin");
73
+ const base_1 = require("./builtin-plugin/base");
74
+ const defaults_1 = require("./config/defaults");
75
+ const HookWebpackError_1 = require("./lib/HookWebpackError");
76
+ const Logger_1 = require("./logging/Logger");
76
77
  const util_1 = require("./util");
77
78
  const assertNotNil_1 = require("./util/assertNotNil");
78
79
  const bindingVersionCheck_1 = require("./util/bindingVersionCheck");
79
80
  const identifier_1 = require("./util/identifier");
80
- const Watching_1 = require("./Watching");
81
81
  class Compiler {
82
82
  constructor(context, options) {
83
83
  _Compiler_instances.add(this);
@@ -1,5 +1,5 @@
1
- import * as liteTapable from "./lite-tapable";
2
1
  import { ContextModuleFactoryAfterResolveResult, ContextModuleFactoryBeforeResolveResult } from "./Module";
2
+ import * as liteTapable from "./lite-tapable";
3
3
  export declare class ContextModuleFactory {
4
4
  hooks: {
5
5
  beforeResolve: liteTapable.AsyncSeriesWaterfallHook<[
@@ -9,9 +9,9 @@
9
9
  */
10
10
  import { AsyncSeriesHook, Callback, MultiHook, SyncBailHook, SyncHook } from "tapable";
11
11
  import { Compiler, RspackOptions } from ".";
12
- import { WatchOptions } from "./config";
13
12
  import MultiStats from "./MultiStats";
14
13
  import MultiWatching from "./MultiWatching";
14
+ import { WatchOptions } from "./config";
15
15
  import { WatchFileSystem } from "./util/fs";
16
16
  export interface MultiCompilerOptions {
17
17
  /**
@@ -21,9 +21,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.MultiCompiler = void 0;
22
22
  const neo_async_1 = __importDefault(require("../compiled/neo-async"));
23
23
  const tapable_1 = require("tapable");
24
- const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
25
24
  const MultiStats_1 = __importDefault(require("./MultiStats"));
26
25
  const MultiWatching_1 = __importDefault(require("./MultiWatching"));
26
+ const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
27
27
  const ArrayQueue_1 = __importDefault(require("./util/ArrayQueue"));
28
28
  class MultiCompiler {
29
29
  constructor(compilers, options) {
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.NormalModule = void 0;
7
- const tapable_1 = require("tapable");
8
7
  const util_1 = __importDefault(require("util"));
8
+ const tapable_1 = require("tapable");
9
9
  const Compilation_1 = require("./Compilation");
10
10
  const compilationHooksMap = new WeakMap();
11
11
  const createFakeHook = (fakeHook, message, code) => {
@@ -1,6 +1,6 @@
1
1
  import type * as binding from "@rspack/binding";
2
- import * as liteTapable from "./lite-tapable";
3
2
  import { ResolveData, ResourceDataWithData } from "./Module";
3
+ import * as liteTapable from "./lite-tapable";
4
4
  export type NormalModuleCreateData = binding.JsNormalModuleFactoryCreateModuleArgs & {
5
5
  settings: {};
6
6
  };
package/dist/Stats.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Compilation, FilterItemTypes } from ".";
1
+ import { Compilation } from ".";
2
2
  import { StatsOptions, StatsValue } from "./config";
3
3
  import type { StatsCompilation } from "./stats/statsFactoryUtils";
4
4
  export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule, StatsWarnings } from "./stats/statsFactoryUtils";
@@ -13,5 +13,3 @@ export declare class Stats {
13
13
  toString(opts?: StatsValue): string;
14
14
  }
15
15
  export declare function normalizeStatsPreset(options?: StatsValue): StatsOptions;
16
- export declare const normalizeFilter: (item: FilterItemTypes) => (args_0: string, ...args_1: unknown[]) => boolean;
17
- export declare const optionsOrFallback: (...args: any) => any;
package/dist/Stats.js CHANGED
@@ -12,7 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
12
12
  };
13
13
  var _Stats_instances, _Stats_inner, _Stats_innerMap, _Stats_getInnerByCompilation;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.optionsOrFallback = exports.normalizeFilter = exports.normalizeStatsPreset = exports.Stats = void 0;
15
+ exports.normalizeStatsPreset = exports.Stats = void 0;
16
16
  class Stats {
17
17
  constructor(compilation) {
18
18
  _Stats_instances.add(this);
@@ -135,28 +135,3 @@ function presetToOptions(name) {
135
135
  return {};
136
136
  }
137
137
  }
138
- const normalizeFilter = (item) => {
139
- if (typeof item === "string") {
140
- const regExp = new RegExp(`[\\\\/]${item.replace(
141
- // eslint-disable-next-line no-useless-escape
142
- /[-[\]{}()*+?.\\^$|]/g, "\\$&")}([\\\\/]|$|!|\\?)`);
143
- return (ident) => regExp.test(ident);
144
- }
145
- if (item && typeof item === "object" && typeof item.test === "function") {
146
- return (ident) => item.test(ident);
147
- }
148
- if (typeof item === "function") {
149
- return item;
150
- }
151
- if (typeof item === "boolean") {
152
- return () => item;
153
- }
154
- throw new Error(`unreachable: typeof ${item} should be one of string | RegExp | ((value: string) => boolean)`);
155
- };
156
- exports.normalizeFilter = normalizeFilter;
157
- const optionsOrFallback = (...args) => {
158
- let optionValues = [];
159
- optionValues.push(...args);
160
- return optionValues.find(optionValue => optionValue !== undefined);
161
- };
162
- exports.optionsOrFallback = optionsOrFallback;
@@ -3,7 +3,7 @@ export declare const APIPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const ArrayPushCallbackChunkFormatPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const AssetModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const AsyncWebAssemblyModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -183,7 +183,7 @@ export declare const BannerPlugin: {
183
183
  }): {
184
184
  name: BuiltinPluginName;
185
185
  _options: RawBannerPluginOptions;
186
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
186
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
187
187
  raw(): import("@rspack/binding").BuiltinPlugin;
188
188
  apply(compiler: import("../Compiler").Compiler): void;
189
189
  };
@@ -7,7 +7,7 @@ export declare const BundlerInfoRspackPlugin: {
7
7
  new (options: BundleInfoOptions): {
8
8
  name: BuiltinPluginName;
9
9
  _options: RawBundlerInfoPluginOptions;
10
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
10
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
11
11
  raw(): import("@rspack/binding").BuiltinPlugin;
12
12
  apply(compiler: import("../Compiler").Compiler): void;
13
13
  };
@@ -3,7 +3,7 @@ export declare const ChunkPrefetchPreloadPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const CommonJsChunkFormatPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -8,7 +8,7 @@ export declare const CopyRspackPlugin: {
8
8
  new (copy: CopyRspackPluginOptions): {
9
9
  name: BuiltinPluginName;
10
10
  _options: RawCopyRspackPluginOptions;
11
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
11
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
12
12
  raw(): import("@rspack/binding").BuiltinPlugin;
13
13
  apply(compiler: import("../Compiler").Compiler): void;
14
14
  };
@@ -3,7 +3,7 @@ export declare const CssModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const DataUriPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -4,7 +4,7 @@ export declare const DefinePlugin: {
4
4
  new (define: DefinePluginOptions): {
5
5
  name: BuiltinPluginName;
6
6
  _options: Record<string, string>;
7
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
8
  raw(): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -3,7 +3,7 @@ export declare const DeterministicChunkIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const DeterministicModuleIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -4,7 +4,7 @@ export declare const DynamicEntryPlugin: {
4
4
  new (context: string, entry: EntryDynamicNormalized): {
5
5
  name: BuiltinPluginName;
6
6
  _options: RawDynamicEntryPluginOptions;
7
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
8
  raw(): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DynamicEntryPlugin = void 0;
7
7
  const binding_1 = require("@rspack/binding");
8
8
  const EntryOptionPlugin_1 = __importDefault(require("../lib/EntryOptionPlugin"));
9
- const base_1 = require("./base");
10
9
  const EntryPlugin_1 = require("./EntryPlugin");
10
+ const base_1 = require("./base");
11
11
  exports.DynamicEntryPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.DynamicEntryPlugin, (context, entry) => {
12
12
  return {
13
13
  context,
@@ -3,7 +3,7 @@ export declare const ElectronTargetPlugin: {
3
3
  new (context?: string | undefined): {
4
4
  name: BuiltinPluginName;
5
5
  _options: string;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const EnableChunkLoadingPlugin: {
3
3
  new (type: any): {
4
4
  name: BuiltinPluginName;
5
5
  _options: any;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const EnableWasmLoadingPlugin: {
3
3
  new (type: any): {
4
4
  name: BuiltinPluginName;
5
5
  _options: any;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const EnsureChunkConditionsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };