@rsbuild/core 1.6.8 → 1.6.9

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
- 5422: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 6927: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(8644);
5
+ const loader = __nccwpck_require__(3697);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(6733).defaultGetLocalIdent;
8
+ __nccwpck_require__(5148).defaultGetLocalIdent;
9
9
  },
10
- 8644: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 3697: (__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__(1259));
15
- var _plugins = __nccwpck_require__(6747);
16
- var _utils = __nccwpck_require__(6733);
15
+ var _plugins = __nccwpck_require__(1934);
16
+ var _utils = __nccwpck_require__(5148);
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
- 6747: (__unused_webpack_module, exports, __nccwpck_require__) => {
239
+ 1934: (__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__(7024),
261
+ __nccwpck_require__(2533),
262
262
  );
263
263
  var _postcssIcssParser = _interopRequireDefault(
264
- __nccwpck_require__(6373),
264
+ __nccwpck_require__(6852),
265
265
  );
266
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(52));
266
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(2867));
267
267
  function _interopRequireDefault(obj) {
268
268
  return obj && obj.__esModule ? obj : { default: obj };
269
269
  }
270
270
  },
271
- 6373: (__unused_webpack_module, exports, __nccwpck_require__) => {
271
+ 6852: (__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__(229);
276
- var _utils = __nccwpck_require__(6733);
276
+ var _utils = __nccwpck_require__(5148);
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
- 7024: (__unused_webpack_module, exports, __nccwpck_require__) => {
375
+ 2533: (__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__(5245),
381
381
  );
382
- var _utils = __nccwpck_require__(6733);
382
+ var _utils = __nccwpck_require__(5148);
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
- 52: (__unused_webpack_module, exports, __nccwpck_require__) => {
687
+ 2867: (__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__(5245),
693
693
  );
694
- var _utils = __nccwpck_require__(6733);
694
+ var _utils = __nccwpck_require__(5148);
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
- 6733: (__unused_webpack_module, exports, __nccwpck_require__) => {
1037
+ 5148: (__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;
@@ -8098,6 +8098,6 @@
8098
8098
  }
8099
8099
  if (typeof __nccwpck_require__ !== "undefined")
8100
8100
  __nccwpck_require__.ab = __dirname + "/";
8101
- var __webpack_exports__ = __nccwpck_require__(5422);
8101
+ var __webpack_exports__ = __nccwpck_require__(6927);
8102
8102
  module.exports = __webpack_exports__;
8103
8103
  })();
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 301: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 376: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(398);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(893);
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
- 398: (module) => {
314
+ 893: (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
- 534: (module) => {
483
+ 139: (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
- 609: (module) => {
502
+ 334: (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
- 536: (module, __unused_webpack_exports, __nccwpck_require__) => {
523
+ 917: (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
- 317: (module) => {
549
+ 684: (module) => {
550
550
  const voidTags = [
551
551
  "area",
552
552
  "base",
@@ -614,19 +614,19 @@
614
614
  htmlTagObjectToString,
615
615
  };
616
616
  },
617
- 472: (module, __unused_webpack_exports, __nccwpck_require__) => {
617
+ 737: (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__(301);
623
+ const { CachedChildCompilation } = __nccwpck_require__(376);
624
624
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
625
- __nccwpck_require__(317);
626
- const prettyError = __nccwpck_require__(609);
627
- const chunkSorter = __nccwpck_require__(534);
625
+ __nccwpck_require__(684);
626
+ const prettyError = __nccwpck_require__(334);
627
+ const chunkSorter = __nccwpck_require__(139);
628
628
  const getHtmlRspackPluginHooks =
629
- __nccwpck_require__(536).getHtmlRspackPluginHooks;
629
+ __nccwpck_require__(917).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__(472);
1600
+ var __webpack_exports__ = __nccwpck_require__(737);
1601
1601
  module.exports = __webpack_exports__;
1602
1602
  })();
@@ -1,15 +1,15 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 867: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(45)["default"];
4
+ 371: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(53)["default"];
6
6
  },
7
- 45: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 53: (__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__(496);
12
+ var _utils = __nccwpck_require__(544);
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
- 496: (module, exports, __nccwpck_require__) => {
182
+ 544: (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__(867);
718
+ var __webpack_exports__ = __nccwpck_require__(371);
719
719
  module.exports = __webpack_exports__;
720
720
  })();
@@ -1,7 +1,7 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 336: (__unused_webpack_module, exports, __nccwpck_require__) => {
4
+ 999: (__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
- 185: (__unused_webpack_module, exports, __nccwpck_require__) => {
123
+ 178: (__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__(336);
133
+ const helpers_1 = __nccwpck_require__(999);
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__(185);
330
+ const hooks_1 = __nccwpck_require__(178);
331
331
  Object.defineProperty(exports, "getCompilerHooks", {
332
332
  enumerable: true,
333
333
  get: function () {
package/dist/506.js CHANGED
@@ -4083,7 +4083,7 @@ function createPublicContext(context) {
4083
4083
  async function createContext(options, userConfig) {
4084
4084
  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';
4085
4085
  return {
4086
- version: "1.6.8",
4086
+ version: "1.6.9",
4087
4087
  rootPath,
4088
4088
  distPath: '',
4089
4089
  cachePath,
@@ -7578,7 +7578,7 @@ function prepareWatchOptions(paths, options = {}, type) {
7578
7578
  type
7579
7579
  };
7580
7580
  }
7581
- let GLOB_REGEX = /[*?{}[\]()!@+|]/;
7581
+ let GLOB_REGEX = /[*?{}[\]()!+|]/;
7582
7582
  async function createChokidar(pathOrGlobs, root, options) {
7583
7583
  let chokidar = requireCompiledPackage('chokidar'), watchFiles = new Set(), globPatterns = pathOrGlobs.filter((pathOrGlob)=>!!GLOB_REGEX.test(pathOrGlob) || (watchFiles.add(pathOrGlob), !1));
7584
7584
  if (globPatterns.length) {
@@ -9708,7 +9708,7 @@ let applyServerOptions = (command)=>{
9708
9708
  };
9709
9709
  function setupCommands() {
9710
9710
  let cli = ((name = "")=>new CAC(name))('rsbuild');
9711
- cli.version("1.6.8"), 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)', {
9711
+ cli.version("1.6.9"), 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)', {
9712
9712
  default: 'auto'
9713
9713
  }).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', {
9714
9714
  type: [
@@ -9777,7 +9777,7 @@ function initNodeEnv() {
9777
9777
  }
9778
9778
  function showGreeting() {
9779
9779
  let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
9780
- logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.6.8\n`);
9780
+ logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.6.9\n`);
9781
9781
  }
9782
9782
  function setupLogLevel() {
9783
9783
  let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
@@ -9798,7 +9798,7 @@ function runCLI() {
9798
9798
  logger.error('Failed to start Rsbuild CLI.'), logger.error(err);
9799
9799
  }
9800
9800
  }
9801
- let src_version = "1.6.8";
9801
+ let src_version = "1.6.9";
9802
9802
  import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module";
9803
9803
  import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "node:module";
9804
9804
  import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
package/dist/index.cjs CHANGED
@@ -4230,7 +4230,7 @@ ${section.body}` : section.body).join("\n\n"));
4230
4230
  async function createContext(options, userConfig) {
4231
4231
  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';
4232
4232
  return {
4233
- version: "1.6.8",
4233
+ version: "1.6.9",
4234
4234
  rootPath,
4235
4235
  distPath: '',
4236
4236
  cachePath,
@@ -7721,7 +7721,7 @@ ${section.body}` : section.body).join("\n\n"));
7721
7721
  type
7722
7722
  };
7723
7723
  }
7724
- let GLOB_REGEX = /[*?{}[\]()!@+|]/;
7724
+ let GLOB_REGEX = /[*?{}[\]()!+|]/;
7725
7725
  async function createChokidar(pathOrGlobs, root, options) {
7726
7726
  let chokidar = requireCompiledPackage('chokidar'), watchFiles = new Set(), globPatterns = pathOrGlobs.filter((pathOrGlob)=>{
7727
7727
  let str;
@@ -9856,7 +9856,7 @@ try {
9856
9856
  };
9857
9857
  function setupCommands() {
9858
9858
  let cli = ((name = "")=>new CAC(name))('rsbuild');
9859
- cli.version("1.6.8"), 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)', {
9859
+ cli.version("1.6.9"), 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)', {
9860
9860
  default: 'auto'
9861
9861
  }).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', {
9862
9862
  type: [
@@ -9925,7 +9925,7 @@ try {
9925
9925
  }
9926
9926
  function showGreeting() {
9927
9927
  let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
9928
- logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.6.8\n`);
9928
+ logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v1.6.9\n`);
9929
9929
  }
9930
9930
  function setupLogLevel() {
9931
9931
  let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
@@ -9946,7 +9946,7 @@ try {
9946
9946
  logger.error('Failed to start Rsbuild CLI.'), logger.error(err);
9947
9947
  }
9948
9948
  }
9949
- let src_version = "1.6.8";
9949
+ let src_version = "1.6.9";
9950
9950
  })(), 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 === [
9951
9951
  "PLUGIN_CSS_NAME",
9952
9952
  "PLUGIN_SWC_NAME",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "bugs": {
@@ -46,7 +46,7 @@
46
46
  "types.d.ts"
47
47
  ],
48
48
  "dependencies": {
49
- "@rspack/core": "1.6.4",
49
+ "@rspack/core": "1.6.5",
50
50
  "@rspack/lite-tapable": "~1.1.0",
51
51
  "@swc/helpers": "^0.5.17",
52
52
  "core-js": "~3.47.0",