@rsbuild/core 1.0.6 → 1.0.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.
@@ -174,6 +174,8 @@ declare namespace browserslist {
174
174
 
175
175
  function findConfig(...pathSegments: string[]): Config | undefined
176
176
 
177
+ function findConfigFile(...pathSegments: string[]): string | undefined
178
+
177
179
  interface LoadConfigOptions {
178
180
  config?: string
179
181
  path?: string
@@ -1,6 +1,6 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 852: (module) => {
3
+ 553: (module) => {
4
4
  function BrowserslistError(message) {
5
5
  this.name = "BrowserslistError";
6
6
  this.message = message;
@@ -12,15 +12,15 @@
12
12
  BrowserslistError.prototype = Error.prototype;
13
13
  module.exports = BrowserslistError;
14
14
  },
15
- 299: (module, __unused_webpack_exports, __nccwpck_require__) => {
15
+ 89: (module, __unused_webpack_exports, __nccwpck_require__) => {
16
16
  var jsReleases = __nccwpck_require__(942);
17
17
  var agents = __nccwpck_require__(768).agents;
18
+ var e2c = __nccwpck_require__(677);
18
19
  var jsEOL = __nccwpck_require__(248);
19
20
  var path = __nccwpck_require__(17);
20
- var e2c = __nccwpck_require__(116);
21
- var BrowserslistError = __nccwpck_require__(852);
22
- var parse = __nccwpck_require__(931);
23
- var env = __nccwpck_require__(503);
21
+ var BrowserslistError = __nccwpck_require__(553);
22
+ var env = __nccwpck_require__(447);
23
+ var parse = __nccwpck_require__(656);
24
24
  var YEAR = 365.259641 * 24 * 60 * 60 * 1e3;
25
25
  var ANDROID_EVERGREEN_FIRST = "37";
26
26
  var OP_MOB_BLINK_FIRST = 14;
@@ -453,6 +453,7 @@
453
453
  browserslist.clearCaches = env.clearCaches;
454
454
  browserslist.parseConfig = env.parseConfig;
455
455
  browserslist.readConfig = env.readConfig;
456
+ browserslist.findConfigFile = env.findConfigFile;
456
457
  browserslist.findConfig = env.findConfig;
457
458
  browserslist.loadConfig = env.loadConfig;
458
459
  browserslist.coverage = function (browsers, stats) {
@@ -1181,12 +1182,12 @@
1181
1182
  })();
1182
1183
  module.exports = browserslist;
1183
1184
  },
1184
- 503: (module, __unused_webpack_exports, __nccwpck_require__) => {
1185
+ 447: (module, __unused_webpack_exports, __nccwpck_require__) => {
1185
1186
  var feature = __nccwpck_require__(711)["default"];
1186
1187
  var region = __nccwpck_require__(225)["default"];
1187
- var path = __nccwpck_require__(17);
1188
1188
  var fs = __nccwpck_require__(147);
1189
- var BrowserslistError = __nccwpck_require__(852);
1189
+ var path = __nccwpck_require__(17);
1190
+ var BrowserslistError = __nccwpck_require__(553);
1190
1191
  var IS_SECTION = /^\s*\[(.+)]\s*$/;
1191
1192
  var CONFIG_PATTERN = /^browserslist-config-/;
1192
1193
  var SCOPED_CONFIG__PATTERN =
@@ -1297,6 +1298,13 @@
1297
1298
  }
1298
1299
  return list;
1299
1300
  }
1301
+ function parsePackageOrReadConfig(file) {
1302
+ if (path.basename(file) === "package.json") {
1303
+ return parsePackage(file);
1304
+ } else {
1305
+ return module.exports.readConfig(file);
1306
+ }
1307
+ }
1300
1308
  function latestReleaseTime(agents) {
1301
1309
  var latest = 0;
1302
1310
  for (var name in agents) {
@@ -1410,11 +1418,7 @@
1410
1418
  return process.env.BROWSERSLIST;
1411
1419
  } else if (opts.config || process.env.BROWSERSLIST_CONFIG) {
1412
1420
  var file = opts.config || process.env.BROWSERSLIST_CONFIG;
1413
- if (path.basename(file) === "package.json") {
1414
- return pickEnv(parsePackage(file), opts);
1415
- } else {
1416
- return pickEnv(module.exports.readConfig(file), opts);
1417
- }
1421
+ return pickEnv(parsePackageOrReadConfig(file), opts);
1418
1422
  } else if (opts.path) {
1419
1423
  return pickEnv(module.exports.findConfig(opts.path), opts);
1420
1424
  } else {
@@ -1500,14 +1504,8 @@
1500
1504
  }
1501
1505
  return module.exports.parseConfig(fs.readFileSync(file));
1502
1506
  },
1503
- findConfig: function findConfig(from) {
1504
- from = path.resolve(from);
1505
- var passed = [];
1507
+ findConfigFile: function findConfigFile(from) {
1506
1508
  var resolved = eachParent(from, function (dir) {
1507
- if (dir in configCache) {
1508
- return configCache[dir];
1509
- }
1510
- passed.push(dir);
1511
1509
  var config = path.join(dir, "browserslist");
1512
1510
  var pkg = path.join(dir, "package.json");
1513
1511
  var rc = path.join(dir, ".browserslistrc");
@@ -1537,16 +1535,33 @@
1537
1535
  dir + " contains both .browserslistrc and browserslist",
1538
1536
  );
1539
1537
  } else if (isFile(config)) {
1540
- return module.exports.readConfig(config);
1538
+ return config;
1541
1539
  } else if (isFile(rc)) {
1542
- return module.exports.readConfig(rc);
1543
- } else {
1544
- return pkgBrowserslist;
1540
+ return rc;
1541
+ } else if (pkgBrowserslist) {
1542
+ return pkg;
1545
1543
  }
1546
1544
  });
1545
+ return resolved;
1546
+ },
1547
+ findConfig: function findConfig(from) {
1548
+ from = path.resolve(from);
1549
+ var fromDir = isFile(from) ? path.dirname(from) : from;
1550
+ if (fromDir in configCache) {
1551
+ return configCache[fromDir];
1552
+ }
1553
+ var resolved;
1554
+ var configFile = this.findConfigFile(from);
1555
+ if (configFile) {
1556
+ resolved = parsePackageOrReadConfig(configFile);
1557
+ }
1547
1558
  if (!process.env.BROWSERSLIST_DISABLE_CACHE) {
1548
- passed.forEach(function (dir) {
1559
+ var configDir = configFile && path.dirname(configFile);
1560
+ eachParent(from, function (dir) {
1549
1561
  configCache[dir] = resolved;
1562
+ if (dir === configDir) {
1563
+ return null;
1564
+ }
1550
1565
  });
1551
1566
  }
1552
1567
  return resolved;
@@ -1578,7 +1593,7 @@
1578
1593
  env: process.env,
1579
1594
  };
1580
1595
  },
1581
- 931: (module) => {
1596
+ 656: (module) => {
1582
1597
  var AND_REGEXP = /^\s+and\s+(.*)/i;
1583
1598
  var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i;
1584
1599
  function flatten(array) {
@@ -1588,7 +1603,7 @@
1588
1603
  }, []);
1589
1604
  }
1590
1605
  function find(string, predicate) {
1591
- for (var n = 1, max = string.length; n <= max; n++) {
1606
+ for (var max = string.length, n = 1; n <= max; n++) {
1592
1607
  var parsed = string.substr(-n, n);
1593
1608
  if (predicate(parsed, n, max)) {
1594
1609
  return string.slice(0, -n);
@@ -1651,7 +1666,7 @@
1651
1666
  );
1652
1667
  };
1653
1668
  },
1654
- 116: (module) => {
1669
+ 677: (module) => {
1655
1670
  module.exports = {
1656
1671
  "0.20": "39",
1657
1672
  0.21: "41",
@@ -1809,11 +1824,18 @@
1809
1824
  30.1: "124",
1810
1825
  30.2: "124",
1811
1826
  30.3: "124",
1827
+ 30.4: "124",
1828
+ 30.5: "124",
1812
1829
  "31.0": "126",
1813
1830
  31.1: "126",
1814
1831
  31.2: "126",
1815
1832
  31.3: "126",
1833
+ 31.4: "126",
1834
+ 31.5: "126",
1835
+ 31.6: "126",
1816
1836
  "32.0": "128",
1837
+ 32.1: "128",
1838
+ "33.0": "130",
1817
1839
  };
1818
1840
  },
1819
1841
  768: (module) => {
@@ -1871,6 +1893,6 @@
1871
1893
  }
1872
1894
  if (typeof __nccwpck_require__ !== "undefined")
1873
1895
  __nccwpck_require__.ab = __dirname + "/";
1874
- var __webpack_exports__ = __nccwpck_require__(299);
1896
+ var __webpack_exports__ = __nccwpck_require__(89);
1875
1897
  module.exports = __webpack_exports__;
1876
1898
  })();
@@ -1 +1 @@
1
- {"name":"browserslist","author":"Andrey Sitnik <andrey@sitnik.ru>","version":"4.23.3","funding":[{"type":"opencollective","url":"https://opencollective.com/browserslist"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/browserslist"},{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"browserslist","author":"Andrey Sitnik <andrey@sitnik.ru>","version":"4.24.0","funding":[{"type":"opencollective","url":"https://opencollective.com/browserslist"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/browserslist"},{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -1,22 +1,22 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 9895: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 8976: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(7781);
5
+ const loader = __nccwpck_require__(1496);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(6598).defaultGetLocalIdent;
8
+ __nccwpck_require__(3013).defaultGetLocalIdent;
9
9
  },
10
- 7781: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 1496: (__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__(9961));
15
15
  var _package = _interopRequireDefault(__nccwpck_require__(3360));
16
16
  var _semver = { satisfies: () => true };
17
- var _options = _interopRequireDefault(__nccwpck_require__(2030));
18
- var _plugins = __nccwpck_require__(350);
19
- var _utils = __nccwpck_require__(6598);
17
+ var _options = _interopRequireDefault(__nccwpck_require__(9359));
18
+ var _plugins = __nccwpck_require__(82);
19
+ var _utils = __nccwpck_require__(3013);
20
20
  function _interopRequireDefault(obj) {
21
21
  return obj && obj.__esModule ? obj : { default: obj };
22
22
  }
@@ -243,7 +243,7 @@
243
243
  callback(null, `${importCode}${moduleCode}${exportCode}`);
244
244
  }
245
245
  },
246
- 350: (__unused_webpack_module, exports, __nccwpck_require__) => {
246
+ 82: (__unused_webpack_module, exports, __nccwpck_require__) => {
247
247
  "use strict";
248
248
  Object.defineProperty(exports, "__esModule", { value: true });
249
249
  Object.defineProperty(exports, "icssParser", {
@@ -265,22 +265,22 @@
265
265
  },
266
266
  });
267
267
  var _postcssImportParser = _interopRequireDefault(
268
- __nccwpck_require__(3967),
268
+ __nccwpck_require__(6509),
269
269
  );
270
270
  var _postcssIcssParser = _interopRequireDefault(
271
- __nccwpck_require__(2421),
271
+ __nccwpck_require__(4310),
272
272
  );
273
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(4567));
273
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(4758));
274
274
  function _interopRequireDefault(obj) {
275
275
  return obj && obj.__esModule ? obj : { default: obj };
276
276
  }
277
277
  },
278
- 2421: (__unused_webpack_module, exports, __nccwpck_require__) => {
278
+ 4310: (__unused_webpack_module, exports, __nccwpck_require__) => {
279
279
  "use strict";
280
280
  Object.defineProperty(exports, "__esModule", { value: true });
281
281
  exports["default"] = void 0;
282
282
  var _icssUtils = __nccwpck_require__(8406);
283
- var _utils = __nccwpck_require__(6598);
283
+ var _utils = __nccwpck_require__(3013);
284
284
  const plugin = (options = {}) => ({
285
285
  postcssPlugin: "postcss-icss-parser",
286
286
  async OnceExit(root) {
@@ -379,14 +379,14 @@
379
379
  plugin.postcss = true;
380
380
  var _default = (exports["default"] = plugin);
381
381
  },
382
- 3967: (__unused_webpack_module, exports, __nccwpck_require__) => {
382
+ 6509: (__unused_webpack_module, exports, __nccwpck_require__) => {
383
383
  "use strict";
384
384
  Object.defineProperty(exports, "__esModule", { value: true });
385
385
  exports["default"] = void 0;
386
386
  var _postcssValueParser = _interopRequireDefault(
387
387
  __nccwpck_require__(7555),
388
388
  );
389
- var _utils = __nccwpck_require__(6598);
389
+ var _utils = __nccwpck_require__(3013);
390
390
  function _interopRequireDefault(obj) {
391
391
  return obj && obj.__esModule ? obj : { default: obj };
392
392
  }
@@ -691,14 +691,14 @@
691
691
  plugin.postcss = true;
692
692
  var _default = (exports["default"] = plugin);
693
693
  },
694
- 4567: (__unused_webpack_module, exports, __nccwpck_require__) => {
694
+ 4758: (__unused_webpack_module, exports, __nccwpck_require__) => {
695
695
  "use strict";
696
696
  Object.defineProperty(exports, "__esModule", { value: true });
697
697
  exports["default"] = void 0;
698
698
  var _postcssValueParser = _interopRequireDefault(
699
699
  __nccwpck_require__(7555),
700
700
  );
701
- var _utils = __nccwpck_require__(6598);
701
+ var _utils = __nccwpck_require__(3013);
702
702
  function _interopRequireDefault(obj) {
703
703
  return obj && obj.__esModule ? obj : { default: obj };
704
704
  }
@@ -1041,7 +1041,7 @@
1041
1041
  plugin.postcss = true;
1042
1042
  var _default = (exports["default"] = plugin);
1043
1043
  },
1044
- 6598: (__unused_webpack_module, exports, __nccwpck_require__) => {
1044
+ 3013: (__unused_webpack_module, exports, __nccwpck_require__) => {
1045
1045
  "use strict";
1046
1046
  Object.defineProperty(exports, "__esModule", { value: true });
1047
1047
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
@@ -7960,7 +7960,7 @@
7960
7960
  "use strict";
7961
7961
  module.exports = require("util");
7962
7962
  },
7963
- 2030: (module) => {
7963
+ 9359: (module) => {
7964
7964
  "use strict";
7965
7965
  module.exports = JSON.parse(
7966
7966
  '{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack-contrib/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack-contrib/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
@@ -7995,6 +7995,6 @@
7995
7995
  }
7996
7996
  if (typeof __nccwpck_require__ !== "undefined")
7997
7997
  __nccwpck_require__.ab = __dirname + "/";
7998
- var __webpack_exports__ = __nccwpck_require__(9895);
7998
+ var __webpack_exports__ = __nccwpck_require__(8976);
7999
7999
  module.exports = __webpack_exports__;
8000
8000
  })();
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 842: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 202: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(456);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(444);
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
- 456: (module) => {
307
+ 444: (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
- 965: (module) => {
476
+ 617: (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
- 236: (module) => {
495
+ 211: (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
- 962: (module, __unused_webpack_exports, __nccwpck_require__) => {
516
+ 395: (module, __unused_webpack_exports, __nccwpck_require__) => {
517
517
  "use strict";
518
518
  const { AsyncSeriesWaterfallHook } = __nccwpck_require__(348);
519
519
  const htmlWebpackPluginHooksMap = new WeakMap();
@@ -539,7 +539,7 @@
539
539
  }
540
540
  module.exports = { getHtmlRspackPluginHooks };
541
541
  },
542
- 284: (module) => {
542
+ 634: (module) => {
543
543
  const voidTags = [
544
544
  "area",
545
545
  "base",
@@ -607,19 +607,19 @@
607
607
  htmlTagObjectToString,
608
608
  };
609
609
  },
610
- 667: (module, __unused_webpack_exports, __nccwpck_require__) => {
610
+ 93: (module, __unused_webpack_exports, __nccwpck_require__) => {
611
611
  "use strict";
612
612
  const promisify = __nccwpck_require__(837).promisify;
613
613
  const vm = __nccwpck_require__(144);
614
614
  const fs = __nccwpck_require__(147);
615
615
  const path = __nccwpck_require__(17);
616
- const { CachedChildCompilation } = __nccwpck_require__(842);
616
+ const { CachedChildCompilation } = __nccwpck_require__(202);
617
617
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
618
- __nccwpck_require__(284);
619
- const prettyError = __nccwpck_require__(236);
620
- const chunkSorter = __nccwpck_require__(965);
618
+ __nccwpck_require__(634);
619
+ const prettyError = __nccwpck_require__(211);
620
+ const chunkSorter = __nccwpck_require__(617);
621
621
  const getHtmlRspackPluginHooks =
622
- __nccwpck_require__(962).getHtmlRspackPluginHooks;
622
+ __nccwpck_require__(395).getHtmlRspackPluginHooks;
623
623
  class HtmlRspackPlugin {
624
624
  constructor(userOptions = {}) {
625
625
  this.version = HtmlRspackPlugin.version;
@@ -1577,6 +1577,6 @@
1577
1577
  }
1578
1578
  if (typeof __nccwpck_require__ !== "undefined")
1579
1579
  __nccwpck_require__.ab = __dirname + "/";
1580
- var __webpack_exports__ = __nccwpck_require__(667);
1580
+ var __webpack_exports__ = __nccwpck_require__(93);
1581
1581
  module.exports = __webpack_exports__;
1582
1582
  })();
@@ -1,17 +1,17 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 546: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(14)["default"];
4
+ 850: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(135)["default"];
6
6
  },
7
- 14: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 135: (__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__(17));
12
12
  var _package = _interopRequireDefault(__nccwpck_require__(360));
13
13
  var _options = _interopRequireDefault(__nccwpck_require__(226));
14
- var _utils = __nccwpck_require__(523);
14
+ var _utils = __nccwpck_require__(384);
15
15
  function _interopRequireDefault(obj) {
16
16
  return obj && obj.__esModule ? obj : { default: obj };
17
17
  }
@@ -189,7 +189,7 @@
189
189
  callback(null, result.css, map, { ast });
190
190
  }
191
191
  },
192
- 523: (module, exports, __nccwpck_require__) => {
192
+ 384: (module, exports, __nccwpck_require__) => {
193
193
  module = __nccwpck_require__.nmd(module);
194
194
  Object.defineProperty(exports, "__esModule", { value: true });
195
195
  exports.exec = exec;
@@ -736,6 +736,6 @@
736
736
  })();
737
737
  if (typeof __nccwpck_require__ !== "undefined")
738
738
  __nccwpck_require__.ab = __dirname + "/";
739
- var __webpack_exports__ = __nccwpck_require__(546);
739
+ var __webpack_exports__ = __nccwpck_require__(850);
740
740
  module.exports = __webpack_exports__;
741
741
  })();
@@ -349,7 +349,6 @@ declare namespace Config {
349
349
  RspackResolve['descriptionFiles'][number]
350
350
  >;
351
351
  extensions: TypedChainedSet<this, RspackResolve['extensions'][number]>;
352
- extensionAlias: TypedChainedMap<this, RspackResolve['extensionAlias']>;
353
352
  mainFields: TypedChainedSet<this, RspackResolve['mainFields'][number]>;
354
353
  mainFiles: TypedChainedSet<this, RspackResolve['mainFiles'][number]>;
355
354
  exportsFields: TypedChainedSet<
@@ -627,7 +627,7 @@
627
627
  };
628
628
  exports.toString = toString;
629
629
  },
630
- 86: (module) => {
630
+ 432: (module) => {
631
631
  module.exports = class extends Function {
632
632
  constructor() {
633
633
  super();
@@ -640,35 +640,35 @@
640
640
  }
641
641
  };
642
642
  },
643
- 465: (module, __unused_webpack_exports, __nccwpck_require__) => {
644
- const createMap = __nccwpck_require__(670);
645
- const createChainable = __nccwpck_require__(742);
643
+ 684: (module, __unused_webpack_exports, __nccwpck_require__) => {
644
+ const createMap = __nccwpck_require__(84);
645
+ const createChainable = __nccwpck_require__(537);
646
646
  module.exports = createMap(createChainable(Object));
647
647
  },
648
- 741: (module, __unused_webpack_exports, __nccwpck_require__) => {
649
- const createSet = __nccwpck_require__(3);
650
- const createChainable = __nccwpck_require__(742);
648
+ 740: (module, __unused_webpack_exports, __nccwpck_require__) => {
649
+ const createSet = __nccwpck_require__(566);
650
+ const createChainable = __nccwpck_require__(537);
651
651
  module.exports = createSet(createChainable(Object));
652
652
  },
653
- 19: (module, __unused_webpack_exports, __nccwpck_require__) => {
654
- const Callable = __nccwpck_require__(86);
655
- const createMap = __nccwpck_require__(670);
656
- const createChainable = __nccwpck_require__(742);
657
- const createValue = __nccwpck_require__(783);
653
+ 792: (module, __unused_webpack_exports, __nccwpck_require__) => {
654
+ const Callable = __nccwpck_require__(432);
655
+ const createMap = __nccwpck_require__(84);
656
+ const createChainable = __nccwpck_require__(537);
657
+ const createValue = __nccwpck_require__(908);
658
658
  module.exports = createValue(createMap(createChainable(Callable)));
659
659
  },
660
- 453: (module, __unused_webpack_exports, __nccwpck_require__) => {
661
- const ChainedMap = __nccwpck_require__(465);
662
- const ChainedValueMap = __nccwpck_require__(19);
663
- const ChainedSet = __nccwpck_require__(741);
664
- const Resolve = __nccwpck_require__(816);
665
- const ResolveLoader = __nccwpck_require__(609);
666
- const Output = __nccwpck_require__(215);
667
- const DevServer = __nccwpck_require__(222);
668
- const Plugin = __nccwpck_require__(558);
669
- const Module = __nccwpck_require__(486);
670
- const Optimization = __nccwpck_require__(209);
671
- const Performance = __nccwpck_require__(731);
660
+ 173: (module, __unused_webpack_exports, __nccwpck_require__) => {
661
+ const ChainedMap = __nccwpck_require__(684);
662
+ const ChainedValueMap = __nccwpck_require__(792);
663
+ const ChainedSet = __nccwpck_require__(740);
664
+ const Resolve = __nccwpck_require__(894);
665
+ const ResolveLoader = __nccwpck_require__(799);
666
+ const Output = __nccwpck_require__(43);
667
+ const DevServer = __nccwpck_require__(692);
668
+ const Plugin = __nccwpck_require__(360);
669
+ const Module = __nccwpck_require__(310);
670
+ const Optimization = __nccwpck_require__(812);
671
+ const Performance = __nccwpck_require__(549);
672
672
  module.exports = class extends ChainedMap {
673
673
  constructor() {
674
674
  super();
@@ -818,9 +818,9 @@
818
818
  }
819
819
  };
820
820
  },
821
- 222: (module, __unused_webpack_exports, __nccwpck_require__) => {
822
- const ChainedMap = __nccwpck_require__(465);
823
- const ChainedSet = __nccwpck_require__(741);
821
+ 692: (module, __unused_webpack_exports, __nccwpck_require__) => {
822
+ const ChainedMap = __nccwpck_require__(684);
823
+ const ChainedSet = __nccwpck_require__(740);
824
824
  module.exports = class extends ChainedMap {
825
825
  constructor(parent) {
826
826
  super(parent);
@@ -892,9 +892,9 @@
892
892
  }
893
893
  };
894
894
  },
895
- 486: (module, __unused_webpack_exports, __nccwpck_require__) => {
896
- const ChainedMap = __nccwpck_require__(465);
897
- const Rule = __nccwpck_require__(411);
895
+ 310: (module, __unused_webpack_exports, __nccwpck_require__) => {
896
+ const ChainedMap = __nccwpck_require__(684);
897
+ const Rule = __nccwpck_require__(315);
898
898
  module.exports = class extends ChainedMap {
899
899
  constructor(parent) {
900
900
  super(parent);
@@ -949,10 +949,10 @@
949
949
  }
950
950
  };
951
951
  },
952
- 209: (module, __unused_webpack_exports, __nccwpck_require__) => {
953
- const ChainedMap = __nccwpck_require__(465);
954
- const ChainedValueMap = __nccwpck_require__(19);
955
- const Plugin = __nccwpck_require__(558);
952
+ 812: (module, __unused_webpack_exports, __nccwpck_require__) => {
953
+ const ChainedMap = __nccwpck_require__(684);
954
+ const ChainedValueMap = __nccwpck_require__(792);
955
+ const Plugin = __nccwpck_require__(360);
956
956
  module.exports = class extends ChainedMap {
957
957
  constructor(parent) {
958
958
  super(parent);
@@ -1013,7 +1013,7 @@
1013
1013
  }
1014
1014
  };
1015
1015
  },
1016
- 570: (module) => {
1016
+ 201: (module) => {
1017
1017
  module.exports = (Class) =>
1018
1018
  class extends Class {
1019
1019
  before(name) {
@@ -1045,8 +1045,8 @@
1045
1045
  }
1046
1046
  };
1047
1047
  },
1048
- 215: (module, __unused_webpack_exports, __nccwpck_require__) => {
1049
- const ChainedMap = __nccwpck_require__(465);
1048
+ 43: (module, __unused_webpack_exports, __nccwpck_require__) => {
1049
+ const ChainedMap = __nccwpck_require__(684);
1050
1050
  module.exports = class extends ChainedMap {
1051
1051
  constructor(parent) {
1052
1052
  super(parent);
@@ -1100,8 +1100,8 @@
1100
1100
  }
1101
1101
  };
1102
1102
  },
1103
- 731: (module, __unused_webpack_exports, __nccwpck_require__) => {
1104
- const ChainedValueMap = __nccwpck_require__(19);
1103
+ 549: (module, __unused_webpack_exports, __nccwpck_require__) => {
1104
+ const ChainedValueMap = __nccwpck_require__(792);
1105
1105
  module.exports = class extends ChainedValueMap {
1106
1106
  constructor(parent) {
1107
1107
  super(parent);
@@ -1114,9 +1114,9 @@
1114
1114
  }
1115
1115
  };
1116
1116
  },
1117
- 558: (module, __unused_webpack_exports, __nccwpck_require__) => {
1118
- const ChainedMap = __nccwpck_require__(465);
1119
- const Orderable = __nccwpck_require__(570);
1117
+ 360: (module, __unused_webpack_exports, __nccwpck_require__) => {
1118
+ const ChainedMap = __nccwpck_require__(684);
1119
+ const Orderable = __nccwpck_require__(201);
1120
1120
  module.exports = Orderable(
1121
1121
  class extends ChainedMap {
1122
1122
  constructor(parent, name, type = "plugin") {
@@ -1170,7 +1170,7 @@
1170
1170
  }
1171
1171
  if (typeof plugin === "string") {
1172
1172
  pluginPath = plugin;
1173
- plugin = __nccwpck_require__(250)(pluginPath);
1173
+ plugin = __nccwpck_require__(900)(pluginPath);
1174
1174
  }
1175
1175
  const constructorName = plugin.__expression
1176
1176
  ? `(${plugin.__expression})`
@@ -1188,11 +1188,11 @@
1188
1188
  },
1189
1189
  );
1190
1190
  },
1191
- 816: (module, __unused_webpack_exports, __nccwpck_require__) => {
1192
- const ChainedMap = __nccwpck_require__(465);
1193
- const ChainedSet = __nccwpck_require__(741);
1194
- const Plugin = __nccwpck_require__(558);
1195
- const childMaps = ["alias", "fallback", "byDependency", "extensionAlias"];
1191
+ 894: (module, __unused_webpack_exports, __nccwpck_require__) => {
1192
+ const ChainedMap = __nccwpck_require__(684);
1193
+ const ChainedSet = __nccwpck_require__(740);
1194
+ const Plugin = __nccwpck_require__(360);
1195
+ const childMaps = ["alias", "fallback", "byDependency"];
1196
1196
  const childSets = [
1197
1197
  "aliasFields",
1198
1198
  "conditionNames",
@@ -1270,9 +1270,9 @@
1270
1270
  }
1271
1271
  };
1272
1272
  },
1273
- 609: (module, __unused_webpack_exports, __nccwpck_require__) => {
1274
- const Resolve = __nccwpck_require__(816);
1275
- const ChainedSet = __nccwpck_require__(741);
1273
+ 799: (module, __unused_webpack_exports, __nccwpck_require__) => {
1274
+ const Resolve = __nccwpck_require__(894);
1275
+ const ChainedSet = __nccwpck_require__(740);
1276
1276
  module.exports = class extends Resolve {
1277
1277
  constructor(parent) {
1278
1278
  super(parent);
@@ -1299,12 +1299,12 @@
1299
1299
  }
1300
1300
  };
1301
1301
  },
1302
- 411: (module, __unused_webpack_exports, __nccwpck_require__) => {
1303
- const ChainedMap = __nccwpck_require__(465);
1304
- const ChainedSet = __nccwpck_require__(741);
1305
- const Orderable = __nccwpck_require__(570);
1306
- const Use = __nccwpck_require__(182);
1307
- const Resolve = __nccwpck_require__(816);
1302
+ 315: (module, __unused_webpack_exports, __nccwpck_require__) => {
1303
+ const ChainedMap = __nccwpck_require__(684);
1304
+ const ChainedSet = __nccwpck_require__(740);
1305
+ const Orderable = __nccwpck_require__(201);
1306
+ const Use = __nccwpck_require__(735);
1307
+ const Resolve = __nccwpck_require__(894);
1308
1308
  function toArray(arr) {
1309
1309
  return Array.isArray(arr) ? arr : [arr];
1310
1310
  }
@@ -1429,10 +1429,10 @@
1429
1429
  );
1430
1430
  module.exports = Rule;
1431
1431
  },
1432
- 182: (module, __unused_webpack_exports, __nccwpck_require__) => {
1432
+ 735: (module, __unused_webpack_exports, __nccwpck_require__) => {
1433
1433
  const merge = __nccwpck_require__(964);
1434
- const ChainedMap = __nccwpck_require__(465);
1435
- const Orderable = __nccwpck_require__(570);
1434
+ const ChainedMap = __nccwpck_require__(684);
1435
+ const Orderable = __nccwpck_require__(201);
1436
1436
  module.exports = Orderable(
1437
1437
  class extends ChainedMap {
1438
1438
  constructor(parent, name) {
@@ -1465,7 +1465,7 @@
1465
1465
  },
1466
1466
  );
1467
1467
  },
1468
- 742: (module) => {
1468
+ 537: (module) => {
1469
1469
  module.exports = function createChainable(superClass) {
1470
1470
  return class extends superClass {
1471
1471
  constructor(parent) {
@@ -1482,7 +1482,7 @@
1482
1482
  };
1483
1483
  };
1484
1484
  },
1485
- 670: (module, __unused_webpack_exports, __nccwpck_require__) => {
1485
+ 84: (module, __unused_webpack_exports, __nccwpck_require__) => {
1486
1486
  const merge = __nccwpck_require__(964);
1487
1487
  module.exports = function createMap(superClass) {
1488
1488
  return class extends superClass {
@@ -1606,7 +1606,7 @@
1606
1606
  };
1607
1607
  };
1608
1608
  },
1609
- 3: (module) => {
1609
+ 566: (module) => {
1610
1610
  module.exports = function createSet(superClass) {
1611
1611
  return class extends superClass {
1612
1612
  constructor(...args) {
@@ -1656,7 +1656,7 @@
1656
1656
  };
1657
1657
  };
1658
1658
  },
1659
- 783: (module) => {
1659
+ 908: (module) => {
1660
1660
  module.exports = function createValue(superClass) {
1661
1661
  return class extends superClass {
1662
1662
  constructor(...args) {
@@ -1694,7 +1694,7 @@
1694
1694
  };
1695
1695
  };
1696
1696
  },
1697
- 250: (module) => {
1697
+ 900: (module) => {
1698
1698
  function webpackEmptyContext(req) {
1699
1699
  var e = new Error("Cannot find module '" + req + "'");
1700
1700
  e.code = "MODULE_NOT_FOUND";
@@ -1702,7 +1702,7 @@
1702
1702
  }
1703
1703
  webpackEmptyContext.keys = () => [];
1704
1704
  webpackEmptyContext.resolve = webpackEmptyContext;
1705
- webpackEmptyContext.id = 250;
1705
+ webpackEmptyContext.id = 900;
1706
1706
  module.exports = webpackEmptyContext;
1707
1707
  },
1708
1708
  };
@@ -1732,6 +1732,6 @@
1732
1732
  })();
1733
1733
  if (typeof __nccwpck_require__ !== "undefined")
1734
1734
  __nccwpck_require__.ab = __dirname + "/";
1735
- var __webpack_exports__ = __nccwpck_require__(453);
1735
+ var __webpack_exports__ = __nccwpck_require__(173);
1736
1736
  module.exports = __webpack_exports__;
1737
1737
  })();
@@ -1 +1 @@
1
- {"name":"rspack-chain","author":"rspack-contrib","version":"1.0.3","license":"MPL-2.0","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"rspack-chain","author":"rspack-contrib","version":"1.0.1","license":"MPL-2.0","types":"index.d.ts","type":"commonjs"}
@@ -1,7 +1,7 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 747: (__unused_webpack_module, exports, __nccwpck_require__) => {
4
+ 910: (__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
- 192: (__unused_webpack_module, exports, __nccwpck_require__) => {
123
+ 691: (__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__(147);
131
131
  const path_1 = __nccwpck_require__(17);
132
132
  const lite_tapable_1 = __nccwpck_require__(348);
133
- const helpers_1 = __nccwpck_require__(747);
133
+ const helpers_1 = __nccwpck_require__(910);
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__(17);
315
- const hooks_1 = __nccwpck_require__(192);
315
+ const hooks_1 = __nccwpck_require__(691);
316
316
  Object.defineProperty(exports, "getCompilerHooks", {
317
317
  enumerable: true,
318
318
  get: function () {
package/dist/index.cjs CHANGED
@@ -2304,7 +2304,7 @@ async function createContext(options, userConfig, bundlerType) {
2304
2304
  const rsbuildConfig = await withDefaultConfig(rootPath, userConfig);
2305
2305
  const cachePath = (0, import_node_path9.join)(rootPath, "node_modules", ".cache");
2306
2306
  return {
2307
- version: "1.0.6",
2307
+ version: "1.0.7",
2308
2308
  rootPath,
2309
2309
  distPath: "",
2310
2310
  cachePath,
@@ -2651,9 +2651,6 @@ var init_configChain = __esm({
2651
2651
  PUG: "pug",
2652
2652
  /** Rule for Vue */
2653
2653
  VUE: "vue",
2654
- // TODO: remove
2655
- /** Rule for yaml */
2656
- YAML: "yaml",
2657
2654
  /** Rule for wasm */
2658
2655
  WASM: "wasm",
2659
2656
  /** Rule for svelte */
@@ -2689,9 +2686,6 @@ var init_configChain = __esm({
2689
2686
  SWC: "swc",
2690
2687
  /** svgr */
2691
2688
  SVGR: "svgr",
2692
- // TODO: remove
2693
- /** yaml-loader */
2694
- YAML: "yaml",
2695
2689
  /** babel-loader */
2696
2690
  BABEL: "babel",
2697
2691
  /** style-loader */
@@ -2719,9 +2713,6 @@ var init_configChain = __esm({
2719
2713
  COPY: "copy",
2720
2714
  /** HtmlRspackPlugin */
2721
2715
  HTML: "html",
2722
- // TODO: remove
2723
- /** ESLintWebpackPlugin */
2724
- ESLINT: "eslint",
2725
2716
  /** DefinePlugin */
2726
2717
  DEFINE: "define",
2727
2718
  /** ProgressPlugin */
@@ -2744,9 +2735,6 @@ var init_configChain = __esm({
2744
2735
  VUE_LOADER_PLUGIN: "vue-loader-plugin",
2745
2736
  /** ReactFastRefreshPlugin */
2746
2737
  REACT_FAST_REFRESH: "react-fast-refresh",
2747
- // TODO: remove
2748
- /** ProvidePlugin for node polyfill */
2749
- NODE_POLYFILL_PROVIDE: "node-polyfill-provide",
2750
2738
  /** WebpackSRIPlugin */
2751
2739
  SUBRESOURCE_INTEGRITY: "subresource-integrity",
2752
2740
  /** AutoSetRootFontSizePlugin */
@@ -6039,10 +6027,7 @@ function applyFullySpecified({
6039
6027
  }) {
6040
6028
  chain.module.rule(CHAIN_ID2.RULE.MJS).test(/\.m?js/).resolve.set("fullySpecified", false);
6041
6029
  }
6042
- function applyExtensions({
6043
- chain,
6044
- tsconfigPath
6045
- }) {
6030
+ function applyExtensions({ chain }) {
6046
6031
  const extensions = [
6047
6032
  // most projects are using TypeScript, resolve .ts(x) files first to reduce resolve time.
6048
6033
  ".ts",
@@ -6053,11 +6038,6 @@ function applyExtensions({
6053
6038
  ".json"
6054
6039
  ];
6055
6040
  chain.resolve.extensions.merge(extensions);
6056
- if (tsconfigPath) {
6057
- chain.resolve.extensionAlias.merge({
6058
- ".js": [".ts", ".tsx", ".js"]
6059
- });
6060
- }
6061
6041
  }
6062
6042
  function applyAlias({
6063
6043
  chain,
@@ -6100,7 +6080,7 @@ var init_resolve = __esm({
6100
6080
  order: "pre",
6101
6081
  handler: (chain, { environment, CHAIN_ID: CHAIN_ID2 }) => {
6102
6082
  const { config, tsconfigPath } = environment;
6103
- applyExtensions({ chain, tsconfigPath });
6083
+ applyExtensions({ chain });
6104
6084
  applyAlias({
6105
6085
  chain,
6106
6086
  config,
@@ -7389,35 +7369,7 @@ var init_minimize = __esm({
7389
7369
  if (minifyCss && isRspack) {
7390
7370
  const defaultOptions2 = {
7391
7371
  minimizerOptions: {
7392
- targets: environment.browserslist,
7393
- // TODO: The exclude option of Lightning CSS does not work as expected
7394
- // so we need to disable all excludes and figure out how to skip the transformation
7395
- // see: https://github.com/parcel-bundler/lightningcss/issues/792
7396
- exclude: {
7397
- nesting: false,
7398
- notSelectorList: false,
7399
- dirSelector: false,
7400
- langSelectorList: false,
7401
- isSelector: false,
7402
- textDecorationThicknessPercent: false,
7403
- mediaIntervalSyntax: false,
7404
- mediaRangeSyntax: false,
7405
- customMediaQueries: false,
7406
- clampFunction: false,
7407
- colorFunction: false,
7408
- oklabColors: false,
7409
- labColors: false,
7410
- p3Colors: false,
7411
- hexAlphaColors: false,
7412
- spaceSeparatedColorNotation: false,
7413
- fontFamilySystemUi: false,
7414
- doublePositionGradients: false,
7415
- vendorPrefixes: false,
7416
- logicalProperties: false,
7417
- selectors: false,
7418
- mediaQueries: false,
7419
- color: false
7420
- }
7372
+ targets: environment.browserslist
7421
7373
  }
7422
7374
  };
7423
7375
  const mergedOptions = cssOptions ? (0, import_deepmerge3.default)(
@@ -9692,7 +9644,7 @@ var init_init = __esm({
9692
9644
 
9693
9645
  // src/cli/commands.ts
9694
9646
  function runCli() {
9695
- import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.6");
9647
+ import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.7");
9696
9648
  const devCommand = import_commander.program.command("dev");
9697
9649
  const buildCommand = import_commander.program.command("build");
9698
9650
  const previewCommand = import_commander.program.command("preview");
@@ -9815,7 +9767,7 @@ function prepareCli() {
9815
9767
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
9816
9768
  console.log();
9817
9769
  }
9818
- import_rslog.logger.greet(` ${`Rsbuild v${"1.0.6"}`}
9770
+ import_rslog.logger.greet(` ${`Rsbuild v${"1.0.7"}`}
9819
9771
  `);
9820
9772
  }
9821
9773
  var init_prepare = __esm({
@@ -9899,7 +9851,7 @@ init_logger();
9899
9851
  init_mergeConfig();
9900
9852
  init_helpers();
9901
9853
  init_constants();
9902
- var version = "1.0.6";
9854
+ var version = "1.0.7";
9903
9855
  // Annotate the CommonJS export names for ESM import in node:
9904
9856
  0 && (module.exports = {
9905
9857
  PLUGIN_CSS_NAME,
package/dist/index.js CHANGED
@@ -2342,7 +2342,7 @@ async function createContext(options, userConfig, bundlerType) {
2342
2342
  const rsbuildConfig = await withDefaultConfig(rootPath, userConfig);
2343
2343
  const cachePath = join6(rootPath, "node_modules", ".cache");
2344
2344
  return {
2345
- version: "1.0.6",
2345
+ version: "1.0.7",
2346
2346
  rootPath,
2347
2347
  distPath: "",
2348
2348
  cachePath,
@@ -2692,9 +2692,6 @@ var init_configChain = __esm({
2692
2692
  PUG: "pug",
2693
2693
  /** Rule for Vue */
2694
2694
  VUE: "vue",
2695
- // TODO: remove
2696
- /** Rule for yaml */
2697
- YAML: "yaml",
2698
2695
  /** Rule for wasm */
2699
2696
  WASM: "wasm",
2700
2697
  /** Rule for svelte */
@@ -2730,9 +2727,6 @@ var init_configChain = __esm({
2730
2727
  SWC: "swc",
2731
2728
  /** svgr */
2732
2729
  SVGR: "svgr",
2733
- // TODO: remove
2734
- /** yaml-loader */
2735
- YAML: "yaml",
2736
2730
  /** babel-loader */
2737
2731
  BABEL: "babel",
2738
2732
  /** style-loader */
@@ -2760,9 +2754,6 @@ var init_configChain = __esm({
2760
2754
  COPY: "copy",
2761
2755
  /** HtmlRspackPlugin */
2762
2756
  HTML: "html",
2763
- // TODO: remove
2764
- /** ESLintWebpackPlugin */
2765
- ESLINT: "eslint",
2766
2757
  /** DefinePlugin */
2767
2758
  DEFINE: "define",
2768
2759
  /** ProgressPlugin */
@@ -2785,9 +2776,6 @@ var init_configChain = __esm({
2785
2776
  VUE_LOADER_PLUGIN: "vue-loader-plugin",
2786
2777
  /** ReactFastRefreshPlugin */
2787
2778
  REACT_FAST_REFRESH: "react-fast-refresh",
2788
- // TODO: remove
2789
- /** ProvidePlugin for node polyfill */
2790
- NODE_POLYFILL_PROVIDE: "node-polyfill-provide",
2791
2779
  /** WebpackSRIPlugin */
2792
2780
  SUBRESOURCE_INTEGRITY: "subresource-integrity",
2793
2781
  /** AutoSetRootFontSizePlugin */
@@ -6109,10 +6097,7 @@ function applyFullySpecified({
6109
6097
  }) {
6110
6098
  chain.module.rule(CHAIN_ID2.RULE.MJS).test(/\.m?js/).resolve.set("fullySpecified", false);
6111
6099
  }
6112
- function applyExtensions({
6113
- chain,
6114
- tsconfigPath
6115
- }) {
6100
+ function applyExtensions({ chain }) {
6116
6101
  const extensions = [
6117
6102
  // most projects are using TypeScript, resolve .ts(x) files first to reduce resolve time.
6118
6103
  ".ts",
@@ -6123,11 +6108,6 @@ function applyExtensions({
6123
6108
  ".json"
6124
6109
  ];
6125
6110
  chain.resolve.extensions.merge(extensions);
6126
- if (tsconfigPath) {
6127
- chain.resolve.extensionAlias.merge({
6128
- ".js": [".ts", ".tsx", ".js"]
6129
- });
6130
- }
6131
6111
  }
6132
6112
  function applyAlias({
6133
6113
  chain,
@@ -6171,7 +6151,7 @@ var init_resolve = __esm({
6171
6151
  order: "pre",
6172
6152
  handler: (chain, { environment, CHAIN_ID: CHAIN_ID2 }) => {
6173
6153
  const { config, tsconfigPath } = environment;
6174
- applyExtensions({ chain, tsconfigPath });
6154
+ applyExtensions({ chain });
6175
6155
  applyAlias({
6176
6156
  chain,
6177
6157
  config,
@@ -7471,35 +7451,7 @@ var init_minimize = __esm({
7471
7451
  if (minifyCss && isRspack) {
7472
7452
  const defaultOptions2 = {
7473
7453
  minimizerOptions: {
7474
- targets: environment.browserslist,
7475
- // TODO: The exclude option of Lightning CSS does not work as expected
7476
- // so we need to disable all excludes and figure out how to skip the transformation
7477
- // see: https://github.com/parcel-bundler/lightningcss/issues/792
7478
- exclude: {
7479
- nesting: false,
7480
- notSelectorList: false,
7481
- dirSelector: false,
7482
- langSelectorList: false,
7483
- isSelector: false,
7484
- textDecorationThicknessPercent: false,
7485
- mediaIntervalSyntax: false,
7486
- mediaRangeSyntax: false,
7487
- customMediaQueries: false,
7488
- clampFunction: false,
7489
- colorFunction: false,
7490
- oklabColors: false,
7491
- labColors: false,
7492
- p3Colors: false,
7493
- hexAlphaColors: false,
7494
- spaceSeparatedColorNotation: false,
7495
- fontFamilySystemUi: false,
7496
- doublePositionGradients: false,
7497
- vendorPrefixes: false,
7498
- logicalProperties: false,
7499
- selectors: false,
7500
- mediaQueries: false,
7501
- color: false
7502
- }
7454
+ targets: environment.browserslist
7503
7455
  }
7504
7456
  };
7505
7457
  const mergedOptions = cssOptions ? (0, import_deepmerge3.default)(
@@ -9801,7 +9753,7 @@ import { existsSync } from "fs";
9801
9753
  import { program } from "../compiled/commander/index.js";
9802
9754
  import color16 from "../compiled/picocolors/index.js";
9803
9755
  function runCli() {
9804
- program.name("rsbuild").usage("<command> [options]").version("1.0.6");
9756
+ program.name("rsbuild").usage("<command> [options]").version("1.0.7");
9805
9757
  const devCommand = program.command("dev");
9806
9758
  const buildCommand = program.command("build");
9807
9759
  const previewCommand = program.command("preview");
@@ -9922,7 +9874,7 @@ function prepareCli() {
9922
9874
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
9923
9875
  console.log();
9924
9876
  }
9925
- logger.greet(` ${`Rsbuild v${"1.0.6"}`}
9877
+ logger.greet(` ${`Rsbuild v${"1.0.7"}`}
9926
9878
  `);
9927
9879
  }
9928
9880
  var init_prepare = __esm({
@@ -9993,7 +9945,7 @@ init_mergeConfig();
9993
9945
  init_helpers();
9994
9946
  init_constants();
9995
9947
  import { rspack as rspack10 } from "@rspack/core";
9996
- var version = "1.0.6";
9948
+ var version = "1.0.7";
9997
9949
  export {
9998
9950
  PLUGIN_CSS_NAME,
9999
9951
  PLUGIN_SWC_NAME,
@@ -34,8 +34,6 @@ export declare const CHAIN_ID: {
34
34
  readonly PUG: "pug";
35
35
  /** Rule for Vue */
36
36
  readonly VUE: "vue";
37
- /** Rule for yaml */
38
- readonly YAML: "yaml";
39
37
  /** Rule for wasm */
40
38
  readonly WASM: "wasm";
41
39
  /** Rule for svelte */
@@ -71,8 +69,6 @@ export declare const CHAIN_ID: {
71
69
  readonly SWC: "swc";
72
70
  /** svgr */
73
71
  readonly SVGR: "svgr";
74
- /** yaml-loader */
75
- readonly YAML: "yaml";
76
72
  /** babel-loader */
77
73
  readonly BABEL: "babel";
78
74
  /** style-loader */
@@ -100,8 +96,6 @@ export declare const CHAIN_ID: {
100
96
  readonly COPY: "copy";
101
97
  /** HtmlRspackPlugin */
102
98
  readonly HTML: "html";
103
- /** ESLintWebpackPlugin */
104
- readonly ESLINT: "eslint";
105
99
  /** DefinePlugin */
106
100
  readonly DEFINE: "define";
107
101
  /** ProgressPlugin */
@@ -124,8 +118,6 @@ export declare const CHAIN_ID: {
124
118
  readonly VUE_LOADER_PLUGIN: "vue-loader-plugin";
125
119
  /** ReactFastRefreshPlugin */
126
120
  readonly REACT_FAST_REFRESH: "react-fast-refresh";
127
- /** ProvidePlugin for node polyfill */
128
- readonly NODE_POLYFILL_PROVIDE: "node-polyfill-provide";
129
121
  /** WebpackSRIPlugin */
130
122
  readonly SUBRESOURCE_INTEGRITY: "subresource-integrity";
131
123
  /** AutoSetRootFontSizePlugin */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {
@@ -46,10 +46,10 @@
46
46
  "types.d.ts"
47
47
  ],
48
48
  "dependencies": {
49
- "@rspack/core": "~1.0.6",
49
+ "@rspack/core": "~1.0.7",
50
50
  "@rspack/lite-tapable": "~1.0.0",
51
51
  "@swc/helpers": "^0.5.13",
52
- "caniuse-lite": "^1.0.30001662",
52
+ "caniuse-lite": "^1.0.30001663",
53
53
  "core-js": "~3.38.1"
54
54
  },
55
55
  "devDependencies": {
@@ -59,7 +59,7 @@
59
59
  "@types/on-finished": "2.3.4",
60
60
  "@types/webpack-bundle-analyzer": "4.7.0",
61
61
  "@types/ws": "^8.5.12",
62
- "browserslist": "4.23.3",
62
+ "browserslist": "4.24.0",
63
63
  "browserslist-to-es-version": "^1.0.0",
64
64
  "chokidar": "3.6.0",
65
65
  "commander": "^12.1.0",
@@ -85,7 +85,7 @@
85
85
  "reduce-configs": "^1.0.0",
86
86
  "rsbuild-dev-middleware": "0.1.1",
87
87
  "rslog": "^1.2.3",
88
- "rspack-chain": "^1.0.3",
88
+ "rspack-chain": "^1.0.1",
89
89
  "rspack-manifest-plugin": "5.0.1",
90
90
  "sirv": "^2.0.4",
91
91
  "style-loader": "3.3.4",