@rspack/core 0.6.5-canary-6d6fcd3-20240514084813 → 0.6.5-canary-231c64e-20240515075232

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 (145) hide show
  1. package/dist/Chunk.d.ts +1 -1
  2. package/dist/Chunk.js +1 -1
  3. package/dist/ChunkGroup.d.ts +1 -1
  4. package/dist/ChunkGroup.js +3 -3
  5. package/dist/Compilation.d.ts +46 -65
  6. package/dist/Compilation.js +128 -222
  7. package/dist/Compiler.d.ts +75 -44
  8. package/dist/Compiler.js +325 -278
  9. package/dist/ContextModuleFactory.d.ts +7 -3
  10. package/dist/ContextModuleFactory.js +2 -2
  11. package/dist/Entrypoint.d.ts +1 -1
  12. package/dist/Entrypoint.js +1 -1
  13. package/dist/ExecuteModulePlugin.js +1 -1
  14. package/dist/Module.d.ts +11 -0
  15. package/dist/Module.js +2 -2
  16. package/dist/MultiCompiler.d.ts +10 -25
  17. package/dist/MultiCompiler.js +3 -3
  18. package/dist/MultiStats.d.ts +1 -1
  19. package/dist/NormalModuleFactory.d.ts +1 -1
  20. package/dist/Stats.d.ts +2 -2
  21. package/dist/Watching.d.ts +0 -9
  22. package/dist/Watching.js +12 -2
  23. package/dist/builtin-loader/swc/index.d.ts +6 -6
  24. package/dist/builtin-loader/swc/index.js +3 -3
  25. package/dist/builtin-loader/swc/types.d.ts +2 -2
  26. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/BannerPlugin.d.ts +2 -2
  31. package/dist/builtin-plugin/BannerPlugin.js +1 -1
  32. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/DynamicEntryPlugin.js +1 -1
  43. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/EntryPlugin.js +1 -1
  50. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -3
  53. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +2 -2
  57. package/dist/builtin-plugin/HtmlRspackPlugin.js +2 -2
  58. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/JsLoaderRspackPlugin.js +1 -1
  64. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  72. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  73. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  74. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  75. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  76. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  77. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  78. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  79. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  80. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  81. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  82. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -2
  83. package/dist/builtin-plugin/SplitChunksPlugin.js +4 -4
  84. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
  85. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  86. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  87. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  88. package/dist/builtin-plugin/WorkerPlugin.d.ts +2 -2
  89. package/dist/builtin-plugin/base.d.ts +1 -1
  90. package/dist/builtin-plugin/css-extract/index.d.ts +5 -4
  91. package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
  92. package/dist/builtin-plugin/css-extract/loader.js +2 -2
  93. package/dist/builtin-plugin/index.d.ts +43 -43
  94. package/dist/builtin-plugin/index.js +43 -43
  95. package/dist/config/adapter.d.ts +2 -2
  96. package/dist/config/adapterRuleUse.d.ts +2 -1
  97. package/dist/config/adapterRuleUse.js +2 -2
  98. package/dist/config/defaults.js +3 -3
  99. package/dist/config/index.d.ts +2 -2
  100. package/dist/config/index.js +2 -2
  101. package/dist/config/normalization.d.ts +1 -1
  102. package/dist/config/zod.d.ts +169 -176
  103. package/dist/config/zod.js +2 -15
  104. package/dist/container/ContainerPlugin.d.ts +1 -1
  105. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  106. package/dist/container/ContainerReferencePlugin.js +1 -1
  107. package/dist/container/ModuleFederationPlugin.js +1 -1
  108. package/dist/container/ModuleFederationPluginV1.d.ts +1 -1
  109. package/dist/container/ModuleFederationPluginV1.js +1 -1
  110. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  111. package/dist/exports.d.ts +34 -30
  112. package/dist/exports.js +21 -18
  113. package/dist/fileSystem.d.ts +12 -8
  114. package/dist/fileSystem.js +25 -48
  115. package/dist/index.d.ts +1 -1
  116. package/dist/index.js +1 -1
  117. package/dist/lite-tapable/index.d.ts +6 -0
  118. package/dist/lite-tapable/index.js +107 -1
  119. package/dist/loader-runner/index.js +13 -13
  120. package/dist/logging/Logger.d.ts +1 -1
  121. package/dist/logging/createConsoleLogger.js +0 -14
  122. package/dist/node/NodeEnvironmentPlugin.d.ts +1 -1
  123. package/dist/node/NodeEnvironmentPlugin.js +1 -1
  124. package/dist/node/nodeConsole.js +0 -4
  125. package/dist/rspack.d.ts +4 -13
  126. package/dist/rspack.js +8 -8
  127. package/dist/rspackOptionsApply.d.ts +1 -10
  128. package/dist/rspackOptionsApply.js +14 -5
  129. package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
  130. package/dist/sharing/ConsumeSharedPlugin.js +1 -1
  131. package/dist/stats/DefaultStatsFactoryPlugin.js +2 -2
  132. package/dist/stats/StatsFactory.d.ts +2 -2
  133. package/dist/stats/StatsFactory.js +0 -9
  134. package/dist/stats/StatsPrinter.d.ts +1 -1
  135. package/dist/stats/statsFactoryUtils.d.ts +1 -1
  136. package/dist/util/comparators.d.ts +1 -1
  137. package/dist/util/fs.d.ts +64 -0
  138. package/dist/util/fs.js +122 -0
  139. package/dist/util/index.d.ts +2 -1
  140. package/dist/util/index.js +16 -11
  141. package/dist/util/source.d.ts +18 -0
  142. package/dist/util/source.js +66 -0
  143. package/package.json +4 -4
  144. package/dist/util/createSource.d.ts +0 -5
  145. package/dist/util/createSource.js +0 -65
