@rspack/core 1.0.0-alpha.5 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/compiled/zod/index.d.ts +138 -52
  2. package/compiled/zod/index.js +300 -103
  3. package/compiled/zod/package.json +1 -1
  4. package/compiled/zod-validation-error/index.js +6 -6
  5. package/dist/Compilation.d.ts +22 -4
  6. package/dist/Compilation.js +64 -49
  7. package/dist/Compiler.d.ts +11 -10
  8. package/dist/Compiler.js +42 -42
  9. package/dist/ErrorHelpers.js +2 -4
  10. package/dist/Module.d.ts +1 -0
  11. package/dist/Module.js +3 -6
  12. package/dist/ModuleTypeConstants.d.ts +45 -69
  13. package/dist/ModuleTypeConstants.js +24 -77
  14. package/dist/NormalModule.d.ts +1 -0
  15. package/dist/NormalModule.js +1 -0
  16. package/dist/Stats.js +4 -6
  17. package/dist/Template.d.ts +31 -147
  18. package/dist/Template.js +40 -236
  19. package/dist/builtin-loader/lightningcss/index.d.ts +89 -0
  20. package/dist/builtin-loader/lightningcss/index.js +175 -0
  21. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  23. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/BannerPlugin.d.ts +25 -49
  26. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/DefinePlugin.js +9 -13
  34. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/EntryPlugin.d.ts +4 -3
  42. package/dist/builtin-plugin/EntryPlugin.js +1 -0
  43. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/ExternalsPlugin.d.ts +29 -5
  46. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +9 -9
  51. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +2 -2
  55. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +4 -1
  59. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  72. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  73. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  74. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  75. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  76. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  77. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  78. package/dist/builtin-plugin/SplitChunksPlugin.js +5 -15
  79. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
  80. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  81. package/dist/builtin-plugin/SwcJsMinimizerPlugin.js +15 -23
  82. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  83. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  84. package/dist/builtin-plugin/base.d.ts +1 -1
  85. package/dist/builtin-plugin/base.js +1 -3
  86. package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.d.ts +3 -3
  87. package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +17 -66
  88. package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.d.ts +2 -0
  89. package/dist/builtin-plugin/css-extract/hmr/{normalize-url.js → normalizeUrl.js} +15 -24
  90. package/dist/builtin-plugin/css-extract/loader.d.ts +8 -3
  91. package/dist/builtin-plugin/css-extract/loader.js +28 -17
  92. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  93. package/dist/config/adapter.d.ts +1 -1
  94. package/dist/config/adapter.js +39 -25
  95. package/dist/config/adapterRuleUse.d.ts +5 -5
  96. package/dist/config/adapterRuleUse.js +23 -1
  97. package/dist/config/browserslistTargetHandler.d.ts +17 -15
  98. package/dist/config/browserslistTargetHandler.js +27 -33
  99. package/dist/config/defaults.js +27 -31
  100. package/dist/config/normalization.d.ts +8 -3
  101. package/dist/config/normalization.js +7 -5
  102. package/dist/config/target.d.ts +48 -109
  103. package/dist/config/target.js +50 -86
  104. package/dist/config/zod.d.ts +2660 -2305
  105. package/dist/config/zod.js +38 -19
  106. package/dist/container/ContainerPlugin.d.ts +7 -7
  107. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  108. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  109. package/dist/container/options.js +1 -1
  110. package/dist/exports.d.ts +4 -4
  111. package/dist/exports.js +2 -2
  112. package/dist/lib/AbstractMethodError.d.ts +12 -3
  113. package/dist/lib/AbstractMethodError.js +29 -21
  114. package/dist/lib/Cache.d.ts +40 -46
  115. package/dist/lib/Cache.js +43 -78
  116. package/dist/lib/CacheFacade.d.ts +119 -143
  117. package/dist/lib/CacheFacade.js +123 -123
  118. package/dist/lib/EntryOptionPlugin.d.ts +19 -2
  119. package/dist/lib/EntryOptionPlugin.js +22 -6
  120. package/dist/lib/EnvironmentPlugin.d.ts +17 -10
  121. package/dist/lib/EnvironmentPlugin.js +16 -15
  122. package/dist/lib/HookWebpackError.d.ts +27 -33
  123. package/dist/lib/HookWebpackError.js +33 -34
  124. package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
  125. package/dist/lib/{ignoreWarningsPlugin.js → IgnoreWarningsPlugin.js} +17 -0
  126. package/dist/lib/LoaderOptionsPlugin.d.ts +18 -9
  127. package/dist/lib/LoaderOptionsPlugin.js +38 -14
  128. package/dist/lib/LoaderTargetPlugin.d.ts +17 -8
  129. package/dist/lib/LoaderTargetPlugin.js +17 -15
  130. package/dist/lib/ModuleFilenameHelpers.d.ts +10 -1
  131. package/dist/lib/ModuleFilenameHelpers.js +10 -3
  132. package/dist/lib/NormalModuleReplacementPlugin.d.ts +15 -5
  133. package/dist/lib/NormalModuleReplacementPlugin.js +15 -5
  134. package/dist/lib/WebpackError.d.ts +29 -22
  135. package/dist/lib/WebpackError.js +17 -29
  136. package/dist/lib/cache/getLazyHashedEtag.d.ts +24 -24
  137. package/dist/lib/cache/getLazyHashedEtag.js +20 -23
  138. package/dist/lib/cache/mergeEtags.d.ts +15 -9
  139. package/dist/lib/cache/mergeEtags.js +23 -22
  140. package/dist/lib/formatLocation.d.ts +13 -8
  141. package/dist/lib/formatLocation.js +20 -20
  142. package/dist/loader-runner/LoaderLoadingError.d.ts +11 -1
  143. package/dist/loader-runner/LoaderLoadingError.js +3 -5
  144. package/dist/loader-runner/index.js +7 -9
  145. package/dist/loader-runner/loadLoader.d.ts +11 -2
  146. package/dist/loader-runner/loadLoader.js +17 -19
  147. package/dist/logging/createConsoleLogger.js +2 -6
  148. package/dist/logging/truncateArgs.js +5 -9
  149. package/dist/node/nodeConsole.js +1 -3
  150. package/dist/rspackOptionsApply.js +2 -2
  151. package/dist/stats/DefaultStatsFactoryPlugin.js +18 -8
  152. package/dist/stats/DefaultStatsPresetPlugin.js +4 -4
  153. package/dist/stats/DefaultStatsPrinterPlugin.js +11 -16
  154. package/dist/stats/StatsFactory.js +13 -17
  155. package/dist/stats/StatsPrinter.js +7 -9
  156. package/dist/util/AssetInfo.js +11 -7
  157. package/dist/util/SplitChunkSize.js +1 -1
  158. package/dist/util/cleverMerge.d.ts +33 -57
  159. package/dist/util/cleverMerge.js +89 -145
  160. package/dist/util/comparators.d.ts +1 -1
  161. package/dist/util/comparators.js +3 -5
  162. package/dist/util/createHash.d.ts +4 -3
  163. package/dist/util/createHash.js +31 -45
  164. package/dist/util/fs.js +9 -13
  165. package/dist/util/hash/BatchedHash.d.ts +24 -9
  166. package/dist/util/hash/BatchedHash.js +16 -13
  167. package/dist/util/hash/index.d.ts +9 -9
  168. package/dist/util/hash/index.js +14 -11
  169. package/dist/util/hash/md4.d.ts +29 -2
  170. package/dist/util/hash/md4.js +7 -3
  171. package/dist/util/hash/wasm-hash.d.ts +52 -5
  172. package/dist/util/hash/wasm-hash.js +19 -22
  173. package/dist/util/hash/xxhash64.d.ts +29 -2
  174. package/dist/util/hash/xxhash64.js +7 -3
  175. package/dist/util/identifier.js +9 -15
  176. package/dist/util/index.js +1 -1
  177. package/dist/util/memoize.js +7 -9
  178. package/package.json +9 -8
  179. package/compiled/enhanced-resolve/index.js +0 -5566
  180. package/dist/builtin-plugin/css-extract/hmr/normalize-url.d.ts +0 -2
  181. package/dist/lib/ignoreWarningsPlugin.d.ts +0 -7
