@rsbuild/core 1.2.5 → 1.2.7

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,19 +1,19 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 9605: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 5130: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(7999);
5
+ const loader = __nccwpck_require__(9176);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(2666).defaultGetLocalIdent;
8
+ __nccwpck_require__(4913).defaultGetLocalIdent;
9
9
  },
10
- 7999: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 9176: (__unused_webpack_module, exports, __nccwpck_require__) => {
11
11
  "use strict";
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports["default"] = loader;
14
14
  var _postcss = _interopRequireDefault(__nccwpck_require__(9409));
15
- var _plugins = __nccwpck_require__(3604);
16
- var _utils = __nccwpck_require__(2666);
15
+ var _plugins = __nccwpck_require__(135);
16
+ var _utils = __nccwpck_require__(4913);
17
17
  function _interopRequireDefault(obj) {
18
18
  return obj && obj.__esModule ? obj : { default: obj };
19
19
  }
@@ -236,7 +236,7 @@
236
236
  callback(null, `${importCode}${moduleCode}${exportCode}`);
237
237
  }
238
238
  },
239
- 3604: (__unused_webpack_module, exports, __nccwpck_require__) => {
239
+ 135: (__unused_webpack_module, exports, __nccwpck_require__) => {
240
240
  "use strict";
241
241
  Object.defineProperty(exports, "__esModule", { value: true });
242
242
  Object.defineProperty(exports, "icssParser", {
@@ -258,22 +258,22 @@
258
258
  },
259
259
  });
260
260
  var _postcssImportParser = _interopRequireDefault(
261
- __nccwpck_require__(1663),
261
+ __nccwpck_require__(6676),
262
262
  );
263
263
  var _postcssIcssParser = _interopRequireDefault(
264
- __nccwpck_require__(6178),
264
+ __nccwpck_require__(2129),
265
265
  );
266
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(7973));
266
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(872));
267
267
  function _interopRequireDefault(obj) {
268
268
  return obj && obj.__esModule ? obj : { default: obj };
269
269
  }
270
270
  },