@@ -1,9 +1,13 @@
1
1
  import * as liteTapable from "./lite-tapable";
2
- import { ResolveData } from "./Module";
2
+ import { ContextModuleFactoryAfterResolveResult, ContextModuleFactoryBeforeResolveResult } from "./Module";
3
3
  export declare class ContextModuleFactory {
4
4
  hooks: {
5
- beforeResolve: liteTapable.AsyncSeriesBailHook<[ResolveData], false | void>;
6
- afterResolve: liteTapable.AsyncSeriesBailHook<[ResolveData], false | void>;
5
+ beforeResolve: liteTapable.AsyncSeriesWaterfallHook<[
6
+ ContextModuleFactoryBeforeResolveResult
7
+ ], ContextModuleFactoryBeforeResolveResult | void>;
8
+ afterResolve: liteTapable.AsyncSeriesWaterfallHook<[
9
+ ContextModuleFactoryAfterResolveResult
10
+ ], ContextModuleFactoryAfterResolveResult | void>;
7
11
  };
8
12
  constructor();
9
13
  }
@@ -41,8 +41,8 @@ class ContextModuleFactory {
41
41
  // /** @type {AsyncSeriesBailHook<[ResolveData], Module>} */
42
42
  // factorize: new AsyncSeriesBailHook(["resolveData"]),
43
43
  // /** @type {AsyncSeriesBailHook<[ResolveData], false | void>} */
44
- beforeResolve: new liteTapable.AsyncSeriesBailHook(["resolveData"]),
45
- afterResolve: new liteTapable.AsyncSeriesBailHook(["resolveData"])
44
+ beforeResolve: new liteTapable.AsyncSeriesWaterfallHook(["resolveData"]),
45
+ afterResolve: new liteTapable.AsyncSeriesWaterfallHook(["resolveData"])
46
46
  // /** @type {AsyncSeriesBailHook<[ResolveData["createData"], ResolveData], Module | void>} */
47
47
  // createModule: new AsyncSeriesBailHook(["createData", "resolveData"]),
48
48
  // /** @type {SyncWaterfallHook<[Module, ResolveData["createData"], ResolveData], Module>} */
@@ -1,6 +1,6 @@
1
1
  import { type JsChunkGroup, type JsCompilation } from "@rspack/binding";
2
- import { ChunkGroup } from "./ChunkGroup";
3
2
  import { Chunk } from "./Chunk";
3
+ import { ChunkGroup } from "./ChunkGroup";
4
4
  export declare class Entrypoint extends ChunkGroup {
5
5
  static __from_binding(chunk: JsChunkGroup, compilation: JsCompilation): Entrypoint;
6
6
  protected constructor(inner: JsChunkGroup, compilation: JsCompilation);
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Entrypoint = void 0;
4
4
  const binding_1 = require("@rspack/binding");
5
- const ChunkGroup_1 = require("./ChunkGroup");
6
5
  const Chunk_1 = require("./Chunk");
6
+ const ChunkGroup_1 = require("./ChunkGroup");
7
7
  class Entrypoint extends ChunkGroup_1.ChunkGroup {
8
8
  static __from_binding(chunk, compilation) {
9
9
  return new Entrypoint(chunk, compilation);
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const _1 = require(".");
7
6
  const node_vm_1 = __importDefault(require("node:vm"));
7
+ const _1 = require(".");
8
8
  class ExecuteModulePlugin {
9
9
  constructor() { }
10
10
  apply(compiler) {
package/dist/Module.d.ts CHANGED
@@ -18,6 +18,17 @@ export type ResolveData = {
18
18
  contextDependencies: string[];
19
19
  createData?: CreateData;
20
20
  };
21
+ export type ContextModuleFactoryBeforeResolveResult = false | {
22
+ context: string;
23
+ request?: string;
24
+ };
25
+ export type ContextModuleFactoryAfterResolveResult = false | {
26
+ resource: string;
27
+ context: string;
28
+ request: string;
29
+ regExp?: RegExp;
30
+ dependencies: Array<any>;
31
+ };
21
32
  export declare class Module {
22
33
  #private;
23
34
  _originalSource?: Source;
package/dist/Module.js CHANGED
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  var _Module_inner, _CodeGenerationResult_inner, _CodeGenerationResults_inner;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CodeGenerationResults = exports.CodeGenerationResult = exports.Module = void 0;
16
- const createSource_1 = require("./util/createSource");
16
+ const source_1 = require("./util/source");
17
17
  class Module {
18
18
  static __from_binding(module) {
19
19
  return new Module(module);
@@ -33,7 +33,7 @@ class Module {
33
33
  if (this._originalSource)
34
34
  return this._originalSource;
35
35
  if (__classPrivateFieldGet(this, _Module_inner, "f").originalSource) {
36
- this._originalSource = (0, createSource_1.createSourceFromRaw)(__classPrivateFieldGet(this, _Module_inner, "f").originalSource);
36
+ this._originalSource = source_1.JsSource.__from_binding(__classPrivateFieldGet(this, _Module_inner, "f").originalSource);
37
37
  return this._originalSource;
38
38
  }
39
39
  else {
@@ -7,15 +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 { AsyncSeriesHook, Callback, MultiHook, SyncBailHook, SyncHook } from "tapable";
10
11
  import { Compiler, RspackOptions } from ".";
11
- import ResolverFactory = require("./ResolverFactory");
12
- import { WatchFileSystem } from "./util/fs";
13
- import { Watching } from "./Watching";
14
- import { AsyncSeriesHook, Callback, MultiHook, SyncHook } from "tapable";
12
+ import { WatchOptions } from "./config";
15
13
  import MultiStats from "./MultiStats";
16
14
  import MultiWatching from "./MultiWatching";
17
- import { WatchOptions } from "./config";
18
- type Any = any;
15
+ import { WatchFileSystem } from "./util/fs";
19
16
  export interface MultiCompilerOptions {
20
17
  /**
21
18
  * how many Compilers are allows to run at the same time in parallel
@@ -25,40 +22,29 @@ export interface MultiCompilerOptions {
25
22
  export type MultiRspackOptions = ReadonlyArray<RspackOptions> & MultiCompilerOptions;
26
23
  export declare class MultiCompiler {
27
24
  #private;
28
- context: string;
29
25
  compilers: Compiler[];
30
26
  dependencies: WeakMap<Compiler, string[]>;
31
27
  hooks: {
32
28
  done: SyncHook<MultiStats>;
33
29
  invalid: MultiHook<SyncHook<[string | null, number]>>;
34
30
  run: MultiHook<AsyncSeriesHook<[Compiler]>>;
35
- watchClose: SyncHook<Any>;
36
- watchRun: MultiHook<Any>;
37
- infrastructureLog: MultiHook<Any>;
38
- };
39
- name: string;
40
- infrastructureLogger: Any;
41
- _options: {
42
- parallelism?: number;
31
+ watchClose: SyncHook<[]>;
32
+ watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
33
+ infrastructureLog: MultiHook<SyncBailHook<[string, string, any[]], true>>;
43
34
  };
44
- root: Compiler;
45
- resolverFactory: ResolverFactory;
35
+ _options: MultiCompilerOptions;
46
36
  running: boolean;
47
- watching: Watching;
48
- watchMode: boolean;
49
37
  constructor(compilers: Compiler[] | Record<string, Compiler>, options?: MultiCompilerOptions);
50
- get options(): import(".").RspackOptionsNormalized[] & {
51
- parallelism?: number | undefined;
52
- };
38
+ get options(): import(".").RspackOptionsNormalized[] & MultiCompilerOptions;
53
39
  get outputPath(): string;
54
40
  get inputFileSystem(): void;
55
41
  get outputFileSystem(): typeof import("fs");
56
42
  get watchFileSystem(): WatchFileSystem;
57
- get intermediateFileSystem(): any;
43
+ get intermediateFileSystem(): void;
58
44
  set inputFileSystem(value: void);
59
45
  set outputFileSystem(value: typeof import("fs"));
60
46
  set watchFileSystem(value: WatchFileSystem);
61
- set intermediateFileSystem(value: any);
47
+ set intermediateFileSystem(value: void);
62
48
  getInfrastructureLogger(name: string): import("./logging/Logger").Logger;
63
49
  /**
64
50
  * @param compiler - the child compiler
@@ -80,4 +66,3 @@ export declare class MultiCompiler {
80
66
  purgeInputFileSystem(): void;
81
67
  close(callback: Callback<Error, void>): void;
82
68
  }
83
- export {};
@@ -19,12 +19,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19
19
  var _MultiCompiler_instances, _MultiCompiler_runGraph;
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.MultiCompiler = void 0;
22
- const tapable_1 = require("tapable");
23
- const MultiStats_1 = __importDefault(require("./MultiStats"));
24
22
  const neo_async_1 = __importDefault(require("../compiled/neo-async"));
25
- const ArrayQueue_1 = __importDefault(require("./util/ArrayQueue"));
23
+ const tapable_1 = require("tapable");
26
24
  const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
25
+ const MultiStats_1 = __importDefault(require("./MultiStats"));
27
26
  const MultiWatching_1 = __importDefault(require("./MultiWatching"));
27
+ const ArrayQueue_1 = __importDefault(require("./util/ArrayQueue"));
28
28
  class MultiCompiler {
29
29
  constructor(compilers, options) {
30
30
  _MultiCompiler_instances.add(this);
@@ -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 { StatsCompilation } from "./stats/statsFactoryUtils";
11
10
  import { Stats } from "./Stats";
11
+ import { StatsCompilation } from "./stats/statsFactoryUtils";
12
12
  export default class MultiStats {
13
13
  #private;
14
14
  stats: Stats[];
@@ -1,5 +1,5 @@
1
- import * as liteTapable from "./lite-tapable";
2
1
  import type * as binding from "@rspack/binding";
2
+ import * as liteTapable from "./lite-tapable";
3
3
  import { ResolveData, ResourceDataWithData } from "./Module";
4
4
  export type NormalModuleCreateData = binding.JsNormalModuleFactoryCreateModuleArgs & {
5
5
  settings: {};
package/dist/Stats.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Compilation, FilterItemTypes } from ".";
2
- import { StatsValue, StatsOptions } from "./config";
2
+ import { StatsOptions, StatsValue } from "./config";
3
3
  import type { StatsCompilation } from "./stats/statsFactoryUtils";
4
- export type { StatsCompilation, StatsAsset, StatsChunk, StatsModule, StatsError, StatsWarnings } from "./stats/statsFactoryUtils";
4
+ export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule, StatsWarnings } from "./stats/statsFactoryUtils";
5
5
  export declare class Stats {
6
6
  #private;
7
7
  compilation: Compilation;
@@ -1,12 +1,3 @@
1
- /**
2
- * The following code is modified based on
3
- * https://github.com/webpack/webpack/blob/4b4ca3b/lib/Watching.js
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
1
  import { Callback } from "tapable";
11
2
  import type { Compiler } from ".";
12
3
  import { Stats } from ".";
package/dist/Watching.js CHANGED
@@ -16,8 +16,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  var _Watching_instances, _Watching_invalidReported, _Watching_closeCallbacks, _Watching_initial, _Watching_closed, _Watching_collectedChangedFiles, _Watching_collectedRemovedFiles, _Watching_invalidate, _Watching_go, _Watching_mergeWithCollected;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Watching = void 0;
19
- const _1 = require(".");
19
+ /**
20
+ * The following code is modified based on
21
+ * https://github.com/webpack/webpack/blob/4b4ca3b/lib/Watching.js
22
+ *
23
+ * MIT Licensed
24
+ * Author Tobias Koppers @sokra
25
+ * Copyright (c) JS Foundation and other contributors
26
+ * https://github.com/webpack/webpack/blob/main/LICENSE
27
+ */
20
28
  const assert_1 = __importDefault(require("assert"));
29
+ const _1 = require(".");
21
30
  class Watching {
22
31
  constructor(compiler, watchOptions, handler) {
23
32
  _Watching_instances.add(this);
@@ -53,6 +62,7 @@ class Watching {
53
62
  }
54
63
  watch(files, dirs, missing) {
55
64
  this.pausedWatcher = undefined;
65
+ // SAFETY: `watchFileSystem` is expected to be initialized.
56
66
  this.watcher = this.compiler.watchFileSystem.watch(files, dirs, missing, this.lastWatcherStartTime, this.watchOptions, (err, fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles) => {
57
67
  if (err) {
58
68
  this.compiler.fileTimestamps = undefined;
@@ -258,7 +268,7 @@ _Watching_invalidReported = new WeakMap(), _Watching_closeCallbacks = new WeakMa
258
268
  if (err)
259
269
  return this._done(err, null);
260
270
  // if (this.invalid) return this._done(null);
261
- this._done(null, this.compiler.compilation);
271
+ this._done(null, this.compiler._lastCompilation);
262
272
  };
263
273
  this.compiler.compile(onCompile);
264
274
  if (!canRebuild) {
@@ -1,9 +1,9 @@
1
- export { resolveEmotion } from "./emotion";
2
1
  export type { EmotionOptions } from "./emotion";
3
- export { resolveReact } from "./react";
2
+ export { resolveEmotion } from "./emotion";
3
+ export type { PluginImportOptions } from "./pluginImport";
4
+ export { resolvePluginImport } from "./pluginImport";
4
5
  export type { ReactOptions } from "./react";
5
- export { resolveRelay } from "./relay";
6
+ export { resolveReact } from "./react";
6
7
  export type { RelayOptions } from "./relay";
7
- export { resolvePluginImport } from "./pluginImport";
8
- export type { PluginImportOptions } from "./pluginImport";
9
- export type { SwcLoaderOptions, SwcLoaderEnvConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderParserConfig, SwcLoaderEsParserConfig, SwcLoaderTsParserConfig, SwcLoaderTransformConfig } from "./types";
8
+ export { resolveRelay } from "./relay";
9
+ export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./types";
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvePluginImport = exports.resolveRelay = exports.resolveReact = exports.resolveEmotion = void 0;
3
+ exports.resolveRelay = exports.resolveReact = exports.resolvePluginImport = exports.resolveEmotion = void 0;
4
4
  var emotion_1 = require("./emotion");
5
5
  Object.defineProperty(exports, "resolveEmotion", { enumerable: true, get: function () { return emotion_1.resolveEmotion; } });
6
+ var pluginImport_1 = require("./pluginImport");
7
+ Object.defineProperty(exports, "resolvePluginImport", { enumerable: true, get: function () { return pluginImport_1.resolvePluginImport; } });
6
8
  var react_1 = require("./react");
7
9
  Object.defineProperty(exports, "resolveReact", { enumerable: true, get: function () { return react_1.resolveReact; } });
8
10
  var relay_1 = require("./relay");
9
11
  Object.defineProperty(exports, "resolveRelay", { enumerable: true, get: function () { return relay_1.resolveRelay; } });
10
- var pluginImport_1 = require("./pluginImport");
11
- Object.defineProperty(exports, "resolvePluginImport", { enumerable: true, get: function () { return pluginImport_1.resolvePluginImport; } });
@@ -2,10 +2,10 @@
2
2
  * Some types are modified from https://github.com/swc-project/swc/blob/16a38851/packages/types/index.ts#L647
3
3
  * license at https://github.com/swc-project/swc/blob/main/LICENSE
4
4
  */
5
- import type { ReactOptions } from "./react";
6
- import type { RelayOptions } from "./relay";
7
5
  import type { EmotionOptions } from "./emotion";
8
6
  import type { PluginImportOptions } from "./pluginImport";
7
+ import type { ReactOptions } from "./react";
8
+ import type { RelayOptions } from "./relay";
9
9
  export type StyledComponentsOptions = {
10
10
  displayName?: boolean;
11
11
  ssr?: boolean;
@@ -3,7 +3,7 @@ export declare const APIPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _options: void;
6
- affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -1,5 +1,5 @@
1
- import { z } from "../../compiled/zod";
2
1
  import { BuiltinPluginName, JsChunk, RawBannerPluginOptions } from "@rspack/binding";
2
+ import { z } from "../../compiled/zod";
3
3
  declare const rule: z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>;
4
4
  export type Rule = z.infer<typeof rule>;
5
5
  declare const rules: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>;
@@ -176,7 +176,7 @@ export declare const BannerPlugin: {
176
176
  }): {
177
177
  name: BuiltinPluginName;
178
178
  _options: RawBannerPluginOptions;
179
- affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
179
+ 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;
180
180
  raw(): import("@rspack/binding").BuiltinPlugin;
181
181
  apply(compiler: import("../Compiler").Compiler): void;
182
182
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BannerPlugin = void 0;
4
- const zod_1 = require("../../compiled/zod");
5
4
  const binding_1 = require("@rspack/binding");
5
+ const zod_1 = require("../../compiled/zod");
6
6
  const base_1 = require("./base");
7
7
  const rule = zod_1.z.string().or(zod_1.z.instanceof(RegExp));
8
8
  const rules = rule.or(rule.array());
@@ -7,7 +7,7 @@ export declare const BundlerInfoRspackPlugin: {
7
7
  new (options: BundleInfoOptions): {
8
8
  name: BuiltinPluginName;
9
9
  _options: RawBundlerInfoPluginOptions;
10
- affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
8
8
  raw(): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DynamicEntryPlugin = void 0;
7
7
  const binding_1 = require("@rspack/binding");
8
- const base_1 = require("./base");
9
8
  const EntryOptionPlugin_1 = __importDefault(require("../lib/EntryOptionPlugin"));
9
+ const base_1 = require("./base");
10
10
  const EntryPlugin_1 = require("./EntryPlugin");
11
11
  exports.DynamicEntryPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.DynamicEntryPlugin, (context, entry) => {
12
12
  return {
@@ -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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -1,6 +1,6 @@
1
1
  import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
- import { RspackBuiltinPlugin } from "./base";
3
2
  import { Compiler, LibraryType } from "..";
3
+ import { RspackBuiltinPlugin } from "./base";
4
4
  export declare class EnableLibraryPlugin extends RspackBuiltinPlugin {
5
5
  private type;
6
6
  name: BuiltinPluginName;
@@ -3,7 +3,7 @@ export declare const EnableWasmLoadingPlugin: {
3
3
  new (type: any): {
4
4
  name: BuiltinPluginName;
5
5
  _options: any;
6
- affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
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" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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;
7
7
  raw(): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -15,7 +15,7 @@ export declare const EntryPlugin: {
15
15
  new (context: string, entry: string, options?: string | EntryOptions | undefined): {
16
16
  name: BuiltinPluginName;
17
17
  _options: RawEntryPluginOptions;
18
- affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
18
+ 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;
19
19
  raw(): import("@rspack/binding").BuiltinPlugin;
20
20
  apply(compiler: import("../Compiler").Compiler): void;
21
21
  };