@@ -9,13 +9,13 @@ declare const bannerFunction: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
9
9
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
10
10
  filename: z.ZodString;
11
11
  }, "strip", z.ZodTypeAny, {
12
+ filename: string;
12
13
  hash: string;
13
14
  chunk: JsChunk;
14
- filename: string;
15
15
  }, {
16
+ filename: string;
16
17
  hash: string;
17
18
  chunk: JsChunk;
18
- filename: string;
19
19
  }>], z.ZodUnknown>, z.ZodString>;
20
20
  export type BannerFunction = z.infer<typeof bannerFunction>;
21
21
  declare const bannerContent: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
@@ -23,13 +23,13 @@ declare const bannerContent: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[
23
23
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
24
24
  filename: z.ZodString;
25
25
  }, "strip", z.ZodTypeAny, {
26
+ filename: string;
26
27
  hash: string;
27
28
  chunk: JsChunk;
28
- filename: string;
29
29
  }, {
30
+ filename: string;
30
31
  hash: string;
31
32
  chunk: JsChunk;
32
- filename: string;
33
33
  }>], z.ZodUnknown>, z.ZodString>]>;
34
34
  export type BannerContent = z.infer<typeof bannerContent>;
35
35
  declare const bannerPluginOptions: z.ZodObject<{
@@ -38,13 +38,13 @@ declare const bannerPluginOptions: z.ZodObject<{
38
38
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
39
39
  filename: z.ZodString;
40
40
  }, "strip", z.ZodTypeAny, {
41
+ filename: string;
41
42
  hash: string;
42
43
  chunk: JsChunk;
43
- filename: string;
44
44
  }, {
45
+ filename: string;
45
46
  hash: string;
46
47
  chunk: JsChunk;
47
- filename: string;
48
48
  }>], z.ZodUnknown>, z.ZodString>]>;