271
- 6178: (__unused_webpack_module, exports, __nccwpck_require__) => {
271
+ 2129: (__unused_webpack_module, exports, __nccwpck_require__) => {
272
272
  "use strict";
273
273
  Object.defineProperty(exports, "__esModule", { value: true });
274
274
  exports["default"] = void 0;
275
275
  var _icssUtils = __nccwpck_require__(7937);
276
- var _utils = __nccwpck_require__(2666);
276
+ var _utils = __nccwpck_require__(4913);
277
277
  const plugin = (options = {}) => ({
278
278
  postcssPlugin: "postcss-icss-parser",
279
279
  async OnceExit(root) {
@@ -372,14 +372,14 @@
372
372
  plugin.postcss = true;
373
373
  var _default = (exports["default"] = plugin);
374
374
  },
375
- 1663: (__unused_webpack_module, exports, __nccwpck_require__) => {
375
+ 6676: (__unused_webpack_module, exports, __nccwpck_require__) => {
376
376
  "use strict";
377
377
  Object.defineProperty(exports, "__esModule", { value: true });
378
378
  exports["default"] = void 0;
379
379
  var _postcssValueParser = _interopRequireDefault(
380
380
  __nccwpck_require__(2948),
381
381
  );
382
- var _utils = __nccwpck_require__(2666);
382
+ var _utils = __nccwpck_require__(4913);
383
383
  function _interopRequireDefault(obj) {
384
384
  return obj && obj.__esModule ? obj : { default: obj };
385
385
  }
@@ -684,14 +684,14 @@
684
684
  plugin.postcss = true;
685
685
  var _default = (exports["default"] = plugin);
686
686
  },
687
- 7973: (__unused_webpack_module, exports, __nccwpck_require__) => {
687
+ 872: (__unused_webpack_module, exports, __nccwpck_require__) => {
688
688
  "use strict";
689
689
  Object.defineProperty(exports, "__esModule", { value: true });
690
690
  exports["default"] = void 0;
691
691
  var _postcssValueParser = _interopRequireDefault(
692
692
  __nccwpck_require__(2948),
693
693
  );
694
- var _utils = __nccwpck_require__(2666);
694
+ var _utils = __nccwpck_require__(4913);
695
695
  function _interopRequireDefault(obj) {
696
696
  return obj && obj.__esModule ? obj : { default: obj };
697
697
  }
@@ -1034,7 +1034,7 @@
1034
1034
  plugin.postcss = true;
1035
1035
  var _default = (exports["default"] = plugin);
1036
1036
  },
1037
- 2666: (__unused_webpack_module, exports, __nccwpck_require__) => {
1037
+ 4913: (__unused_webpack_module, exports, __nccwpck_require__) => {
1038
1038
  "use strict";
1039
1039
  Object.defineProperty(exports, "__esModule", { value: true });
1040
1040
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
@@ -7984,6 +7984,6 @@
7984
7984
  }
7985
7985
  if (typeof __nccwpck_require__ !== "undefined")
7986
7986
  __nccwpck_require__.ab = __dirname + "/";
7987
- var __webpack_exports__ = __nccwpck_require__(9605);
7987
+ var __webpack_exports__ = __nccwpck_require__(5130);
7988
7988
  module.exports = __webpack_exports__;
7989
7989
  })();
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 945: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 516: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(210);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(481);
6
6
  const compilerMap = new WeakMap();
7
7
  class CachedChildCompilation {
8
8
  constructor(compiler) {
@@ -304,7 +304,7 @@
304
304
  }
305
305
  module.exports = { CachedChildCompilation };
306
306
  },
307
- 210: (module) => {
307
+ 481: (module) => {
308
308
  "use strict";
309
309
  class HtmlWebpackChildCompiler {
310
310
  constructor(templates) {
@@ -473,7 +473,7 @@
473
473
  }
474
474
  module.exports = { HtmlWebpackChildCompiler };
475
475
  },
476
- 306: (module) => {
476
+ 327: (module) => {
477
477
  "use strict";
478
478
  module.exports = {};
479
479
  module.exports.none = (chunks) => chunks;
@@ -492,7 +492,7 @@
492
492
  };
493
493
  module.exports.auto = module.exports.none;
494
494
  },
495
- 461: (module) => {
495
+ 130: (module) => {
496
496
  "use strict";
497
497
  module.exports = function (err) {
498
498
  return {
@@ -513,7 +513,7 @@
513
513
  };
514
514
  };
515
515
  },
516
- 652: (module, __unused_webpack_exports, __nccwpck_require__) => {
516
+ 641: (module, __unused_webpack_exports, __nccwpck_require__) => {
517
517
  "use strict";
518
518
  const { AsyncSeriesWaterfallHook } = __nccwpck_require__(408);
519
519
  const htmlWebpackPluginHooksMap = new WeakMap();
@@ -539,7 +539,7 @@
539
539
  }
540
540
  module.exports = { getHtmlRspackPluginHooks };
541
541
  },
542
- 401: (module) => {
542
+ 248: (module) => {
543
543
  const voidTags = [
544
544
  "area",
545
545
  "base",
@@ -607,19 +607,19 @@
607
607
  htmlTagObjectToString,
608
608
  };
609
609
  },
610
- 148: (module, __unused_webpack_exports, __nccwpck_require__) => {
610
+ 181: (module, __unused_webpack_exports, __nccwpck_require__) => {
611
611
  "use strict";
612
612
  const promisify = __nccwpck_require__(23).promisify;
613
613
  const vm = __nccwpck_require__(154);
614
614
  const fs = __nccwpck_require__(896);
615
615
  const path = __nccwpck_require__(928);
616
- const { CachedChildCompilation } = __nccwpck_require__(945);
616
+ const { CachedChildCompilation } = __nccwpck_require__(516);
617
617
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
618
- __nccwpck_require__(401);
619
- const prettyError = __nccwpck_require__(461);
620
- const chunkSorter = __nccwpck_require__(306);
618
+ __nccwpck_require__(248);
619
+ const prettyError = __nccwpck_require__(130);
620
+ const chunkSorter = __nccwpck_require__(327);
621
621
  const getHtmlRspackPluginHooks =
622
- __nccwpck_require__(652).getHtmlRspackPluginHooks;
622
+ __nccwpck_require__(641).getHtmlRspackPluginHooks;
623
623
  class HtmlRspackPlugin {
624
624
  constructor(userOptions = {}) {
625
625
  this.version = HtmlRspackPlugin.version;
@@ -1578,6 +1578,6 @@
1578
1578
  }
1579
1579
  if (typeof __nccwpck_require__ !== "undefined")
1580
1580
  __nccwpck_require__.ab = __dirname + "/";
1581
- var __webpack_exports__ = __nccwpck_require__(148);
1581
+ var __webpack_exports__ = __nccwpck_require__(181);
1582
1582
  module.exports = __webpack_exports__;
1583
1583
  })();
@@ -1,15 +1,15 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 15: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(49)["default"];
4
+ 595: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(421)["default"];
6
6
  },
7
- 49: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 421: (__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 _path = _interopRequireDefault(__nccwpck_require__(928));
12
- var _utils = __nccwpck_require__(628);
12
+ var _utils = __nccwpck_require__(824);
13
13
  function _interopRequireDefault(obj) {
14
14
  return obj && obj.__esModule ? obj : { default: obj };
15
15
  }
@@ -179,7 +179,7 @@
179
179
  callback(null, result.css, map, { ast });
180
180
  }
181
181
  },
182
- 628: (module, exports, __nccwpck_require__) => {
182
+ 824: (module, exports, __nccwpck_require__) => {
183
183
  module = __nccwpck_require__.nmd(module);
184
184
  Object.defineProperty(exports, "__esModule", { value: true });
185
185
  exports.exec = exec;
@@ -716,6 +716,6 @@
716
716
  })();
717
717
  if (typeof __nccwpck_require__ !== "undefined")
718
718
  __nccwpck_require__.ab = __dirname + "/";
719
- var __webpack_exports__ = __nccwpck_require__(15);
719
+ var __webpack_exports__ = __nccwpck_require__(595);
720
720
  module.exports = __webpack_exports__;
721
721
  })();
@@ -1,7 +1,7 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 22: (__unused_webpack_module, exports, __nccwpck_require__) => {
4
+ 613: (__unused_webpack_module, exports, __nccwpck_require__) => {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.transformFiles =
7
7
  exports.reduceChunk =
@@ -120,7 +120,7 @@
120
120
  .map(standardizeFilePaths);
121
121
  exports.transformFiles = transformFiles;
122
122
  },
123
- 279: (__unused_webpack_module, exports, __nccwpck_require__) => {
123
+ 600: (__unused_webpack_module, exports, __nccwpck_require__) => {
124
124
  Object.defineProperty(exports, "__esModule", { value: true });
125
125
  exports.normalModuleLoaderHook =
126
126
  exports.getCompilerHooks =
@@ -130,7 +130,7 @@
130
130
  const fs_1 = __nccwpck_require__(896);
131
131
  const path_1 = __nccwpck_require__(928);
132
132
  const lite_tapable_1 = __nccwpck_require__(408);
133
- const helpers_1 = __nccwpck_require__(22);
133
+ const helpers_1 = __nccwpck_require__(613);
134
134
  const compilerHookMap = new WeakMap();
135
135
  const getCompilerHooks = (compiler) => {
136
136
  let hooks = compilerHookMap.get(compiler);
@@ -312,7 +312,7 @@
312
312
  exports.getCompilerHooks =
313
313
  void 0;
314
314
  const path_1 = __nccwpck_require__(928);
315
- const hooks_1 = __nccwpck_require__(279);
315
+ const hooks_1 = __nccwpck_require__(600);
316
316
  Object.defineProperty(exports, "getCompilerHooks", {
317
317
  enumerable: true,
318
318
  get: function () {
package/dist/index.cjs CHANGED
@@ -1708,7 +1708,7 @@ var __webpack_exports__ = {};
1708
1708
  async function createContext(options, userConfig, bundlerType) {
1709
1709
  let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_namespaceObject.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
1710
1710
  return {
1711
- version: "1.2.5",
1711
+ version: "1.2.7",
1712
1712
  rootPath,
1713
1713
  distPath: '',
1714
1714
  cachePath,
@@ -2368,12 +2368,12 @@ var __webpack_exports__ = {};
2368
2368
  let excludeAsset = (asset)=>/\.(?:map|LICENSE\.txt)$/.test(asset.name), getAssetColor = (size)=>size > 300000 ? index_js_default().red : size > 100000 ? index_js_default().yellow : index_js_default().green, calcFileSize = (len)=>{
2369
2369
  let val = len / 1000;
2370
2370
  return `${val.toFixed(val < 1 ? 2 : 1)} kB`;
2371
- }, coloringAssetName = (assetName)=>JS_REGEX.test(assetName) ? index_js_default().cyan(assetName) : CSS_REGEX.test(assetName) ? index_js_default().yellow(assetName) : HTML_REGEX.test(assetName) ? index_js_default().green(assetName) : index_js_default().magenta(assetName);
2371
+ }, coloringAssetName = (assetName)=>JS_REGEX.test(assetName) ? index_js_default().cyan(assetName) : CSS_REGEX.test(assetName) ? index_js_default().yellow(assetName) : HTML_REGEX.test(assetName) ? index_js_default().green(assetName) : index_js_default().magenta(assetName), COMPRESSIBLE_REGEX = /\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest)$/i, isCompressible = (assetName)=>COMPRESSIBLE_REGEX.test(assetName);
2372
2372
  async function printFileSizes(options, stats, rootPath, environmentName) {
2373
2373
  let logs = [];
2374
2374
  if (!1 === options.detail && !1 === options.total) return logs;
2375
2375
  let formatAsset = async (asset, distPath, distFolder)=>{
2376
- let fileName = asset.name.split('?')[0], contents = await external_node_fs_default().promises.readFile(external_node_path_default().join(distPath, fileName)), size = contents.length, gzippedSize = options.compressed ? await gzipSize(contents) : null, gzipSizeLabel = gzippedSize ? getAssetColor(gzippedSize)(calcFileSize(gzippedSize)) : null;
2376
+ let fileName = asset.name.split('?')[0], contents = await external_node_fs_default().promises.readFile(external_node_path_default().join(distPath, fileName)), size = contents.length, gzippedSize = options.compressed && isCompressible(fileName) ? await gzipSize(contents) : null, gzipSizeLabel = gzippedSize ? getAssetColor(gzippedSize)(calcFileSize(gzippedSize)) : null;
2377
2377
  return {
2378
2378
  size,
2379
2379
  folder: external_node_path_default().join(distFolder, external_node_path_default().dirname(fileName)),
@@ -6640,12 +6640,12 @@ ${section.body}` : section.body).join("\n\n"));
6640
6640
  }
6641
6641
  }(), process.title = 'rsbuild-node';
6642
6642
  let { npm_execpath } = process.env;
6643
- (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.2.5\n`);
6643
+ (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.2.7\n`);
6644
6644
  }();
6645
6645
  try {
6646
6646
  !function() {
6647
6647
  let cli = cac_dist('rsbuild');
6648
- cli.help(), cli.version("1.2.5"), applyCommonOptions(cli);
6648
+ cli.help(), cli.version("1.2.7"), applyCommonOptions(cli);
6649
6649
  let devCommand = cli.command('dev', 'starting the dev server'), buildCommand = cli.command('build', 'build the app for production'), previewCommand = cli.command('preview', 'preview the production build locally'), inspectCommand = cli.command('inspect', 'inspect the Rspack and Rsbuild configs');
6650
6650
  applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
6651
6651
  try {
@@ -6696,7 +6696,7 @@ ${section.body}` : section.body).join("\n\n"));
6696
6696
  rslog_index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), rslog_index_js_namespaceObject.logger.error(err);
6697
6697
  }
6698
6698
  }
6699
- let src_rslib_entry_version = "1.2.5";
6699
+ let src_rslib_entry_version = "1.2.7";
6700
6700
  })();
6701
6701
  var __webpack_export_target__ = exports;
6702
6702
  for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
package/dist/index.js CHANGED
@@ -1617,7 +1617,7 @@ async function updateEnvironmentContext(context, configs) {
1617
1617
  async function createContext(options, userConfig, bundlerType) {
1618
1618
  let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
1619
1619
  return {
1620
- version: "1.2.5",
1620
+ version: "1.2.7",
1621
1621
  rootPath,
1622
1622
  distPath: '',
1623
1623
  cachePath,
@@ -2274,12 +2274,12 @@ async function gzipSize(input) {
2274
2274
  let excludeAsset = (asset)=>/\.(?:map|LICENSE\.txt)$/.test(asset.name), getAssetColor = (size)=>size > 300000 ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.red : size > 100000 ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.yellow : __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.green, calcFileSize = (len)=>{
2275
2275
  let val = len / 1000;
2276
2276
  return `${val.toFixed(val < 1 ? 2 : 1)} kB`;
2277
- }, coloringAssetName = (assetName)=>JS_REGEX.test(assetName) ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.cyan(assetName) : CSS_REGEX.test(assetName) ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.yellow(assetName) : HTML_REGEX.test(assetName) ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.green(assetName) : __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.magenta(assetName);
2277
+ }, coloringAssetName = (assetName)=>JS_REGEX.test(assetName) ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.cyan(assetName) : CSS_REGEX.test(assetName) ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.yellow(assetName) : HTML_REGEX.test(assetName) ? __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.green(assetName) : __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.magenta(assetName), COMPRESSIBLE_REGEX = /\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest)$/i, isCompressible = (assetName)=>COMPRESSIBLE_REGEX.test(assetName);
2278
2278
  async function printFileSizes(options, stats, rootPath, environmentName) {
2279
2279
  let logs = [];
2280
2280
  if (!1 === options.detail && !1 === options.total) return logs;
2281
2281
  let formatAsset = async (asset, distPath, distFolder)=>{
2282
- let fileName = asset.name.split('?')[0], contents = await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default.promises.readFile(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.join(distPath, fileName)), size = contents.length, gzippedSize = options.compressed ? await gzipSize(contents) : null, gzipSizeLabel = gzippedSize ? getAssetColor(gzippedSize)(calcFileSize(gzippedSize)) : null;
2282
+ let fileName = asset.name.split('?')[0], contents = await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default.promises.readFile(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.join(distPath, fileName)), size = contents.length, gzippedSize = options.compressed && isCompressible(fileName) ? await gzipSize(contents) : null, gzipSizeLabel = gzippedSize ? getAssetColor(gzippedSize)(calcFileSize(gzippedSize)) : null;
2283
2283
  return {
2284
2284
  size,
2285
2285
  folder: __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.join(distFolder, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.dirname(fileName)),
@@ -6528,12 +6528,12 @@ async function runCLI() {
6528
6528
  }
6529
6529
  }(), process.title = 'rsbuild-node';
6530
6530
  let { npm_execpath } = process.env;
6531
- (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.2.5\n`);
6531
+ (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.2.7\n`);
6532
6532
  }();
6533
6533
  try {
6534
6534
  !function() {
6535
6535
  let cli = cac_dist('rsbuild');
6536
- cli.help(), cli.version("1.2.5"), applyCommonOptions(cli);
6536
+ cli.help(), cli.version("1.2.7"), applyCommonOptions(cli);
6537
6537
  let devCommand = cli.command('dev', 'starting the dev server'), buildCommand = cli.command('build', 'build the app for production'), previewCommand = cli.command('preview', 'preview the production build locally'), inspectCommand = cli.command('inspect', 'inspect the Rspack and Rsbuild configs');
6538
6538
  applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
6539
6539
  try {
@@ -6584,6 +6584,6 @@ async function runCLI() {
6584
6584
  __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error('Failed to start Rsbuild CLI.'), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error(err);
6585
6585
  }
6586
6586
  }
6587
- let src_version = "1.2.5";
6587
+ let src_version = "1.2.7";
6588
6588
  var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack;
6589
6589
  export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defineConfig, ensureAssetPrefix, config_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, runCLI, src_version as version, __webpack_exports__logger as logger, __webpack_exports__rspack as rspack };
@@ -325,8 +325,16 @@ export interface SecurityConfig {
325
325
  export type NormalizedSecurityConfig = Required<SecurityConfig>;
326
326
  export type ConsoleType = 'log' | 'info' | 'warn' | 'error' | 'table' | 'group';
327
327
  export type BuildCacheOptions = {
328
- /** Base directory for the filesystem cache. */
328
+ /**
329
+ * The output directory of the cache files.
330
+ * @default 'node_modules/.cache'
331
+ */
329
332
  cacheDirectory?: string;
333
+ /**
334
+ * Add additional cache digests, the previous build cache will be invalidated
335
+ * when any value in the array changes.
336
+ * @default undefined
337
+ */
330
338
  cacheDigest?: Array<string | undefined>;
331
339
  };
332
340
  export type PrintFileSizeAsset = {
@@ -400,7 +408,8 @@ export interface PerformanceConfig {
400
408
  */
401
409
  removeMomentLocale?: boolean;
402
410
  /**
403
- * Controls the Rsbuild's caching behavior during the build process.
411
+ * To enable or configure persistent build cache.
412
+ * @experimental This feature is experimental and may be changed in the future.
404
413
  */
405
414
  buildCache?: BuildCacheOptions | boolean;
406
415
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {
@@ -46,7 +46,7 @@
46
46
  "types.d.ts"
47
47
  ],
48
48
  "dependencies": {
49
- "@rspack/core": "1.2.2",
49
+ "@rspack/core": "1.2.3",
50
50
  "@rspack/lite-tapable": "~1.0.1",
51
51
  "@swc/helpers": "^0.5.15",
52
52
  "core-js": "~3.40.0"