@rsbuild/core 1.7.0-beta.2 → 1.7.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.
@@ -1,15 +1,15 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 425: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(915)["default"];
4
+ 593: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(451)["default"];
6
6
  },
7
- 915: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 451: (__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__(966);
12
+ var _utils = __nccwpck_require__(574);
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
- 966: (module, exports, __nccwpck_require__) => {
182
+ 574: (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__(425);
718
+ var __webpack_exports__ = __nccwpck_require__(593);
719
719
  module.exports = __webpack_exports__;
720
720
  })();
@@ -1,7 +1,7 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 845: (__unused_webpack_module, exports, __nccwpck_require__) => {
4
+ 170: (__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
- 880: (__unused_webpack_module, exports, __nccwpck_require__) => {
123
+ 163: (__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 node_fs_1 = __nccwpck_require__(24);
131
131
  const node_path_1 = __nccwpck_require__(760);
132
132
  const lite_tapable_1 = __nccwpck_require__(408);
133
- const helpers_1 = __nccwpck_require__(845);
133
+ const helpers_1 = __nccwpck_require__(170);
134
134
  const compilerHookMap = new WeakMap();
135
135
  const getCompilerHooks = (compiler) => {
136
136
  let hooks = compilerHookMap.get(compiler);
@@ -327,7 +327,7 @@
327
327
  exports.getCompilerHooks =
328
328
  void 0;
329
329
  const node_path_1 = __nccwpck_require__(760);
330
- const hooks_1 = __nccwpck_require__(880);
330
+ const hooks_1 = __nccwpck_require__(163);
331
331
  Object.defineProperty(exports, "getCompilerHooks", {
332
332
  enumerable: true,
333
333
  get: function () {
package/dist/131.js CHANGED
@@ -2661,55 +2661,8 @@ function formatStatsError(stats, root, level = 'error') {
2661
2661
  if (!message.includes("Can't resolve")) return message;
2662
2662
  let matchArray = stripVTControlCharacters(message).match(/Can't resolve '(\w+)'/);
2663
2663
  if (!matchArray) return message;
2664
- let moduleName = matchArray[1], nodeBuiltins = new Set([
2665
- 'assert',
2666
- 'buffer',
2667
- 'child_process',
2668
- 'cluster',
2669
- 'console',
2670
- 'constants',
2671
- 'crypto',
2672
- 'dgram',
2673
- 'diagnostics_channel',
2674
- 'dns',
2675
- 'domain',
2676
- 'events',
2677
- 'fs',
2678
- 'http',
2679
- 'http2',
2680
- 'https',
2681
- 'inspector',
2682
- 'module',
2683
- 'net',
2684
- 'os',
2685
- 'path',
2686
- 'perf_hooks',
2687
- 'process',
2688
- 'punycode',
2689
- 'querystring',
2690
- 'readline',
2691
- 'repl',
2692
- 'stream',
2693
- 'string_decoder',
2694
- 'sys',
2695
- 'timers',
2696
- 'tls',
2697
- 'trace_events',
2698
- 'tty',
2699
- 'url',
2700
- 'util',
2701
- 'v8',
2702
- 'vm',
2703
- 'wasi',
2704
- 'worker_threads',
2705
- 'zlib',
2706
- '_stream_duplex',
2707
- '_stream_passthrough',
2708
- '_stream_readable',
2709
- '_stream_transform',
2710
- '_stream_writable'
2711
- ]);
2712
- return moduleName && nodeBuiltins.has(moduleName) ? getTips(moduleName) : message;
2664
+ let moduleName = matchArray[1];
2665
+ return moduleName && external_node_module_.builtinModules.includes(moduleName) ? getTips(moduleName) : message;
2713
2666
  })(message = hintUnknownFiles(message)))).split('\n');
2714
2667
  return (message = (lines = lines.filter((line, index, arr)=>0 === index || '' !== line.trim() || line.trim() !== arr[index - 1].trim())).join('\n')).trim();
2715
2668
  }
@@ -3036,7 +2989,7 @@ let OVERRIDE_PATHS = new Set([
3036
2989
  html: {
3037
2990
  meta: {
3038
2991
  charset: {
3039
- charset: 'UTF-8'
2992
+ charset: 'utf-8'
3040
2993
  },
3041
2994
  viewport: 'width=device-width, initial-scale=1.0'
3042
2995
  },
@@ -3383,15 +3336,9 @@ function initPluginAPI({ context, pluginManager }) {
3383
3336
  return getNormalizedConfig();
3384
3337
  }
3385
3338
  throw Error(`${color.dim('[rsbuild]')} ${color.yellow('getRsbuildConfig')} get an invalid type param.`);
3386
- }, exposed = [], expose = (id, api)=>{
3387
- exposed.push({
3388
- id,
3389
- api
3390
- });
3391
- }, useExposed = (id)=>{
3392
- let matched = exposed.find((item)=>item.id === id);
3393
- if (matched) return matched.api;
3394
- }, transformId = 0, transformer = {}, processAssetsFns = [], resolveFns = [];
3339
+ }, exposed = new Map(), expose = (id, api)=>{
3340
+ exposed.set(id, api);
3341
+ }, useExposed = (id)=>exposed.get(id), transformId = 0, transformer = {}, processAssetsFns = [], resolveFns = [];
3395
3342
  hooks.modifyBundlerChain.tap((chain, { target, environment })=>{
3396
3343
  let pluginName = 'RsbuildCorePlugin';
3397
3344
  chain.plugin(pluginName).use(class {
@@ -3609,7 +3556,7 @@ function createPublicContext(context) {
3609
3556
  async function createContext(options, userConfig) {
3610
3557
  let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, bundlerType = userConfig.provider ? 'webpack' : 'rspack';
3611
3558
  return {
3612
- version: "1.7.0-beta.2",
3559
+ version: "1.7.0",
3613
3560
  rootPath,
3614
3561
  distPath: '',
3615
3562
  cachePath,
@@ -4938,7 +4885,7 @@ async function getTemplate(entryName, config, rootPath) {
4938
4885
  let mountId;
4939
4886
  return {
4940
4887
  templatePath: void 0,
4941
- templateContent: (mountId = config.html.mountId, `<!doctype html><html><head></head><body><div id="${mountId}"></div></body></html>`)
4888
+ templateContent: (mountId = config.html.mountId, `<!DOCTYPE html><html><head></head><body><div id="${mountId}"></div></body></html>`)
4942
4889
  };
4943
4890
  }
4944
4891
  let absolutePath = (0, external_node_path_.isAbsolute)(templatePath) ? templatePath : external_node_path_.default.join(rootPath, templatePath);
@@ -6345,6 +6292,16 @@ function ansiHTML(text) {
6345
6292
  });
6346
6293
  return ansiCodes.length > 0 && (ret += Array(ansiCodes.length + 1).join('</span>')), ret;
6347
6294
  }
6295
+ function formatDisplayPath(filePath, isAbsolute, root) {
6296
+ if (NODE_MODULES_REGEX.test(filePath)) for (let needle of [
6297
+ '/node_modules/',
6298
+ '\\node_modules\\'
6299
+ ]){
6300
+ let index = filePath.lastIndexOf(needle);
6301
+ if (-1 !== index) return filePath.slice(index + 1);
6302
+ }
6303
+ return root && isAbsolute ? toRelativePath(root, filePath) : filePath;
6304
+ }
6348
6305
  function convertLinksInHtml(text, root) {
6349
6306
  let PATH_RE = /(?:\.\.?[/\\]|(file:\/\/\/)?[a-zA-Z]:\\|(file:\/\/)?\/|[A-Za-z0-9._-]+[/\\])[^\s:]*:\d+:\d+/g, URL_RE = /(https?:\/\/(?:[\w-]+\.)+[a-z0-9](?:[\w-.~:/?#[\]@!$&'*+,;=])*)/gi, NODE_INTERNAL_RE = /node:internal[/\\]/, RSPACK_RUNTIME_RE = /webpack\/runtime\//, FILE_URI_WINDOWS_RE = /^file:\/\/\/([A-Za-z]:)/, FILE_URI_UNIX_RE = /^file:\/\//;
6350
6307
  return text.split('\n').map((line)=>{
@@ -6354,8 +6311,8 @@ function convertLinksInHtml(text, root) {
6354
6311
  if (!file.startsWith('file://')) return file;
6355
6312
  let windows = file.replace(FILE_URI_WINDOWS_RE, '$1');
6356
6313
  return windows !== file ? windows : file.replace(FILE_URI_UNIX_RE, '');
6357
- })(file)).includes('</span>') && !file.includes('<span'), filePath = hasClosingSpan ? file.replace('</span>', '') : file, isAbsolute = external_node_path_.default.isAbsolute(filePath), absolutePath = root && !isAbsolute ? external_node_path_.default.join(root, filePath) : filePath, relativePath = root && isAbsolute ? toRelativePath(root, filePath) : filePath;
6358
- return `<a class="file-link" data-file="${absolutePath}">${relativePath}</a>${hasClosingSpan ? '</span>' : ''}`;
6314
+ })(file)).includes('</span>') && !file.includes('<span'), filePath = hasClosingSpan ? file.replace('</span>', '') : file, isAbsolute = external_node_path_.default.isAbsolute(filePath), absolutePath = root && !isAbsolute ? external_node_path_.default.join(root, filePath) : filePath, displayPath = formatDisplayPath(filePath, isAbsolute, root);
6315
+ return `<a class="file-link" data-file="${absolutePath}">${displayPath}</a>${hasClosingSpan ? '</span>' : ''}`;
6359
6316
  });
6360
6317
  return replacedLine.replace(URL_RE, (url)=>`<a class="url-link" href="${url}" target="_blank" rel="noopener noreferrer">${url}</a>`);
6361
6318
  }).join('\n');
@@ -9243,7 +9200,7 @@ let applyServerOptions = (command)=>{
9243
9200
  };
9244
9201
  function setupCommands() {
9245
9202
  let cli = ((name = "")=>new CAC(name))('rsbuild');
9246
- cli.version("1.7.0-beta.2"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
9203
+ cli.version("1.7.0"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
9247
9204
  default: 'auto'
9248
9205
  }).option('--env-dir <dir>', 'Set the directory for loading `.env` files').option('--env-mode <mode>', 'Set the env mode to load the `.env.[mode]` file').option('--environment <name>', 'Set the environment name(s) to build', {
9249
9206
  type: [
@@ -9312,7 +9269,7 @@ function initNodeEnv() {
9312
9269
  }
9313
9270
  function showGreeting() {
9314
9271
  let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
9315
- src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.7.0-beta.2\n`);
9272
+ src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.7.0\n`);
9316
9273
  }
9317
9274
  function setupLogLevel() {
9318
9275
  let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
@@ -9333,5 +9290,5 @@ function runCLI() {
9333
9290
  src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err);
9334
9291
  }
9335
9292
  }
9336
- let src_version = "1.7.0-beta.2";
9293
+ let src_version = "1.7.0";
9337
9294
  export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, external_node_util_promisify, loadConfig_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, node_fs, node_os, node_process, rspack_rspack as rspack, runCLI, src_logger as logger, src_version as version };
package/dist/index.cjs CHANGED
@@ -2769,55 +2769,8 @@ ${section.body}` : section.body).join("\n\n"));
2769
2769
  if (!message.includes("Can't resolve")) return message;
2770
2770
  let matchArray = (0, external_node_util_.stripVTControlCharacters)(message).match(/Can't resolve '(\w+)'/);
2771
2771
  if (!matchArray) return message;
2772
- let moduleName = matchArray[1], nodeBuiltins = new Set([
2773
- 'assert',
2774
- 'buffer',
2775
- 'child_process',
2776
- 'cluster',
2777
- 'console',
2778
- 'constants',
2779
- 'crypto',
2780
- 'dgram',
2781
- 'diagnostics_channel',
2782
- 'dns',
2783
- 'domain',
2784
- 'events',
2785
- 'fs',
2786
- 'http',
2787
- 'http2',
2788
- 'https',
2789
- 'inspector',
2790
- 'module',
2791
- 'net',
2792
- 'os',
2793
- 'path',
2794
- 'perf_hooks',
2795
- 'process',
2796
- 'punycode',
2797
- 'querystring',
2798
- 'readline',
2799
- 'repl',
2800
- 'stream',
2801
- 'string_decoder',
2802
- 'sys',
2803
- 'timers',
2804
- 'tls',
2805
- 'trace_events',
2806
- 'tty',
2807
- 'url',
2808
- 'util',
2809
- 'v8',
2810
- 'vm',
2811
- 'wasi',
2812
- 'worker_threads',
2813
- 'zlib',
2814
- '_stream_duplex',
2815
- '_stream_passthrough',
2816
- '_stream_readable',
2817
- '_stream_transform',
2818
- '_stream_writable'
2819
- ]);
2820
- return moduleName && nodeBuiltins.has(moduleName) ? getTips(moduleName) : message;
2772
+ let moduleName = matchArray[1];
2773
+ return moduleName && external_node_module_.builtinModules.includes(moduleName) ? getTips(moduleName) : message;
2821
2774
  })(message = hintUnknownFiles(message)))).split('\n');
2822
2775
  return (message = (lines = lines.filter((line, index, arr)=>0 === index || '' !== line.trim() || line.trim() !== arr[index - 1].trim())).join('\n')).trim();
2823
2776
  }
@@ -3145,7 +3098,7 @@ ${section.body}` : section.body).join("\n\n"));
3145
3098
  html: {
3146
3099
  meta: {
3147
3100
  charset: {
3148
- charset: 'UTF-8'
3101
+ charset: 'utf-8'
3149
3102
  },
3150
3103
  viewport: 'width=device-width, initial-scale=1.0'
3151
3104
  },
@@ -3513,15 +3466,9 @@ ${section.body}` : section.body).join("\n\n"));
3513
3466
  return getNormalizedConfig();
3514
3467
  }
3515
3468
  throw Error(`${color.dim('[rsbuild]')} ${color.yellow('getRsbuildConfig')} get an invalid type param.`);
3516
- }, exposed = [], expose = (id, api)=>{
3517
- exposed.push({
3518
- id,
3519
- api
3520
- });
3521
- }, useExposed = (id)=>{
3522
- let matched = exposed.find((item)=>item.id === id);
3523
- if (matched) return matched.api;
3524
- }, transformId = 0, transformer = {}, processAssetsFns = [], resolveFns = [];
3469
+ }, exposed = new Map(), expose = (id, api)=>{
3470
+ exposed.set(id, api);
3471
+ }, useExposed = (id)=>exposed.get(id), transformId = 0, transformer = {}, processAssetsFns = [], resolveFns = [];
3525
3472
  hooks.modifyBundlerChain.tap((chain, { target, environment })=>{
3526
3473
  let pluginName = 'RsbuildCorePlugin';
3527
3474
  chain.plugin(pluginName).use(class {
@@ -3742,7 +3689,7 @@ ${section.body}` : section.body).join("\n\n"));
3742
3689
  async function createContext(options, userConfig) {
3743
3690
  let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, bundlerType = userConfig.provider ? 'webpack' : 'rspack';
3744
3691
  return {
3745
- version: "1.7.0-beta.2",
3692
+ version: "1.7.0",
3746
3693
  rootPath,
3747
3694
  distPath: '',
3748
3695
  cachePath,
@@ -5061,7 +5008,7 @@ ${section.body}` : section.body).join("\n\n"));
5061
5008
  let mountId;
5062
5009
  return {
5063
5010
  templatePath: void 0,
5064
- templateContent: (mountId = config.html.mountId, `<!doctype html><html><head></head><body><div id="${mountId}"></div></body></html>`)
5011
+ templateContent: (mountId = config.html.mountId, `<!DOCTYPE html><html><head></head><body><div id="${mountId}"></div></body></html>`)
5065
5012
  };
5066
5013
  }
5067
5014
  let absolutePath = (0, external_node_path_.isAbsolute)(templatePath) ? templatePath : external_node_path_default().join(rootPath, templatePath);
@@ -6467,6 +6414,16 @@ init(
6467
6414
  });
6468
6415
  return ansiCodes.length > 0 && (ret += Array(ansiCodes.length + 1).join('</span>')), ret;
6469
6416
  }
6417
+ function formatDisplayPath(filePath, isAbsolute, root) {
6418
+ if (NODE_MODULES_REGEX.test(filePath)) for (let needle of [
6419
+ '/node_modules/',
6420
+ '\\node_modules\\'
6421
+ ]){
6422
+ let index = filePath.lastIndexOf(needle);
6423
+ if (-1 !== index) return filePath.slice(index + 1);
6424
+ }
6425
+ return root && isAbsolute ? toRelativePath(root, filePath) : filePath;
6426
+ }
6470
6427
  function convertLinksInHtml(text, root) {
6471
6428
  let PATH_RE = /(?:\.\.?[/\\]|(file:\/\/\/)?[a-zA-Z]:\\|(file:\/\/)?\/|[A-Za-z0-9._-]+[/\\])[^\s:]*:\d+:\d+/g, URL_RE = /(https?:\/\/(?:[\w-]+\.)+[a-z0-9](?:[\w-.~:/?#[\]@!$&'*+,;=])*)/gi, NODE_INTERNAL_RE = /node:internal[/\\]/, RSPACK_RUNTIME_RE = /webpack\/runtime\//, FILE_URI_WINDOWS_RE = /^file:\/\/\/([A-Za-z]:)/, FILE_URI_UNIX_RE = /^file:\/\//;
6472
6429
  return text.split('\n').map((line)=>{
@@ -6476,8 +6433,8 @@ init(
6476
6433
  if (!file.startsWith('file://')) return file;
6477
6434
  let windows = file.replace(FILE_URI_WINDOWS_RE, '$1');
6478
6435
  return windows !== file ? windows : file.replace(FILE_URI_UNIX_RE, '');
6479
- })(file)).includes('</span>') && !file.includes('<span'), filePath = hasClosingSpan ? file.replace('</span>', '') : file, isAbsolute = external_node_path_default().isAbsolute(filePath), absolutePath = root && !isAbsolute ? external_node_path_default().join(root, filePath) : filePath, relativePath = root && isAbsolute ? toRelativePath(root, filePath) : filePath;
6480
- return `<a class="file-link" data-file="${absolutePath}">${relativePath}</a>${hasClosingSpan ? '</span>' : ''}`;
6436
+ })(file)).includes('</span>') && !file.includes('<span'), filePath = hasClosingSpan ? file.replace('</span>', '') : file, isAbsolute = external_node_path_default().isAbsolute(filePath), absolutePath = root && !isAbsolute ? external_node_path_default().join(root, filePath) : filePath, displayPath = formatDisplayPath(filePath, isAbsolute, root);
6437
+ return `<a class="file-link" data-file="${absolutePath}">${displayPath}</a>${hasClosingSpan ? '</span>' : ''}`;
6481
6438
  });
6482
6439
  return replacedLine = replacedLine.replace(URL_RE, (url)=>`<a class="url-link" href="${url}" target="_blank" rel="noopener noreferrer">${url}</a>`);
6483
6440
  }).join('\n');
@@ -9376,7 +9333,7 @@ try {
9376
9333
  };
9377
9334
  function setupCommands() {
9378
9335
  let cli = ((name = "")=>new CAC(name))('rsbuild');
9379
- cli.version("1.7.0-beta.2"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
9336
+ cli.version("1.7.0"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
9380
9337
  default: 'auto'
9381
9338
  }).option('--env-dir <dir>', 'Set the directory for loading `.env` files').option('--env-mode <mode>', 'Set the env mode to load the `.env.[mode]` file').option('--environment <name>', 'Set the environment name(s) to build', {
9382
9339
  type: [
@@ -9445,7 +9402,7 @@ try {
9445
9402
  }
9446
9403
  function showGreeting() {
9447
9404
  let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
9448
- src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.7.0-beta.2\n`);
9405
+ src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.7.0\n`);
9449
9406
  }
9450
9407
  function setupLogLevel() {
9451
9408
  let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
@@ -9466,7 +9423,7 @@ try {
9466
9423
  src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err);
9467
9424
  }
9468
9425
  }
9469
- let src_version = "1.7.0-beta.2";
9426
+ let src_version = "1.7.0";
9470
9427
  })(), exports.PLUGIN_CSS_NAME = __webpack_exports__.PLUGIN_CSS_NAME, exports.PLUGIN_SWC_NAME = __webpack_exports__.PLUGIN_SWC_NAME, exports.createRsbuild = __webpack_exports__.createRsbuild, exports.defaultAllowedOrigins = __webpack_exports__.defaultAllowedOrigins, exports.defineConfig = __webpack_exports__.defineConfig, exports.ensureAssetPrefix = __webpack_exports__.ensureAssetPrefix, exports.loadConfig = __webpack_exports__.loadConfig, exports.loadEnv = __webpack_exports__.loadEnv, exports.logger = __webpack_exports__.logger, exports.mergeRsbuildConfig = __webpack_exports__.mergeRsbuildConfig, exports.rspack = __webpack_exports__.rspack, exports.runCLI = __webpack_exports__.runCLI, exports.version = __webpack_exports__.version, __webpack_exports__)-1 === [
9471
9428
  "PLUGIN_CSS_NAME",
9472
9429
  "PLUGIN_SWC_NAME",
@@ -1,2 +1,3 @@
1
+ export declare function formatDisplayPath(filePath: string, isAbsolute: boolean, root?: string): string;
1
2
  export declare function convertLinksInHtml(text: string, root?: string): string;
2
3
  export declare function renderErrorToHtml(error: string, root?: string): string;
@@ -96,7 +96,7 @@ export type ToolsWebpackConfig = ConfigChainWithContext<WebpackConfig, ModifyWeb
96
96
  export type ToolsWebpackChainConfig = OneOrMany<(chain: RspackChain, utils: ModifyWebpackChainUtils) => void>;
97
97
  export interface ToolsConfig {
98
98
  /**
99
- * Configure bundler config base on [rspack-chain](https://github.com/rspack-contrib/rspack-chain)
99
+ * Configure bundler config base on [rspack-chain](https://github.com/rstackjs/rspack-chain)
100
100
  */
101
101
  bundlerChain?: ToolsBundlerChainConfig;
102
102
  /**
@@ -137,7 +137,7 @@ export interface ToolsConfig {
137
137
  */
138
138
  webpack?: ToolsWebpackConfig;
139
139
  /**
140
- * Configure webpack by [rspack-chain](https://github.com/rspack-contrib/rspack-chain).
140
+ * Configure webpack by [rspack-chain](https://github.com/rstackjs/rspack-chain).
141
141
  * @requires webpack
142
142
  */
143
143
  webpackChain?: ToolsWebpackChainConfig;
@@ -1397,7 +1397,7 @@ export interface HtmlConfig {
1397
1397
  * @default
1398
1398
  * ```js
1399
1399
  * const defaultMeta = {
1400
- * charset: { charset: 'UTF-8' },
1400
+ * charset: { charset: 'utf-8' },
1401
1401
  * viewport: 'width=device-width, initial-scale=1.0',
1402
1402
  * };
1403
1403
  * ```
@@ -1455,13 +1455,13 @@ export interface HtmlConfig {
1455
1455
  outputStructure?: OutputStructure;
1456
1456
  /**
1457
1457
  * Define the path to the HTML template,
1458
- * corresponding to the `template` config of [html-rspack-plugin](https://github.com/rspack-contrib/html-rspack-plugin).
1458
+ * corresponding to the `template` config of [html-rspack-plugin](https://github.com/rstackjs/html-rspack-plugin).
1459
1459
  * @default A built-in HTML template
1460
1460
  */
1461
1461
  template?: ChainedHtmlOption<string>;
1462
1462
  /**
1463
1463
  * Define the parameters in the HTML template,
1464
- * corresponding to the `templateParameters` config of [html-rspack-plugin](https://github.com/rspack-contrib/html-rspack-plugin).
1464
+ * corresponding to the `templateParameters` config of [html-rspack-plugin](https://github.com/rstackjs/html-rspack-plugin).
1465
1465
  */
1466
1466
  templateParameters?: ConfigChainWithContext<Record<string, unknown>, {
1467
1467
  entryName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.7.0-beta.2",
3
+ "version": "1.7.0",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "bugs": {
@@ -46,16 +46,16 @@
46
46
  "types.d.ts"
47
47
  ],
48
48
  "dependencies": {
49
- "@rspack/core": "1.7.0-beta.1",
49
+ "@rspack/core": "1.7.0",
50
50
  "@rspack/lite-tapable": "~1.1.0",
51
- "@swc/helpers": "^0.5.17",
51
+ "@swc/helpers": "^0.5.18",
52
52
  "core-js": "~3.47.0",
53
53
  "jiti": "^2.6.1"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@jridgewell/remapping": "^2.3.5",
57
57
  "@jridgewell/trace-mapping": "^0.3.31",
58
- "@rslib/core": "0.18.5",
58
+ "@rslib/core": "0.19.0",
59
59
  "@types/connect": "3.4.38",
60
60
  "@types/cors": "^2.8.19",
61
61
  "@types/node": "^24.10.4",