49
49
  entryOnly: z.ZodOptional<z.ZodBoolean>;
50
50
  exclude: z.ZodOptional<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">]>>;
@@ -54,15 +54,11 @@ declare const bannerPluginOptions: z.ZodObject<{
54
54
  stage: z.ZodOptional<z.ZodNumber>;
55
55
  test: z.ZodOptional<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">]>>;
56
56
  }, "strict", z.ZodTypeAny, {
57
- banner: (string | ((args_0: {
58
- hash: string;
59
- chunk: JsChunk;
57
+ banner: string | ((args_0: {
60
58
  filename: string;
61
- }, ...args_1: unknown[]) => string)) & (string | ((args_0: {
62
59
  hash: string;
63
60
  chunk: JsChunk;
64
- filename: string;
65
- }, ...args_1: unknown[]) => string) | undefined);
61
+ }, ...args_1: unknown[]) => string);
66
62
  entryOnly?: boolean | undefined;
67
63
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
68
64
  include?: string | RegExp | (string | RegExp)[] | undefined;
@@ -71,15 +67,11 @@ declare const bannerPluginOptions: z.ZodObject<{
71
67
  stage?: number | undefined;
72
68
  test?: string | RegExp | (string | RegExp)[] | undefined;
73
69
  }, {
74
- banner: (string | ((args_0: {
75
- hash: string;
76
- chunk: JsChunk;
70
+ banner: string | ((args_0: {
77
71
  filename: string;
78
- }, ...args_1: unknown[]) => string)) & (string | ((args_0: {
79
72
  hash: string;
80
73
  chunk: JsChunk;
81
- filename: string;
82
- }, ...args_1: unknown[]) => string) | undefined);
74
+ }, ...args_1: unknown[]) => string);
83
75
  entryOnly?: boolean | undefined;
84
76
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
85
77
  include?: string | RegExp | (string | RegExp)[] | undefined;
@@ -94,26 +86,26 @@ declare const bannerPluginArgument: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFu
94
86
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
95
87
  filename: z.ZodString;
96
88
  }, "strip", z.ZodTypeAny, {
89
+ filename: string;
97
90
  hash: string;
98
91
  chunk: JsChunk;
99
- filename: string;
100
92
  }, {
93
+ filename: string;
101
94
  hash: string;
102
95
  chunk: JsChunk;
103
- filename: string;
104
96
  }>], z.ZodUnknown>, z.ZodString>]>, z.ZodObject<{
105
97
  banner: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
106
98
  hash: z.ZodString;
107
99
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
108
100
  filename: z.ZodString;
109
101
  }, "strip", z.ZodTypeAny, {
102
+ filename: string;
110
103
  hash: string;
111
104
  chunk: JsChunk;
112
- filename: string;
113
105
  }, {
106
+ filename: string;
114
107
  hash: string;
115
108
  chunk: JsChunk;
116
- filename: string;
117
109
  }>], z.ZodUnknown>, z.ZodString>]>;
