@rsbuild/core 2.0.0-alpha.0 → 2.0.0-alpha.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.
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 801: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 992: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(786);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(381);
6
6
  const compilerMap = new WeakMap();
7
7
  class CachedChildCompilation {
8
8
  constructor(compiler) {
@@ -311,7 +311,7 @@
311
311
  }
312
312
  module.exports = { CachedChildCompilation };
313
313
  },
314
- 786: (module) => {
314
+ 381: (module) => {
315
315
  "use strict";
316
316
  class HtmlWebpackChildCompiler {
317
317
  constructor(templates) {
@@ -480,7 +480,7 @@
480
480
  }
481
481
  module.exports = { HtmlWebpackChildCompiler };
482
482
  },
483
- 794: (module) => {
483
+ 3: (module) => {
484
484
  "use strict";
485
485
  module.exports = {};
486
486
  module.exports.none = (chunks) => chunks;
@@ -499,7 +499,7 @@
499
499
  };
500
500
  module.exports.auto = module.exports.none;
501
501
  },
502
- 805: (module) => {
502
+ 438: (module) => {
503
503
  "use strict";
504
504
  module.exports = function (err) {
505
505
  return {
@@ -520,7 +520,7 @@
520
520
  };
521
521
  };
522
522
  },
523
- 500: (module, __unused_webpack_exports, __nccwpck_require__) => {
523
+ 573: (module, __unused_webpack_exports, __nccwpck_require__) => {
524
524
  "use strict";
525
525
  const { AsyncSeriesWaterfallHook } = __nccwpck_require__(408);
526
526
  const htmlWebpackPluginHooksMap = new WeakMap();
@@ -546,7 +546,7 @@
546
546
  }
547
547
  module.exports = { getHtmlRspackPluginHooks };
548
548
  },
549
- 425: (module) => {
549
+ 956: (module) => {
550
550
  const voidTags = [
551
551
  "area",
552
552
  "base",
@@ -614,19 +614,19 @@
614
614
  htmlTagObjectToString,
615
615
  };
616
616
  },
617
- 396: (module, __unused_webpack_exports, __nccwpck_require__) => {
617
+ 249: (module, __unused_webpack_exports, __nccwpck_require__) => {
618
618
  "use strict";
619
619
  const promisify = __nccwpck_require__(23).promisify;
620
620
  const vm = __nccwpck_require__(154);
621
621
  const fs = __nccwpck_require__(896);
622
622
  const path = __nccwpck_require__(928);
623
- const { CachedChildCompilation } = __nccwpck_require__(801);
623
+ const { CachedChildCompilation } = __nccwpck_require__(992);
624
624
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
625
- __nccwpck_require__(425);
626
- const prettyError = __nccwpck_require__(805);
627
- const chunkSorter = __nccwpck_require__(794);
625
+ __nccwpck_require__(956);
626
+ const prettyError = __nccwpck_require__(438);
627
+ const chunkSorter = __nccwpck_require__(3);
628
628
  const getHtmlRspackPluginHooks =
629
- __nccwpck_require__(500).getHtmlRspackPluginHooks;
629
+ __nccwpck_require__(573).getHtmlRspackPluginHooks;
630
630
  const WITH_PLACEHOLDER = "function __with_placeholder__";
631
631
  class HtmlRspackPlugin {
632
632
  constructor(userOptions = {}) {
@@ -1597,6 +1597,6 @@
1597
1597
  }
1598
1598
  if (typeof __nccwpck_require__ !== "undefined")
1599
1599
  __nccwpck_require__.ab = __dirname + "/";
1600
- var __webpack_exports__ = __nccwpck_require__(396);
1600
+ var __webpack_exports__ = __nccwpck_require__(249);
1601
1601
  module.exports = __webpack_exports__;
1602
1602
  })();
@@ -1,15 +1,15 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 735: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(857)["default"];
4
+ 396: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(586)["default"];
6
6
  },
7
- 857: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 586: (__unused_webpack_module, exports, __nccwpck_require__) => {
8
8
  var __webpack_unused_export__;
9
9
  __webpack_unused_export__ = { value: true };
10
10
  exports["default"] = loader;
11
11
  var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
12
- var _utils = __nccwpck_require__(220);
12
+ var _utils = __nccwpck_require__(179);
13
13
  function _interopRequireDefault(e) {
14
14
  return e && e.__esModule ? e : { default: e };
15
15
  }
@@ -179,7 +179,7 @@
179
179
  callback(null, result.css, map, { ast });
180
180
  }
181
181
  },
182
- 220: (module, exports, __nccwpck_require__) => {
182
+ 179: (module, exports, __nccwpck_require__) => {
183
183
  module = __nccwpck_require__.nmd(module);
184
184
  Object.defineProperty(exports, "__esModule", { value: true });
185
185
  exports.exec = exec;
@@ -715,6 +715,6 @@
715
715
  })();
716
716
  if (typeof __nccwpck_require__ !== "undefined")
717
717
  __nccwpck_require__.ab = __dirname + "/";
718
- var __webpack_exports__ = __nccwpck_require__(735);
718
+ var __webpack_exports__ = __nccwpck_require__(396);
719
719
  module.exports = __webpack_exports__;
720
720
  })();
@@ -1 +1 @@
1
- {"name":"rspack-chain","author":"rspack-contrib","version":"1.4.3","license":"MIT","types":"types/index.d.ts","type":"module"}
1
+ {"name":"rspack-chain","version":"2.0.0-alpha.0","license":"MIT","types":"types/index.d.ts","type":"module"}
@@ -88,20 +88,11 @@ declare class Config extends __Config.ChainedMap<void> {
88
88
  experiments(value: RspackConfig['experiments']): this;
89
89
  amd(value: RspackConfig['amd']): this;
90
90
  bail(value: RspackConfig['bail']): this;
91
- // Rspack only supports boolean cache
92
- cache(value: any): this;
91
+ cache(value: RspackConfig['cache']): this;
93
92
  dependencies(value: RspackConfig['dependencies']): this;
94
93
  ignoreWarnings(value: RspackConfig['ignoreWarnings']): this;
95
94
  loader(value: RspackConfig['loader']): this;
96
- // @ts-expect-error not supported by Rspack
97
- parallelism(value: RspackConfig['parallelism']): this;
98
95
  profile(value: RspackConfig['profile']): this;
99
- // @ts-expect-error not supported by Rspack
100
- recordsPath(value: RspackConfig['recordsPath']): this;
101
- // @ts-expect-error not supported by Rspack
102
- recordsInputPath(value: RspackConfig['recordsInputPath']): this;
103
- // @ts-expect-error not supported by Rspack
104
- recordsOutputPath(value: RspackConfig['recordsOutputPath']): this;
105
96
  name(value: RspackConfig['name']): this;
106
97
  infrastructureLogging(value: RspackConfig['infrastructureLogging']): this;
107
98
  snapshot(value: RspackConfig['snapshot']): this;
@@ -145,7 +136,7 @@ declare namespace Config {
145
136
  { [key: string]: Plugin<Parent, PluginType> }
146
137
  > {}
147
138
 
148
- class Plugin<Parent, PluginType extends PluginInstance | ResolvePlugin>
139
+ class Plugin<Parent, PluginType extends PluginInstance>
149
140
  extends ChainedMap<Parent>
150
141
  implements Orderable
151
142
  {
@@ -190,33 +181,18 @@ declare namespace Config {
190
181
  rule(name: string): Rule;
191
182
  noParse(value: RspackModule['noParse']): this;
192
183
  unsafeCache(value: RspackModule['unsafeCache']): this;
193
- // @ts-expect-error not supported by Rspack
194
- wrappedContextCritical(value: RspackModule['wrappedContextCritical']): this;
195
- // @ts-expect-error not supported by Rspack
196
- exprContextRegExp(value: RspackModule['exprContextRegExp']): this;
197
- wrappedContextRecursive(
198
- // @ts-expect-error not supported by Rspack
199
- value: RspackModule['wrappedContextRecursive'],
200
- ): this;
201
- // @ts-expect-error not supported by Rspack
202
- strictExportPresence(value: RspackModule['strictExportPresence']): this;
203
- // @ts-expect-error not supported by Rspack
204
- wrappedContextRegExp(value: RspackModule['wrappedContextRegExp']): this;
205
184
  }
206
185
 
207
186
  type RspackOutput = Required<NonNullable<Configuration['output']>>;
208
187
 
209
188
  class Output extends ChainedMap<Config> {
210
- auxiliaryComment(value: RspackOutput['auxiliaryComment']): this;
211
- charset(value: RspackOutput['charset']): this;
189
+ assetModuleFilename(value: RspackOutput['assetModuleFilename']): this;
190
+ bundlerInfo(value: RspackOutput['bundlerInfo']): this;
212
191
  chunkFilename(value: RspackOutput['chunkFilename']): this;
213
192
  chunkLoadTimeout(value: RspackOutput['chunkLoadTimeout']): this;
214
193
  chunkLoadingGlobal(value: RspackOutput['chunkLoadingGlobal']): this;
215
194
  chunkLoading(value: RspackOutput['chunkLoading']): this;
216
195
  chunkFormat(value: RspackOutput['chunkFormat']): this;
217
- enabledChunkLoadingTypes(
218
- value: RspackOutput['enabledChunkLoadingTypes'],
219
- ): this;
220
196
  crossOriginLoading(value: RspackOutput['crossOriginLoading']): this;
221
197
  devtoolFallbackModuleFilenameTemplate(
222
198
  value: RspackOutput['devtoolFallbackModuleFilenameTemplate'],
@@ -225,8 +201,10 @@ declare namespace Config {
225
201
  value: RspackOutput['devtoolModuleFilenameTemplate'],
226
202
  ): this;
227
203
  devtoolNamespace(value: RspackOutput['devtoolNamespace']): this;
204
+ enabledChunkLoadingTypes(
205
+ value: RspackOutput['enabledChunkLoadingTypes'],
206
+ ): this;
228
207
  filename(value: RspackOutput['filename']): this;
229
- assetModuleFilename(value: RspackOutput['assetModuleFilename']): this;
230
208
  globalObject(value: RspackOutput['globalObject']): this;
231
209
  uniqueName(value: RspackOutput['uniqueName']): this;
232
210
  hashDigest(value: RspackOutput['hashDigest']): this;
@@ -237,23 +215,18 @@ declare namespace Config {
237
215
  hotUpdateGlobal(value: RspackOutput['hotUpdateGlobal']): this;
238
216
  hotUpdateMainFilename(value: RspackOutput['hotUpdateMainFilename']): this;
239
217
  library(value: RspackOutput['library']): this;
240
- libraryExport(value: RspackOutput['libraryExport']): this;
241
- libraryTarget(value: RspackOutput['libraryTarget']): this;
242
218
  importFunctionName(value: RspackOutput['importFunctionName']): this;
243
219
  path(value: RspackOutput['path']): this;
244
220
  pathinfo(value: RspackOutput['pathinfo']): this;
245
221
  publicPath(value: RspackOutput['publicPath']): this;
246
222
  scriptType(value: RspackOutput['scriptType']): this;
247
223
  sourceMapFilename(value: RspackOutput['sourceMapFilename']): this;
248
- // @ts-expect-error not supported by Rspack
249
- sourcePrefix(value: RspackOutput['sourcePrefix']): this;
250
224
  strictModuleErrorHandling(
251
225
  value: RspackOutput['strictModuleErrorHandling'],
252
226
  ): this;
253
227
  strictModuleExceptionHandling(
254
228
  value: RspackOutput['strictModuleExceptionHandling'],
255
229
  ): this;
256
- umdNamedDefine(value: RspackOutput['umdNamedDefine']): this;
257
230
  workerChunkLoading(value: RspackOutput['workerChunkLoading']): this;
258
231
  enabledLibraryTypes(value: RspackOutput['enabledLibraryTypes']): this;
259
232
  environment(value: RspackOutput['environment']): this;
@@ -363,12 +336,6 @@ declare namespace Config {
363
336
  }
364
337
 
365
338
  type RspackResolve = Required<NonNullable<Configuration['resolve']>>;
366
- type ResolvePlugin = Exclude<
367
- // @ts-expect-error Rspack does not supports resolve plugin
368
- NonNullable<ResolveOptions['plugins']>[number],
369
- '...'
370
- >;
371
-
372
339
  class Resolve<T = Config> extends ChainedMap<T> {
373
340
  alias: TypedChainedMap<this, { [key: string]: string | false | string[] }>;
374
341
  aliasFields: TypedChainedSet<this, RspackResolve['aliasFields'][number]>;
@@ -395,28 +362,16 @@ declare namespace Config {
395
362
  restrictions: TypedChainedSet<this, RspackResolve['restrictions'][number]>;
396
363
  roots: TypedChainedSet<this, RspackResolve['roots'][number]>;
397
364
  modules: TypedChainedSet<this, RspackResolve['modules'][number]>;
398
- plugins: TypedChainedMap<
399
- this,
400
- { [key: string]: Plugin<Resolve, ResolvePlugin> }
401
- >;
402
365
  fallback: TypedChainedMap<
403
366
  this,
404
367
  { [key: string]: string | false | string[] }
405
368
  >;
406
369
  byDependency: TypedChainedMap<this, RspackResolve['byDependency']>;
407
-
408
- // @ts-expect-error not supported by Rspack
409
- cachePredicate(value: RspackResolve['cachePredicate']): this;
410
- // @ts-expect-error not supported by Rspack
411
- cacheWithContext(value: RspackResolve['cacheWithContext']): this;
412
370
  enforceExtension(value: RspackResolve['enforceExtension']): this;
413
371
  symlinks(value: RspackResolve['symlinks']): this;
414
- // @ts-expect-error not supported by Rspack
415
- unsafeCache(value: RspackResolve['unsafeCache']): this;
416
372
  preferRelative(value: RspackResolve['preferRelative']): this;
417
373
  preferAbsolute(value: RspackResolve['preferAbsolute']): this;
418
374
 
419
- plugin(name: string): Plugin<this, ResolvePlugin>;
420
375
  tsConfig(value: RspackResolve['tsConfig']): this;
421
376
  }
422
377
 
@@ -481,8 +436,6 @@ declare namespace Config {
481
436
  moduleIds(value: RspackOptimization['moduleIds']): this;
482
437
  chunkIds(value: RspackOptimization['chunkIds']): this;
483
438
  nodeEnv(value: RspackOptimization['nodeEnv']): this;
484
- // @ts-expect-error not supported by Rspack
485
- mangleWasmImports(value: RspackOptimization['mangleWasmImports']): this;
486
439
  removeAvailableModules(
487
440
  value: RspackOptimization['removeAvailableModules'],
488
441
  ): this;
@@ -490,14 +443,10 @@ declare namespace Config {
490
443
  mergeDuplicateChunks(
491
444
  value: RspackOptimization['mergeDuplicateChunks'],
492
445
  ): this;
493
- // @ts-expect-error not supported by Rspack
494
- flagIncludedChunks(value: RspackOptimization['flagIncludedChunks']): this;
495
446
  providedExports(value: RspackOptimization['providedExports']): this;
496
447
  usedExports(value: RspackOptimization['usedExports']): this;
497
448
  concatenateModules(value: RspackOptimization['concatenateModules']): this;
498
449
  sideEffects(value: RspackOptimization['sideEffects']): this;
499
- // @ts-expect-error not supported by Rspack
500
- portableRecords(value: RspackOptimization['portableRecords']): this;
501
450
  mangleExports(value: RspackOptimization['mangleExports']): this;
502
451
  innerGraph(value: RspackOptimization['innerGraph']): this;
503
452
  realContentHash(value: RspackOptimization['realContentHash']): this;
@@ -534,7 +483,7 @@ declare namespace Config {
534
483
  // [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map[-debugids].
535
484
  export type DevTool = RspackConfig['devtool'];
536
485
 
537
- interface PluginClass<PluginType extends PluginInstance | ResolvePlugin> {
486
+ interface PluginClass<PluginType extends PluginInstance> {
538
487
  new (...opts: any[]): PluginType;
539
488
  }
540
489