@ohos-ports/rsbuild-core 2.2.9-beta.0

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 (269) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/bin/rsbuild.js +20 -0
  4. package/compiled/@rstackjs/load-config/index.d.ts +87 -0
  5. package/compiled/@rstackjs/load-config/license +21 -0
  6. package/compiled/@rstackjs/load-config/package.json +1 -0
  7. package/compiled/chokidar/index.d.ts +385 -0
  8. package/compiled/chokidar/license +21 -0
  9. package/compiled/chokidar/package.json +1 -0
  10. package/compiled/connect-next/index.d.ts +57 -0
  11. package/compiled/connect-next/license +26 -0
  12. package/compiled/connect-next/package.json +1 -0
  13. package/compiled/cors/index.d.ts +56 -0
  14. package/compiled/cors/license +22 -0
  15. package/compiled/cors/package.json +1 -0
  16. package/compiled/css-loader/api.js +85 -0
  17. package/compiled/css-loader/getUrl.js +26 -0
  18. package/compiled/css-loader/index.d.ts +1 -0
  19. package/compiled/css-loader/index.js +2 -0
  20. package/compiled/css-loader/license +20 -0
  21. package/compiled/css-loader/noSourceMaps.js +5 -0
  22. package/compiled/css-loader/package.json +1 -0
  23. package/compiled/css-loader/sourceMaps.js +16 -0
  24. package/compiled/html-rspack-plugin/default_index.ejs +9 -0
  25. package/compiled/html-rspack-plugin/htmlLoader.js +157 -0
  26. package/compiled/html-rspack-plugin/index.d.ts +395 -0
  27. package/compiled/html-rspack-plugin/index.js +2400 -0
  28. package/compiled/html-rspack-plugin/license +20 -0
  29. package/compiled/html-rspack-plugin/package.json +1 -0
  30. package/compiled/http-proxy-middleware/index.d.ts +455 -0
  31. package/compiled/http-proxy-middleware/license +22 -0
  32. package/compiled/http-proxy-middleware/package.json +1 -0
  33. package/compiled/jiti/LICENSE +21 -0
  34. package/compiled/jiti/README.md +258 -0
  35. package/compiled/jiti/dist/babel.cjs +47446 -0
  36. package/compiled/jiti/dist/jiti.cjs +5990 -0
  37. package/compiled/jiti/lib/jiti-cli.mjs +19 -0
  38. package/compiled/jiti/lib/jiti-hooks.mjs +89 -0
  39. package/compiled/jiti/lib/jiti-native.mjs +76 -0
  40. package/compiled/jiti/lib/jiti-register.d.mts +1 -0
  41. package/compiled/jiti/lib/jiti-register.mjs +2 -0
  42. package/compiled/jiti/lib/jiti-static.mjs +19 -0
  43. package/compiled/jiti/lib/jiti.cjs +24 -0
  44. package/compiled/jiti/lib/jiti.d.cts +8 -0
  45. package/compiled/jiti/lib/jiti.d.mts +8 -0
  46. package/compiled/jiti/lib/jiti.mjs +23 -0
  47. package/compiled/jiti/lib/types.d.ts +420 -0
  48. package/compiled/jiti/package.json +146 -0
  49. package/compiled/postcss/index.js +1 -0
  50. package/compiled/postcss/lib/at-rule.d.ts +139 -0
  51. package/compiled/postcss/lib/comment.d.ts +67 -0
  52. package/compiled/postcss/lib/container.d.ts +474 -0
  53. package/compiled/postcss/lib/css-syntax-error.d.ts +247 -0
  54. package/compiled/postcss/lib/declaration.d.ts +150 -0
  55. package/compiled/postcss/lib/document.d.ts +68 -0
  56. package/compiled/postcss/lib/fromJSON.d.ts +9 -0
  57. package/compiled/postcss/lib/input.d.ts +226 -0
  58. package/compiled/postcss/lib/lazy-result.d.ts +189 -0
  59. package/compiled/postcss/lib/list.d.ts +60 -0
  60. package/compiled/postcss/lib/no-work-result.d.ts +45 -0
  61. package/compiled/postcss/lib/node.d.ts +555 -0
  62. package/compiled/postcss/lib/parse.d.ts +9 -0
  63. package/compiled/postcss/lib/postcss.d.ts +464 -0
  64. package/compiled/postcss/lib/previous-map.d.ts +80 -0
  65. package/compiled/postcss/lib/processor.d.ts +114 -0
  66. package/compiled/postcss/lib/result.d.ts +204 -0
  67. package/compiled/postcss/lib/root.d.ts +86 -0
  68. package/compiled/postcss/lib/rule.d.ts +126 -0
  69. package/compiled/postcss/lib/source-map-js.d.ts +4 -0
  70. package/compiled/postcss/lib/stringifier.d.ts +45 -0
  71. package/compiled/postcss/lib/stringify.d.ts +9 -0
  72. package/compiled/postcss/lib/warning.d.ts +146 -0
  73. package/compiled/postcss/license +20 -0
  74. package/compiled/postcss/package.json +1 -0
  75. package/compiled/postcss-loader/index.d.ts +1 -0
  76. package/compiled/postcss-loader/index.js +721 -0
  77. package/compiled/postcss-loader/license +20 -0
  78. package/compiled/postcss-loader/package.json +1 -0
  79. package/compiled/rslog/index.d.ts +98 -0
  80. package/compiled/rslog/license +21 -0
  81. package/compiled/rslog/package.json +1 -0
  82. package/compiled/rspack-chain/license +22 -0
  83. package/compiled/rspack-chain/package.json +1 -0
  84. package/compiled/rspack-chain/types/index.d.ts +515 -0
  85. package/compiled/rspack-manifest-plugin/index.d.ts +52 -0
  86. package/compiled/rspack-manifest-plugin/license +21 -0
  87. package/compiled/rspack-manifest-plugin/package.json +1 -0
  88. package/compiled/style-loader/index.d.ts +1 -0
  89. package/compiled/style-loader/index.js +370 -0
  90. package/compiled/style-loader/license +20 -0
  91. package/compiled/style-loader/package.json +1 -0
  92. package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
  93. package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
  94. package/compiled/style-loader/runtime/insertBySelector.js +34 -0
  95. package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
  96. package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
  97. package/compiled/style-loader/runtime/isOldIE.js +17 -0
  98. package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
  99. package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
  100. package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
  101. package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
  102. package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
  103. package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
  104. package/compiled/ws/index.d.ts +445 -0
  105. package/compiled/ws/license +21 -0
  106. package/compiled/ws/package.json +1 -0
  107. package/dist/build.d.ts +4 -0
  108. package/dist/c.js +10 -0
  109. package/dist/chokidar.js +2 -0
  110. package/dist/chokidar.js.LICENSE.txt +1 -0
  111. package/dist/cli/commands.d.ts +31 -0
  112. package/dist/cli/index.d.ts +7 -0
  113. package/dist/cli/init.d.ts +7 -0
  114. package/dist/client/f~0.js +22 -0
  115. package/dist/client/hmr.js +267 -0
  116. package/dist/client/overlay.js +214 -0
  117. package/dist/configChain.d.ts +84 -0
  118. package/dist/connect-next.js +2 -0
  119. package/dist/connect-next.js.LICENSE.txt +57 -0
  120. package/dist/constants.d.ts +67 -0
  121. package/dist/cors.js +188 -0
  122. package/dist/cors.js.LICENSE.txt +11 -0
  123. package/dist/createCompiler.d.ts +6 -0
  124. package/dist/createContext.d.ts +12 -0
  125. package/dist/createRsbuild.d.ts +4 -0
  126. package/dist/cssUrlLoader.mjs +34 -0
  127. package/dist/defaultConfig.d.ts +23 -0
  128. package/dist/freshImport.js +90 -0
  129. package/dist/helpers/cachedImport.d.ts +2 -0
  130. package/dist/helpers/compiler.d.ts +5 -0
  131. package/dist/helpers/css.d.ts +3 -0
  132. package/dist/helpers/exitHook.d.ts +3 -0
  133. package/dist/helpers/format.d.ts +4 -0
  134. package/dist/helpers/fs.d.ts +16 -0
  135. package/dist/helpers/html.d.ts +2 -0
  136. package/dist/helpers/index.d.ts +29 -0
  137. package/dist/helpers/overlayConfig.d.ts +4 -0
  138. package/dist/helpers/packageJson.d.ts +9 -0
  139. package/dist/helpers/path.d.ts +22 -0
  140. package/dist/helpers/restartManager.d.ts +15 -0
  141. package/dist/helpers/stats.d.ts +17 -0
  142. package/dist/helpers/url.d.ts +11 -0
  143. package/dist/helpers/vendors.d.ts +12 -0
  144. package/dist/helpers/version.d.ts +7 -0
  145. package/dist/hooks.d.ts +41 -0
  146. package/dist/http-proxy-middleware.js +14 -0
  147. package/dist/http-proxy-middleware.js.LICENSE.txt +34 -0
  148. package/dist/ignoreCssLoader.mjs +9 -0
  149. package/dist/index.d.ts +28 -0
  150. package/dist/index.js +1 -0
  151. package/dist/initConfigs.d.ts +18 -0
  152. package/dist/initPlugins.d.ts +7 -0
  153. package/dist/inspectConfig.d.ts +7 -0
  154. package/dist/launch-editor-middleware.js +1 -0
  155. package/dist/loadConfig.d.ts +31 -0
  156. package/dist/loadEnv.d.ts +54 -0
  157. package/dist/loader/cssUrlLoader.d.ts +9 -0
  158. package/dist/loader/ignoreCssLoader.d.ts +10 -0
  159. package/dist/loader/transformLoader.d.ts +8 -0
  160. package/dist/loader/transformRawLoader.d.ts +4 -0
  161. package/dist/loader/workerLoader.d.ts +6 -0
  162. package/dist/logger.d.ts +24 -0
  163. package/dist/m.js +10348 -0
  164. package/dist/m.js.LICENSE.txt +26 -0
  165. package/dist/manifest-plugin.js +1 -0
  166. package/dist/memfs.js +1 -0
  167. package/dist/mergeConfig.d.ts +7 -0
  168. package/dist/open.js +2 -0
  169. package/dist/pluginHelper.d.ts +4 -0
  170. package/dist/pluginManager.d.ts +19 -0
  171. package/dist/plugins/appIcon.d.ts +2 -0
  172. package/dist/plugins/asset.d.ts +3 -0
  173. package/dist/plugins/basic.d.ts +4 -0
  174. package/dist/plugins/cache.d.ts +2 -0
  175. package/dist/plugins/cleanOutput.d.ts +2 -0
  176. package/dist/plugins/css.d.ts +8 -0
  177. package/dist/plugins/define.d.ts +2 -0
  178. package/dist/plugins/entry.d.ts +2 -0
  179. package/dist/plugins/externals.d.ts +9 -0
  180. package/dist/plugins/fileSize.d.ts +7 -0
  181. package/dist/plugins/html.d.ts +9 -0
  182. package/dist/plugins/inlineChunk.d.ts +6 -0
  183. package/dist/plugins/lazyCompilation.d.ts +2 -0
  184. package/dist/plugins/manifest.d.ts +2 -0
  185. package/dist/plugins/minimize.d.ts +10 -0
  186. package/dist/plugins/moduleFederation.d.ts +2 -0
  187. package/dist/plugins/nodeAddons.d.ts +2 -0
  188. package/dist/plugins/nonce.d.ts +2 -0
  189. package/dist/plugins/output.d.ts +2 -0
  190. package/dist/plugins/progress.d.ts +2 -0
  191. package/dist/plugins/resolve.d.ts +2 -0
  192. package/dist/plugins/resourceHints.d.ts +2 -0
  193. package/dist/plugins/rsdoctor.d.ts +2 -0
  194. package/dist/plugins/rspackProfile.d.ts +4 -0
  195. package/dist/plugins/server.d.ts +3 -0
  196. package/dist/plugins/sourceMap.d.ts +2 -0
  197. package/dist/plugins/splitChunks.d.ts +4 -0
  198. package/dist/plugins/sri.d.ts +2 -0
  199. package/dist/plugins/swc.d.ts +4 -0
  200. package/dist/plugins/target.d.ts +2 -0
  201. package/dist/plugins/wasm.d.ts +2 -0
  202. package/dist/plugins/worker.d.ts +2 -0
  203. package/dist/r.js +7 -0
  204. package/dist/range-parser.js +55 -0
  205. package/dist/range-parser.js.LICENSE.txt +6 -0
  206. package/dist/remapping.js +201 -0
  207. package/dist/restart.d.ts +15 -0
  208. package/dist/rslib-runtime.js +49 -0
  209. package/dist/rspack-plugins/RsbuildHtmlPlugin.d.ts +37 -0
  210. package/dist/rspack-plugins/resource-hints/HtmlResourceHintsPlugin.d.ts +36 -0
  211. package/dist/rspack-plugins/resource-hints/doesChunkBelongToHtml.d.ts +27 -0
  212. package/dist/rspack-plugins/resource-hints/extractChunks.d.ts +22 -0
  213. package/dist/rspack-plugins/resource-hints/getResourceType.d.ts +21 -0
  214. package/dist/rspackConfig.d.ts +8 -0
  215. package/dist/server/ansiHTML.d.ts +3 -0
  216. package/dist/server/assets-middleware/getFileFromUrl.d.ts +11 -0
  217. package/dist/server/assets-middleware/index.d.ts +35 -0
  218. package/dist/server/assets-middleware/memoryFileSystem.d.ts +2 -0
  219. package/dist/server/assets-middleware/middleware.d.ts +7 -0
  220. package/dist/server/assets-middleware/parseTokenList.d.ts +1 -0
  221. package/dist/server/assets-middleware/setupOutputFileSystem.d.ts +3 -0
  222. package/dist/server/assets-middleware/setupWriteToDisk.d.ts +15 -0
  223. package/dist/server/browserLogs.d.ts +8 -0
  224. package/dist/server/buildManager.d.ts +32 -0
  225. package/dist/server/cliShortcuts.d.ts +19 -0
  226. package/dist/server/compileState.d.ts +5 -0
  227. package/dist/server/devMiddlewares.d.ts +18 -0
  228. package/dist/server/devServer.d.ts +47 -0
  229. package/dist/server/environment.d.ts +8 -0
  230. package/dist/server/gracefulShutdown.d.ts +8 -0
  231. package/dist/server/gzipMiddleware.d.ts +2 -0
  232. package/dist/server/helper.d.ts +118 -0
  233. package/dist/server/historyApiFallback.d.ts +10 -0
  234. package/dist/server/hmrFallback.d.ts +1 -0
  235. package/dist/server/httpServer.d.ts +7 -0
  236. package/dist/server/middlewares.d.ts +31 -0
  237. package/dist/server/open.d.ts +12 -0
  238. package/dist/server/overlay.d.ts +3 -0
  239. package/dist/server/previewServer.d.ts +4 -0
  240. package/dist/server/proxy.d.ts +7 -0
  241. package/dist/server/publicPathnames.d.ts +2 -0
  242. package/dist/server/runner/asModule.d.ts +2 -0
  243. package/dist/server/runner/basic.d.ts +25 -0
  244. package/dist/server/runner/cjs.d.ts +10 -0
  245. package/dist/server/runner/esm.d.ts +6 -0
  246. package/dist/server/runner/index.d.ts +6 -0
  247. package/dist/server/runner/type.d.ts +42 -0
  248. package/dist/server/serverSetup.d.ts +2 -0
  249. package/dist/server/socketServer.d.ts +113 -0
  250. package/dist/server/watchFiles.d.ts +15 -0
  251. package/dist/sirv.js +122 -0
  252. package/dist/tinyglobby.js +1 -0
  253. package/dist/trace-mapping.js +548 -0
  254. package/dist/transformLoader.mjs +36 -0
  255. package/dist/transformRawLoader.mjs +4 -0
  256. package/dist/types/config.d.ts +1796 -0
  257. package/dist/types/context.d.ts +89 -0
  258. package/dist/types/hooks.d.ts +261 -0
  259. package/dist/types/index.d.ts +8 -0
  260. package/dist/types/plugin.d.ts +479 -0
  261. package/dist/types/rsbuild.d.ts +241 -0
  262. package/dist/types/rspack.d.ts +10 -0
  263. package/dist/types/thirdParty.d.ts +161 -0
  264. package/dist/types/utils.d.ts +16 -0
  265. package/dist/workerLoader.mjs +94 -0
  266. package/dist/ws.js +2 -0
  267. package/package.json +107 -0
  268. package/static/openChrome.applescript +95 -0
  269. package/types.d.ts +422 -0
@@ -0,0 +1,20 @@
1
+ Copyright JS Foundation and other contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"postcss-loader","author":"Andrey Sitnik <andrey@sitnik.ru>","version":"8.2.1","funding":{"type":"opencollective","url":"https://opencollective.com/webpack"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -0,0 +1,98 @@
1
+ type ColorFn = (text: string | number) => string;
2
+ declare const color: {
3
+ dim: ColorFn;
4
+ red: ColorFn;
5
+ bold: ColorFn;
6
+ blue: ColorFn;
7
+ cyan: ColorFn;
8
+ gray: ColorFn;
9
+ black: ColorFn;
10
+ green: ColorFn;
11
+ white: ColorFn;
12
+ reset: ColorFn;
13
+ yellow: ColorFn;
14
+ magenta: ColorFn;
15
+ underline: ColorFn;
16
+ strikethrough: ColorFn;
17
+ };
18
+
19
+ declare const LOG_TYPES: {
20
+ error: {
21
+ readonly label: string;
22
+ level: "error";
23
+ };
24
+ warn: {
25
+ readonly label: string;
26
+ level: "warn";
27
+ };
28
+ info: {
29
+ readonly label: string;
30
+ level: "info";
31
+ };
32
+ start: {
33
+ readonly label: string;
34
+ level: "info";
35
+ };
36
+ ready: {
37
+ readonly label: string;
38
+ level: "info";
39
+ };
40
+ success: {
41
+ readonly label: string;
42
+ level: "info";
43
+ };
44
+ log: {
45
+ level: "info";
46
+ };
47
+ debug: {
48
+ readonly label: string;
49
+ level: "verbose";
50
+ };
51
+ };
52
+
53
+ type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'log' | 'verbose';
54
+ type LogMessage = unknown;
55
+ interface LogType {
56
+ label?: string;
57
+ level: LogLevel;
58
+ color?: ColorFn;
59
+ }
60
+ type LogFunction = (message?: LogMessage, ...args: unknown[]) => void;
61
+ interface Options {
62
+ /**
63
+ * Controls which log levels are emitted.
64
+ * @default 'info'
65
+ */
66
+ level?: LogLevel;
67
+ /**
68
+ * Prepends a fixed prefix to every log message.
69
+ * @default undefined
70
+ */
71
+ prefix?: string;
72
+ /**
73
+ * Overrides the console used by this logger instance.
74
+ * @default globalThis.console
75
+ */
76
+ console?: Pick<Console, 'log' | 'warn' | 'error'>;
77
+ /**
78
+ * Aligns continuation lines of multi-line messages to the first line's
79
+ * content column (label + prefix). Error object stacks keep their original
80
+ * top-aligned formatting.
81
+ * @default false
82
+ */
83
+ alignMultiline?: boolean;
84
+ }
85
+ type LogMethods = keyof typeof LOG_TYPES;
86
+ type Logger = Record<LogMethods, LogFunction> & {
87
+ greet: (message: string) => void;
88
+ level: LogLevel;
89
+ readonly options: Options;
90
+ override: (customLogger: Partial<Record<LogMethods, LogFunction>>) => void;
91
+ };
92
+
93
+ declare const createLogger: (options?: Options) => Logger;
94
+
95
+ declare const logger: Logger;
96
+
97
+ export { color, createLogger, logger };
98
+ export type { LogFunction, LogLevel, LogMessage, LogType, Logger, Options };
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present Bytedance, Inc. and its affiliates.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"rslog","version":"2.3.0","license":"MIT","types":"index.d.ts","type":"module"}
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-present Rspack Contrib
4
+ Copyright (c) 2017-2024 webpack-chain contributors
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"rspack-chain","version":"2.3.2","license":"MIT","types":"types/index.d.ts","type":"module"}
@@ -0,0 +1,515 @@
1
+ import type {
2
+ Configuration,
3
+ RuleSetLoaderWithOptions,
4
+ RuleSetRule,
5
+ } from '@rspack/core';
6
+
7
+ // The compiler type of Rspack / webpack are mismatch,
8
+ // so we use a loose type here to allow using webpack plugins.
9
+ interface PluginInstance {
10
+ apply: (compiler: any) => void;
11
+ [index: string]: any;
12
+ }
13
+
14
+ declare namespace __Config {
15
+ // Allow loose object patches while preserving arrays and atomic values.
16
+ type MergeValue<Value> = Value extends
17
+ Function | readonly unknown[] | RegExp | Date
18
+ ? Value
19
+ : Value extends object
20
+ ? Value | Record<string, unknown>
21
+ : Value;
22
+
23
+ type MergeInput<OptionsType> = {
24
+ [Key in keyof OptionsType]?: MergeValue<OptionsType[Key]>;
25
+ } & Record<string, any>;
26
+
27
+ type NamedPatches = Record<string, Record<string, unknown>>;
28
+
29
+ class Chained<Parent> {
30
+ batch(handler: (chained: this) => void): this;
31
+ end(): Parent;
32
+ }
33
+ class TypedChainedMap<Parent, OptionsType> extends Chained<Parent> {
34
+ clear(): this;
35
+ delete(key: string): this;
36
+ has(key: string): boolean;
37
+ get<T extends keyof OptionsType>(key: T): OptionsType[T];
38
+ getOrCompute<T extends keyof OptionsType>(
39
+ key: T,
40
+ compute: () => OptionsType[T],
41
+ ): OptionsType[T];
42
+ set<T extends keyof OptionsType>(key: T, value: OptionsType[T]): this;
43
+ merge(obj: Partial<OptionsType>): this;
44
+ entries(): OptionsType;
45
+ values<T extends keyof OptionsType>(): OptionsType[T][];
46
+ when(
47
+ condition: boolean,
48
+ trueBrancher: (obj: this) => void,
49
+ falseBrancher?: (obj: this) => void,
50
+ ): this;
51
+ }
52
+
53
+ class ChainedMap<
54
+ Parent,
55
+ OptionsType = any,
56
+ MergeOverrides = unknown,
57
+ > extends TypedChainedMap<Parent, any> {
58
+ // Known keys share their read/write types; custom keys remain unrestricted.
59
+ get<Key extends PropertyKey>(
60
+ key: Key,
61
+ ): Key extends keyof OptionsType ? OptionsType[Key] | undefined : any;
62
+ set<Key extends PropertyKey>(
63
+ key: Key,
64
+ value: Key extends keyof OptionsType ? OptionsType[Key] | undefined : any,
65
+ ): this;
66
+ getOrCompute<Key extends PropertyKey>(
67
+ key: Key,
68
+ compute: Key extends keyof OptionsType
69
+ ? () => OptionsType[Key] | undefined
70
+ : () => any,
71
+ ): Key extends keyof OptionsType ? OptionsType[Key] | undefined : any;
72
+ // Apply chain-specific container types without loosening their shape.
73
+ merge(
74
+ obj: MergeInput<Omit<OptionsType, keyof MergeOverrides>> &
75
+ Partial<MergeOverrides>,
76
+ omit?: string[],
77
+ ): this;
78
+ }
79
+ class TypedChainedSet<Parent, Value> extends Chained<Parent> {
80
+ add(value: Value): this;
81
+ prepend(value: Value): this;
82
+ clear(): this;
83
+ delete(key: string): this;
84
+ has(key: string): boolean;
85
+ merge(arr: Value[]): this;
86
+ values(): Value[];
87
+ when(
88
+ condition: boolean,
89
+ trueBrancher: (obj: this) => void,
90
+ falseBrancher?: (obj: this) => void,
91
+ ): this;
92
+ }
93
+
94
+ class ChainedSet<Parent> extends TypedChainedSet<Parent, any> {}
95
+ }
96
+
97
+ type RspackConfig = Configuration;
98
+ export declare class RspackChain extends __Config.ChainedMap<
99
+ void,
100
+ Configuration,
101
+ {
102
+ entry?: Record<
103
+ string,
104
+ RspackChain.RspackEntryObject | RspackChain.RspackEntryObject[]
105
+ >;
106
+ }
107
+ > {
108
+ entryPoints: RspackChain.TypedChainedMap<
109
+ RspackChain,
110
+ { [key: string]: RspackChain.EntryPoint }
111
+ >;
112
+ output: RspackChain.Output;
113
+ module: RspackChain.Module;
114
+ node: RspackChain.ChainedMap<this> & ((value: false) => this);
115
+ optimization: RspackChain.Optimization;
116
+ performance: RspackChain.Performance & ((value: false) => this);
117
+ plugins: RspackChain.Plugins<this, PluginInstance>;
118
+ resolve: RspackChain.Resolve;
119
+ resolveLoader: RspackChain.ResolveLoader;
120
+ devServer: RspackChain.DevServer & ((value: false) => this);
121
+
122
+ context(value: RspackConfig['context']): this;
123
+ mode(value: RspackConfig['mode']): this;
124
+ devtool(value: RspackChain.DevTool | undefined): this;
125
+ target(value: RspackConfig['target']): this;
126
+ watch(value: RspackConfig['watch']): this;
127
+ watchOptions(value: RspackConfig['watchOptions']): this;
128
+ externals(value: RspackConfig['externals']): this;
129
+ externalsType(value: RspackConfig['externalsType']): this;
130
+ externalsPresets(value: RspackConfig['externalsPresets']): this;
131
+ stats(value: RspackConfig['stats']): this;
132
+ experiments(value: RspackConfig['experiments']): this;
133
+ amd(value: RspackConfig['amd']): this;
134
+ bail(value: RspackConfig['bail']): this;
135
+ cache(value: RspackConfig['cache']): this;
136
+ dependencies(value: RspackConfig['dependencies']): this;
137
+ extends(value: RspackConfig['extends']): this;
138
+ ignoreWarnings(value: RspackConfig['ignoreWarnings']): this;
139
+ loader(value: RspackConfig['loader']): this;
140
+ name(value: RspackConfig['name']): this;
141
+ infrastructureLogging(value: RspackConfig['infrastructureLogging']): this;
142
+ lazyCompilation(value: RspackConfig['lazyCompilation']): this;
143
+ incremental(value: RspackConfig['incremental']): this;
144
+
145
+ entry(name: string): RspackChain.EntryPoint;
146
+ plugin(name: string): RspackChain.Plugin<this, PluginInstance>;
147
+
148
+ toConfig(): Configuration;
149
+
150
+ static toString(
151
+ config: any,
152
+ {
153
+ verbose,
154
+ configPrefix,
155
+ }?: {
156
+ verbose?: boolean | undefined;
157
+ configPrefix?: string | undefined;
158
+ },
159
+ ): string;
160
+ }
161
+
162
+ export declare namespace RspackChain {
163
+ class Chained<Parent> extends __Config.Chained<Parent> {}
164
+ class TypedChainedMap<Parent, OptionsType> extends __Config.TypedChainedMap<
165
+ Parent,
166
+ OptionsType
167
+ > {}
168
+ class ChainedMap<
169
+ Parent,
170
+ OptionsType = any,
171
+ MergeOverrides = unknown,
172
+ > extends __Config.ChainedMap<Parent, OptionsType, MergeOverrides> {}
173
+ class TypedChainedSet<Parent, Value> extends __Config.TypedChainedSet<
174
+ Parent,
175
+ Value
176
+ > {}
177
+ class ChainedSet<Parent> extends __Config.TypedChainedSet<Parent, any> {}
178
+
179
+ class Plugins<
180
+ Parent,
181
+ PluginType extends PluginInstance,
182
+ > extends TypedChainedMap<
183
+ Parent,
184
+ { [key: string]: Plugin<Parent, PluginType> }
185
+ > {}
186
+
187
+ class Plugin<Parent, PluginType extends PluginInstance>
188
+ extends ChainedMap<Parent>
189
+ implements Orderable
190
+ {
191
+ init<P extends PluginType | PluginClass<PluginType>>(
192
+ value: (
193
+ plugin: P,
194
+ args: P extends PluginClass<PluginType>
195
+ ? ConstructorParameters<P>
196
+ : any[],
197
+ ) => PluginType,
198
+ ): this;
199
+ use<P extends PluginType | PluginClass<PluginType>>(
200
+ plugin: P,
201
+ args?: P extends PluginClass<PluginType>
202
+ ? ConstructorParameters<P>
203
+ : any[],
204
+ ): this;
205
+ tap<P extends PluginClass<PluginType>>(
206
+ f: (args: ConstructorParameters<P>) => ConstructorParameters<P>,
207
+ ): this;
208
+
209
+ // Orderable
210
+ before(name: string): this;
211
+ after(name: string): this;
212
+ }
213
+
214
+ type RspackEntry = NonNullable<Configuration['entry']>;
215
+
216
+ type RspackEntryObject = Exclude<
217
+ RspackEntry,
218
+ string | string[] | Function
219
+ >[string];
220
+
221
+ class EntryPoint extends TypedChainedSet<RspackChain, RspackEntryObject> {}
222
+
223
+ type RspackModule = NonNullable<Configuration['module']>;
224
+
225
+ class Module extends ChainedMap<
226
+ RspackChain,
227
+ NonNullable<Configuration['module']>,
228
+ { rule?: __Config.NamedPatches; defaultRule?: __Config.NamedPatches }
229
+ > {
230
+ defaultRules: TypedChainedMap<this, { [key: string]: Rule }>;
231
+ rules: TypedChainedMap<this, { [key: string]: Rule }>;
232
+ generator: ChainedMap<this>;
233
+ parser: ChainedMap<this>;
234
+ defaultRule(name: string): Rule;
235
+ rule(name: string): Rule;
236
+ noParse(value: RspackModule['noParse']): this;
237
+ }
238
+
239
+ type RspackOutput = NonNullable<Configuration['output']>;
240
+
241
+ class Output extends ChainedMap<
242
+ RspackChain,
243
+ NonNullable<Configuration['output']>
244
+ > {
245
+ assetModuleFilename(value: RspackOutput['assetModuleFilename']): this;
246
+ asyncChunks(value: RspackOutput['asyncChunks']): this;
247
+ bundlerInfo(value: RspackOutput['bundlerInfo']): this;
248
+ chunkFilename(value: RspackOutput['chunkFilename']): this;
249
+ chunkLoadTimeout(value: RspackOutput['chunkLoadTimeout']): this;
250
+ chunkLoadingGlobal(value: RspackOutput['chunkLoadingGlobal']): this;
251
+ chunkLoading(value: RspackOutput['chunkLoading']): this;
252
+ chunkFormat(value: RspackOutput['chunkFormat']): this;
253
+ crossOriginLoading(value: RspackOutput['crossOriginLoading']): this;
254
+ cssChunkFilename(value: RspackOutput['cssChunkFilename']): this;
255
+ cssFilename(value: RspackOutput['cssFilename']): this;
256
+ devtoolFallbackModuleFilenameTemplate(
257
+ value: RspackOutput['devtoolFallbackModuleFilenameTemplate'],
258
+ ): this;
259
+ devtoolModuleFilenameTemplate(
260
+ value: RspackOutput['devtoolModuleFilenameTemplate'],
261
+ ): this;
262
+ devtoolNamespace(value: RspackOutput['devtoolNamespace']): this;
263
+ enabledChunkLoadingTypes(
264
+ value: RspackOutput['enabledChunkLoadingTypes'],
265
+ ): this;
266
+ filename(value: RspackOutput['filename']): this;
267
+ globalObject(value: RspackOutput['globalObject']): this;
268
+ uniqueName(value: RspackOutput['uniqueName']): this;
269
+ hashDigest(value: RspackOutput['hashDigest']): this;
270
+ hashDigestLength(value: RspackOutput['hashDigestLength']): this;
271
+ hashFunction(value: RspackOutput['hashFunction']): this;
272
+ hashSalt(value: RspackOutput['hashSalt']): this;
273
+ hotUpdateChunkFilename(value: RspackOutput['hotUpdateChunkFilename']): this;
274
+ hotUpdateGlobal(value: RspackOutput['hotUpdateGlobal']): this;
275
+ hotUpdateMainFilename(value: RspackOutput['hotUpdateMainFilename']): this;
276
+ library(value: RspackOutput['library']): this;
277
+ importFunctionName(value: RspackOutput['importFunctionName']): this;
278
+ importMetaName(value: RspackOutput['importMetaName']): this;
279
+ path(value: RspackOutput['path']): this;
280
+ pathinfo(value: RspackOutput['pathinfo']): this;
281
+ publicPath(value: RspackOutput['publicPath']): this;
282
+ scriptType(value: RspackOutput['scriptType']): this;
283
+ sourceMapFilename(value: RspackOutput['sourceMapFilename']): this;
284
+ strictModuleErrorHandling(
285
+ value: RspackOutput['strictModuleErrorHandling'],
286
+ ): this;
287
+ strictModuleExceptionHandling(
288
+ value: RspackOutput['strictModuleExceptionHandling'],
289
+ ): this;
290
+ trustedTypes(value: RspackOutput['trustedTypes']): this;
291
+ workerChunkLoading(value: RspackOutput['workerChunkLoading']): this;
292
+ workerPublicPath(value: RspackOutput['workerPublicPath']): this;
293
+ workerWasmLoading(value: RspackOutput['workerWasmLoading']): this;
294
+ enabledLibraryTypes(value: RspackOutput['enabledLibraryTypes']): this;
295
+ environment(value: RspackOutput['environment']): this;
296
+ compareBeforeEmit(value: RspackOutput['compareBeforeEmit']): this;
297
+ wasmLoading(value: RspackOutput['wasmLoading']): this;
298
+ webassemblyModuleFilename(
299
+ value: RspackOutput['webassemblyModuleFilename'],
300
+ ): this;
301
+ enabledWasmLoadingTypes(
302
+ value: RspackOutput['enabledWasmLoadingTypes'],
303
+ ): this;
304
+ iife(value: RspackOutput['iife']): this;
305
+ module(value: RspackOutput['module']): this;
306
+ clean(value: RspackOutput['clean']): this;
307
+ }
308
+
309
+ type RspackDevServer = Required<
310
+ Exclude<Configuration['devServer'], false | null | undefined>
311
+ >;
312
+
313
+ type DevServerShorthandMethods<T> = {
314
+ [K in keyof RspackDevServer]-?: (
315
+ value: RspackDevServer[K] | undefined,
316
+ ) => T;
317
+ };
318
+
319
+ // rslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
320
+ class DevServer extends TypedChainedMap<RspackChain, RspackDevServer> {}
321
+
322
+ // rslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unsafe-declaration-merging
323
+ interface DevServer extends DevServerShorthandMethods<DevServer> {}
324
+
325
+ type RspackPerformance = Exclude<
326
+ NonNullable<Configuration['performance']>,
327
+ false
328
+ >;
329
+ class Performance extends ChainedMap<RspackChain> {
330
+ hints(value: RspackPerformance['hints']): this;
331
+ maxEntrypointSize(value: RspackPerformance['maxEntrypointSize']): this;
332
+ maxAssetSize(value: RspackPerformance['maxAssetSize']): this;
333
+ assetFilter(value: RspackPerformance['assetFilter']): this;
334
+ }
335
+
336
+ type RspackResolve = Required<NonNullable<Configuration['resolve']>>;
337
+ type RspackResolveAlias = Exclude<RspackResolve['alias'], false>;
338
+ class Resolve<T = RspackChain> extends ChainedMap<T> {
339
+ alias: TypedChainedMap<this, RspackResolveAlias>;
340
+ aliasFields: TypedChainedSet<this, RspackResolve['aliasFields'][number]>;
341
+ conditionNames: TypedChainedSet<
342
+ this,
343
+ RspackResolve['conditionNames'][number]
344
+ >;
345
+ descriptionFiles: TypedChainedSet<
346
+ this,
347
+ RspackResolve['descriptionFiles'][number]
348
+ >;
349
+ extensions: TypedChainedSet<this, RspackResolve['extensions'][number]>;
350
+ extensionAlias: TypedChainedMap<this, RspackResolve['extensionAlias']>;
351
+ mainFields: TypedChainedSet<this, RspackResolve['mainFields'][number]>;
352
+ mainFiles: TypedChainedSet<this, RspackResolve['mainFiles'][number]>;
353
+ exportsFields: TypedChainedSet<
354
+ this,
355
+ RspackResolve['exportsFields'][number]
356
+ >;
357
+ importsFields: TypedChainedSet<
358
+ this,
359
+ RspackResolve['importsFields'][number]
360
+ >;
361
+ restrictions: TypedChainedSet<this, RspackResolve['restrictions'][number]>;
362
+ roots: TypedChainedSet<this, RspackResolve['roots'][number]>;
363
+ modules: TypedChainedSet<this, RspackResolve['modules'][number]>;
364
+ fallback: TypedChainedMap<this, RspackResolveAlias>;
365
+ byDependency: TypedChainedMap<this, RspackResolve['byDependency']>;
366
+ enforceExtension(
367
+ value: RspackResolve['enforceExtension'] | undefined,
368
+ ): this;
369
+ fullySpecified(value: RspackResolve['fullySpecified'] | undefined): this;
370
+ pnp(value: RspackResolve['pnp'] | undefined): this;
371
+ symlinks(value: RspackResolve['symlinks'] | undefined): this;
372
+ preferRelative(value: RspackResolve['preferRelative'] | undefined): this;
373
+ preferAbsolute(value: RspackResolve['preferAbsolute'] | undefined): this;
374
+
375
+ tsConfig(value: RspackResolve['tsConfig'] | undefined): this;
376
+ }
377
+ class RuleResolve<T = RspackChain> extends Resolve<T> {}
378
+
379
+ class ResolveLoader extends Resolve {
380
+ modules: ChainedSet<this>;
381
+ moduleExtensions: ChainedSet<this>;
382
+ packageMains: ChainedSet<this>;
383
+ }
384
+
385
+ type RspackRuleSet = RuleSetRule;
386
+
387
+ class Rule<T = Module>
388
+ extends ChainedMap<
389
+ T,
390
+ RuleSetRule,
391
+ {
392
+ use?: __Config.NamedPatches;
393
+ rules?: __Config.NamedPatches;
394
+ oneOf?: __Config.NamedPatches;
395
+ }
396
+ >
397
+ implements Orderable
398
+ {
399
+ uses: TypedChainedMap<this, { [key: string]: Use }>;
400
+ include: TypedChainedSet<this, NonNullable<RspackRuleSet['include']>>;
401
+ exclude: TypedChainedSet<this, NonNullable<RspackRuleSet['exclude']>>;
402
+ rules: TypedChainedMap<this, { [key: string]: Rule<Rule> }>;
403
+ oneOfs: TypedChainedMap<this, { [key: string]: Rule<Rule> }>;
404
+ resolve: RuleResolve<Rule<T>>;
405
+
406
+ dependency(value: RspackRuleSet['dependency']): this;
407
+ descriptionData(value: RspackRuleSet['descriptionData']): this;
408
+ enforce(value: RspackRuleSet['enforce']): this;
409
+ extractSourceMap(value: RspackRuleSet['extractSourceMap']): this;
410
+ issuer(value: RspackRuleSet['issuer']): this;
411
+ issuerLayer(value: RspackRuleSet['issuerLayer']): this;
412
+ layer(value: RspackRuleSet['layer']): this;
413
+ mimetype(value: RspackRuleSet['mimetype']): this;
414
+ phase(value: RspackRuleSet['phase']): this;
415
+ parser(value: RspackRuleSet['parser']): this;
416
+ generator(value: RspackRuleSet['generator']): this;
417
+ resource(value: RspackRuleSet['resource']): this;
418
+ resourceFragment(value: RspackRuleSet['resourceFragment']): this;
419
+ resourceQuery(value: RspackRuleSet['resourceQuery']): this;
420
+ scheme(value: RspackRuleSet['scheme']): this;
421
+ sideEffects(value: RspackRuleSet['sideEffects']): this;
422
+ with(value: RspackRuleSet['with']): this;
423
+ test(value: RspackRuleSet['test']): this;
424
+ type(value: RspackRuleSet['type']): this;
425
+
426
+ use<Options extends LoaderOptions = LoaderOptions>(
427
+ name: string,
428
+ ): Use<this, Options>;
429
+ rule(name: string): Rule<Rule>;
430
+ oneOf(name: string): Rule<Rule>;
431
+ pre(): this;
432
+ post(): this;
433
+ before(name: string): this;
434
+ after(name: string): this;
435
+ }
436
+
437
+ type RspackOptimization = NonNullable<Configuration['optimization']>;
438
+ type SplitChunksObject = Exclude<
439
+ RspackOptimization['splitChunks'],
440
+ false | undefined
441
+ >;
442
+ class Optimization extends ChainedMap<RspackChain> {
443
+ minimizer(name: string): RspackChain.Plugin<this, PluginInstance>;
444
+ minimizers: TypedChainedMap<this, RspackChain.Plugin<this, PluginInstance>>;
445
+ splitChunks: TypedChainedMap<this, SplitChunksObject> &
446
+ ((value: SplitChunksObject | false) => this);
447
+
448
+ minimize(value: RspackOptimization['minimize']): this;
449
+ runtimeChunk(value: RspackOptimization['runtimeChunk']): this;
450
+ emitOnErrors(value: RspackOptimization['emitOnErrors']): this;
451
+ moduleIds(value: RspackOptimization['moduleIds']): this;
452
+ chunkIds(value: RspackOptimization['chunkIds']): this;
453
+ nodeEnv(value: RspackOptimization['nodeEnv']): this;
454
+ removeEmptyChunks(value: RspackOptimization['removeEmptyChunks']): this;
455
+ mergeDuplicateChunks(
456
+ value: RspackOptimization['mergeDuplicateChunks'],
457
+ ): this;
458
+ providedExports(value: RspackOptimization['providedExports']): this;
459
+ usedExports(value: RspackOptimization['usedExports']): this;
460
+ concatenateModules(value: RspackOptimization['concatenateModules']): this;
461
+ sideEffects(value: RspackOptimization['sideEffects']): this;
462
+ mangleExports(value: RspackOptimization['mangleExports']): this;
463
+ innerGraph(value: RspackOptimization['innerGraph']): this;
464
+ realContentHash(value: RspackOptimization['realContentHash']): this;
465
+ avoidEntryIife(value: RspackOptimization['avoidEntryIife']): this;
466
+ inlineExports(value: RspackOptimization['inlineExports']): this;
467
+ }
468
+
469
+ interface RuntimeChunk {
470
+ name: string | RuntimeChunkFunction;
471
+ }
472
+
473
+ type RuntimeChunkFunction = (entryPoint: EntryPoint) => string;
474
+
475
+ interface SplitChunksOptions {
476
+ [name: string]: any;
477
+ }
478
+
479
+ type LoaderOptions = NonNullable<RuleSetLoaderWithOptions['options']>;
480
+
481
+ type LoaderParallelOptions = NonNullable<
482
+ RuleSetLoaderWithOptions['parallel']
483
+ >;
484
+
485
+ class Use<Parent = Rule, Options extends LoaderOptions = LoaderOptions>
486
+ extends ChainedMap<
487
+ Parent,
488
+ Omit<RuleSetLoaderWithOptions, 'options'> & { options?: Options }
489
+ >
490
+ implements Orderable
491
+ {
492
+ ident(value: RuleSetLoaderWithOptions['ident']): this;
493
+ loader(value: string | undefined): this;
494
+ options(value: Options | undefined): this;
495
+ parallel(value: LoaderParallelOptions | undefined): this;
496
+
497
+ tap(f: (options: Options) => Options): this;
498
+
499
+ // Orderable
500
+ before(name: string): this;
501
+ after(name: string): this;
502
+ }
503
+
504
+ // [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map[-debugids].
505
+ export type DevTool = NonNullable<RspackConfig['devtool']>;
506
+
507
+ interface PluginClass<PluginType extends PluginInstance> {
508
+ new (...opts: any[]): PluginType;
509
+ }
510
+
511
+ interface Orderable {
512
+ before(name: string): this;
513
+ after(name: string): this;
514
+ }
515
+ }