118
110
  entryOnly: z.ZodOptional<z.ZodBoolean>;
119
111
  exclude: z.ZodOptional<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">]>>;
@@ -123,15 +115,11 @@ declare const bannerPluginArgument: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFu
123
115
  stage: z.ZodOptional<z.ZodNumber>;
124
116
  test: z.ZodOptional<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">]>>;
125
117
  }, "strict", z.ZodTypeAny, {
126
- banner: (string | ((args_0: {
127
- hash: string;
128
- chunk: JsChunk;
118
+ banner: string | ((args_0: {
129
119
  filename: string;
130
- }, ...args_1: unknown[]) => string)) & (string | ((args_0: {
131
120
  hash: string;
132
121
  chunk: JsChunk;
133
- filename: string;
134
- }, ...args_1: unknown[]) => string) | undefined);
122
+ }, ...args_1: unknown[]) => string);
135
123
  entryOnly?: boolean | undefined;
136
124
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
137
125
  include?: string | RegExp | (string | RegExp)[] | undefined;
@@ -140,15 +128,11 @@ declare const bannerPluginArgument: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFu
140
128
  stage?: number | undefined;
141
129
  test?: string | RegExp | (string | RegExp)[] | undefined;
142
130
  }, {
143
- banner: (string | ((args_0: {
144
- hash: string;
145
- chunk: JsChunk;
131
+ banner: string | ((args_0: {
146
132
  filename: string;
147
- }, ...args_1: unknown[]) => string)) & (string | ((args_0: {
148
133
  hash: string;
149
134
  chunk: JsChunk;
150
- filename: string;
151
- }, ...args_1: unknown[]) => string) | undefined);
135
+ }, ...args_1: unknown[]) => string);
152
136
  entryOnly?: boolean | undefined;
153
137
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
154
138
  include?: string | RegExp | (string | RegExp)[] | undefined;
@@ -160,19 +144,15 @@ declare const bannerPluginArgument: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFu
160
144
  export type BannerPluginArgument = z.infer<typeof bannerPluginArgument>;
161
145
  export declare const BannerPlugin: {
162
146
  new (args: string | ((args_0: {
147
+ filename: string;
163
148
  hash: string;
164
149
  chunk: JsChunk;
165
- filename: string;
166
150
  }, ...args_1: unknown[]) => string) | {
167
- banner: (string | ((args_0: {
168
- hash: string;
169
- chunk: JsChunk;
151
+ banner: string | ((args_0: {
170
152
  filename: string;
171
- }, ...args_1: unknown[]) => string)) & (string | ((args_0: {
172
153
  hash: string;
173
154
  chunk: JsChunk;
174
- filename: string;
175
- }, ...args_1: unknown[]) => string) | undefined);
155
+ }, ...args_1: unknown[]) => string);
176
156
  entryOnly?: boolean | undefined;
177
157
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
178
158
  include?: string | RegExp | (string | RegExp)[] | undefined;
@@ -183,19 +163,15 @@ export declare const BannerPlugin: {
183
163
  }): {
184
164
  name: BuiltinPluginName;
185
165
  _args: [args: string | ((args_0: {
166
+ filename: string;
186
167
  hash: string;
187
168
  chunk: JsChunk;
188
- filename: string;
189
169
  }, ...args_1: unknown[]) => string) | {
190
- banner: (string | ((args_0: {
191
- hash: string;
192
- chunk: JsChunk;
170
+ banner: string | ((args_0: {
193
171
  filename: string;
194
- }, ...args_1: unknown[]) => string)) & (string | ((args_0: {
195
172
  hash: string;
196
173
  chunk: JsChunk;
197
- filename: string;
198
- }, ...args_1: unknown[]) => string) | undefined);
174
+ }, ...args_1: unknown[]) => string);
199
175
  entryOnly?: boolean | undefined;
200
176
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
201
177
  include?: string | RegExp | (string | RegExp)[] | undefined;
@@ -204,7 +180,7 @@ export declare const BannerPlugin: {
204
180
  stage?: number | undefined;
205
181
  test?: string | RegExp | (string | RegExp)[] | undefined;
206
182
  }];
207
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
183
+ 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;
208
184
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
209
185
  apply(compiler: import("../Compiler").Compiler): void;
210
186
  };
@@ -8,7 +8,7 @@ export declare const BundlerInfoRspackPlugin: {
8
8
  new (options: BundleInfoOptions): {
9
9
  name: BuiltinPluginName;
10
10
  _args: [options: BundleInfoOptions];
11
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
13
13
  apply(compiler: import("../Compiler").Compiler): void;
14
14
  };
@@ -3,7 +3,7 @@ export declare const ChunkPrefetchPreloadPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [copy: CopyRspackPluginOptions];
11
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [define: DefinePluginOptions];
7
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -12,37 +12,33 @@ const normalizeValue = (define, supportsBigIntLiteral) => {
12
12
  if (p === undefined) {
13
13
  return "undefined";
14
14
  }
15
- else if (Object.is(p, -0)) {
15
+ if (Object.is(p, -0)) {
16
16
  return "-0";
17
17
  }
18
- else if (p instanceof RegExp) {
18
+ if (p instanceof RegExp) {
19
19
  return p.toString();
20
20
  }
21
- else if (typeof p === "function") {
21
+ if (typeof p === "function") {
22
22
  return "(" + p.toString() + ")";
23
23
  }
24
- else if (typeof p === "bigint") {
24
+ if (typeof p === "bigint") {
25
25
  return supportsBigIntLiteral ? `${p}n` : `BigInt("${p}")`;
26
26
  }
27
- else {
28
- // assume `p` is a valid JSON value
29
- return p;
30
- }
27
+ // assume `p` is a valid JSON value
28
+ return p;
31
29
  };
32
30
  const normalizeObject = (define) => {
33
31
  if (Array.isArray(define)) {
34
32
  return define.map(normalizeObject);
35
33
  }
36
- else if (define instanceof RegExp) {
34
+ if (define instanceof RegExp) {
37
35
  return normalizePrimitive(define);
38
36
  }
39
- else if (define && typeof define === "object") {
37
+ if (define && typeof define === "object") {
40
38
  const keys = Object.keys(define);
41
39
  return Object.fromEntries(keys.map(k => [k, normalizeObject(define[k])]));
42
40
  }
43
- else {
44
- return normalizePrimitive(define);
45
- }
41
+ return normalizePrimitive(define);
46
42
  };
47
43
  return normalizeObject(define);
48
44
  };
@@ -3,7 +3,7 @@ export declare const DeterministicChunkIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [context: string, entry: EntryDynamicNormalized];
7
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -3,7 +3,7 @@ export declare const ElectronTargetPlugin: {
3
3
  new (context?: string | undefined): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [context?: string | undefined];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [type: any];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [type: any];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): 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
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -1,5 +1,5 @@
1
1
  import { BuiltinPluginName, type RawEntryOptions } from "@rspack/binding";
2
- import { type ChunkLoading, type EntryRuntime, type FilenameTemplate, type LibraryOptions, type PublicPath } from "../config";
2
+ import { type ChunkLoading, type EntryRuntime, type Filename, type Layer, type LibraryOptions, type PublicPath } from "../config";
3
3
  export type EntryOptions = {
4
4
  name?: string;
5
5
  runtime?: EntryRuntime;
@@ -7,15 +7,16 @@ export type EntryOptions = {
7
7
  asyncChunks?: boolean;
8
8
  publicPath?: PublicPath;
9
9
  baseUri?: string;
10
- filename?: FilenameTemplate;
10
+ filename?: Filename;
11
11
  library?: LibraryOptions;
12
+ layer?: Layer;
12
13
  dependOn?: string[];
13
14
  };
14
15
  export declare const EntryPlugin: {
15
16
  new (context: string, entry: string, options?: string | EntryOptions | undefined): {
16
17
  name: BuiltinPluginName;
17
18
  _args: [context: string, entry: string, options?: string | EntryOptions | undefined];
18
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
19
+ 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
20
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
20
21
  apply(compiler: import("../Compiler").Compiler): void;
21
22
  };
@@ -27,6 +27,7 @@ function getRawEntryOptions(entry) {
27
27
  asyncChunks: entry.asyncChunks,
28
28
  filename: entry.filename,
29
29
  library: entry.library && (0, config_1.getRawLibrary)(entry.library),
30
+ layer: entry.layer ?? undefined,
30
31
  dependOn: entry.dependOn
31
32
  };
32
33
  }
@@ -4,7 +4,7 @@ export declare const EvalDevToolModulePlugin: {
4
4
  new (options: RawEvalDevToolModulePluginOptions): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [options: RawEvalDevToolModulePluginOptions];
7
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -4,7 +4,7 @@ export declare const EvalSourceMapDevToolPlugin: {
4
4
  new (options: SourceMapDevToolPluginOptions): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [options: SourceMapDevToolPluginOptions];
7
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -4,38 +4,62 @@ export declare const ExternalsPlugin: {
4
4
  context?: string | undefined;
5
5
  dependencyType?: string | undefined;
6
6
  request?: string | undefined;
7
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
7
+ contextInfo?: {
8
+ issuer: string;
9
+ } | undefined;
10
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
8
11
  context?: string | undefined;
9
12
  dependencyType?: string | undefined;
10
13
  request?: string | undefined;
14
+ contextInfo?: {
15
+ issuer: string;
16
+ } | undefined;
11
17
  }, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>) | (string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: {
12
18
  context?: string | undefined;
13
19
  dependencyType?: string | undefined;
14
20
  request?: string | undefined;
15
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
21
+ contextInfo?: {
22
+ issuer: string;
23
+ } | undefined;
24
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
16
25
  context?: string | undefined;
17
26
  dependencyType?: string | undefined;
18
27
  request?: string | undefined;
28
+ contextInfo?: {
29
+ issuer: string;
30
+ } | undefined;
19
31
  }, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[]): {
20
32
  name: BuiltinPluginName;
21
33
  _args: [type: string, externals: string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: {
22
34
  context?: string | undefined;
23
35
  dependencyType?: string | undefined;
24
36
  request?: string | undefined;
25
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
37
+ contextInfo?: {
38
+ issuer: string;
39
+ } | undefined;
40
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
26
41
  context?: string | undefined;
27
42
  dependencyType?: string | undefined;
28
43
  request?: string | undefined;
44
+ contextInfo?: {
45
+ issuer: string;
46
+ } | undefined;
29
47
  }, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>) | (string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: {
30
48
  context?: string | undefined;
31
49
  dependencyType?: string | undefined;
32
50
  request?: string | undefined;
33
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
51
+ contextInfo?: {
52
+ issuer: string;
53
+ } | undefined;
54
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
34
55
  context?: string | undefined;
35
56
  dependencyType?: string | undefined;
36
57
  request?: string | undefined;
58
+ contextInfo?: {
59
+ issuer: string;
60
+ } | undefined;
37
61
  }, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[]];
38
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
62
+ 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;
39
63
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
40
64
  apply(compiler: import("../Compiler").Compiler): void;
41
65
  };
@@ -3,7 +3,7 @@ export declare const FetchCompileAsyncWasmPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const FileUriPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const FlagDependencyExportsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "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(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };