@rsbuild/core 1.0.5 → 1.0.6

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,27 +1,27 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 3894: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 9895: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(4816);
5
+ const loader = __nccwpck_require__(7781);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(6162).defaultGetLocalIdent;
8
+ __nccwpck_require__(6598).defaultGetLocalIdent;
9
9
  },
10
- 4816: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 7781: (__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
- var _semver = __nccwpck_require__(938);
17
- var _options = _interopRequireDefault(__nccwpck_require__(3900));
18
- var _plugins = __nccwpck_require__(1712);
19
- var _utils = __nccwpck_require__(6162);
16
+ var _semver = { satisfies: () => true };
17
+ var _options = _interopRequireDefault(__nccwpck_require__(2030));
18
+ var _plugins = __nccwpck_require__(350);
19
+ var _utils = __nccwpck_require__(6598);
20
20
  function _interopRequireDefault(obj) {
21
21
  return obj && obj.__esModule ? obj : { default: obj };
22
22
  }
23
23
  async function loader(content, map, meta) {
24
- const rawOptions = this.getOptions();
24
+ const rawOptions = this.getOptions(_options.default);
25
25
  const callback = this.async();
26
26
  if (
27
27
  this._compiler &&
@@ -131,7 +131,7 @@
131
131
  }),
132
132
  );
133
133
  }
134
- if (meta && !rawOptions._skipReuseAST) {
134
+ if (meta) {
135
135
  const { ast } = meta;
136
136
  if (
137
137
  ast &&
@@ -243,7 +243,7 @@
243
243
  callback(null, `${importCode}${moduleCode}${exportCode}`);
244
244
  }
245
245
  },
246
- 1712: (__unused_webpack_module, exports, __nccwpck_require__) => {
246
+ 350: (__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__(2604),
268
+ __nccwpck_require__(3967),
269
269
  );
270
270
  var _postcssIcssParser = _interopRequireDefault(
271
- __nccwpck_require__(6686),
271
+ __nccwpck_require__(2421),
272
272
  );
273
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6136));
273
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(4567));
274
274
  function _interopRequireDefault(obj) {
275
275
  return obj && obj.__esModule ? obj : { default: obj };
276
276
  }
277
277
  },
278
- 6686: (__unused_webpack_module, exports, __nccwpck_require__) => {
278
+ 2421: (__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__(6162);
283
+ var _utils = __nccwpck_require__(6598);
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
- 2604: (__unused_webpack_module, exports, __nccwpck_require__) => {
382
+ 3967: (__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__(6162);
389
+ var _utils = __nccwpck_require__(6598);
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
- 6136: (__unused_webpack_module, exports, __nccwpck_require__) => {
694
+ 4567: (__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__(6162);
701
+ var _utils = __nccwpck_require__(6598);
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
- 6162: (__unused_webpack_module, exports, __nccwpck_require__) => {
1044
+ 6598: (__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;
@@ -7948,10 +7948,6 @@
7948
7948
  "use strict";
7949
7949
  module.exports = require("../postcss");
7950
7950
  },
7951
- 938: (module) => {
7952
- "use strict";
7953
- module.exports = require("./semver");
7954
- },
7955
7951
  1017: (module) => {
7956
7952
  "use strict";
7957
7953
  module.exports = require("path");
@@ -7964,7 +7960,7 @@
7964
7960
  "use strict";
7965
7961
  module.exports = require("util");
7966
7962
  },
7967
- 3900: (module) => {
7963
+ 2030: (module) => {
7968
7964
  "use strict";
7969
7965
  module.exports = JSON.parse(
7970
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"}',
@@ -7999,6 +7995,6 @@
7999
7995
  }
8000
7996
  if (typeof __nccwpck_require__ !== "undefined")
8001
7997
  __nccwpck_require__.ab = __dirname + "/";
8002
- var __webpack_exports__ = __nccwpck_require__(3894);
7998
+ var __webpack_exports__ = __nccwpck_require__(9895);
8003
7999
  module.exports = __webpack_exports__;
8004
8000
  })();
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 894: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 842: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(426);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(456);
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
- 426: (module) => {
307
+ 456: (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
- 955: (module) => {
476
+ 965: (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
- 265: (module) => {
495
+ 236: (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
- 411: (module, __unused_webpack_exports, __nccwpck_require__) => {
516
+ 962: (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
- 647: (module) => {
542
+ 284: (module) => {
543
543
  const voidTags = [
544
544
  "area",
545
545
  "base",
@@ -607,19 +607,19 @@
607
607
  htmlTagObjectToString,
608
608
  };
609
609
  },
610
- 693: (module, __unused_webpack_exports, __nccwpck_require__) => {
610
+ 667: (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__(894);
616
+ const { CachedChildCompilation } = __nccwpck_require__(842);
617
617
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
618
- __nccwpck_require__(647);
619
- const prettyError = __nccwpck_require__(265);
620
- const chunkSorter = __nccwpck_require__(955);
618
+ __nccwpck_require__(284);
619
+ const prettyError = __nccwpck_require__(236);
620
+ const chunkSorter = __nccwpck_require__(965);
621
621
  const getHtmlRspackPluginHooks =
622
- __nccwpck_require__(411).getHtmlRspackPluginHooks;
622
+ __nccwpck_require__(962).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__(693);
1580
+ var __webpack_exports__ = __nccwpck_require__(667);
1581
1581
  module.exports = __webpack_exports__;
1582
1582
  })();
@@ -1,86 +1,5 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 78: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
- let argv = process.argv || [],
5
- env = process.env;
6
- let isColorSupported =
7
- !("NO_COLOR" in env || argv.includes("--no-color")) &&
8
- ("FORCE_COLOR" in env ||
9
- argv.includes("--color") ||
10
- process.platform === "win32" ||
11
- (require != null &&
12
- __nccwpck_require__(224).isatty(1) &&
13
- env.TERM !== "dumb") ||
14
- "CI" in env);
15
- let formatter =
16
- (open, close, replace = open) =>
17
- (input) => {
18
- let string = "" + input;
19
- let index = string.indexOf(close, open.length);
20
- return ~index
21
- ? open + replaceClose(string, close, replace, index) + close
22
- : open + string + close;
23
- };
24
- let replaceClose = (string, close, replace, index) => {
25
- let result = "";
26
- let cursor = 0;
27
- do {
28
- result += string.substring(cursor, index) + replace;
29
- cursor = index + close.length;
30
- index = string.indexOf(close, cursor);
31
- } while (~index);
32
- return result + string.substring(cursor);
33
- };
34
- let createColors = (enabled = isColorSupported) => {
35
- let init = enabled ? formatter : () => String;
36
- return {
37
- isColorSupported: enabled,
38
- reset: init("", ""),
39
- bold: init("", "", ""),
40
- dim: init("", "", ""),
41
- italic: init("", ""),
42
- underline: init("", ""),
43
- inverse: init("", ""),
44
- hidden: init("", ""),
45
- strikethrough: init("", ""),
46
- black: init("", ""),
47
- red: init("", ""),
48
- green: init("", ""),
49
- yellow: init("", ""),
50
- blue: init("", ""),
51
- magenta: init("", ""),
52
- cyan: init("", ""),
53
- white: init("", ""),
54
- gray: init("", ""),
55
- bgBlack: init("", ""),
56
- bgRed: init("", ""),
57
- bgGreen: init("", ""),
58
- bgYellow: init("", ""),
59
- bgBlue: init("", ""),
60
- bgMagenta: init("", ""),
61
- bgCyan: init("", ""),
62
- bgWhite: init("", ""),
63
- blackBright: init("", ""),
64
- redBright: init("", ""),
65
- greenBright: init("", ""),
66
- yellowBright: init("", ""),
67
- blueBright: init("", ""),
68
- magentaBright: init("", ""),
69
- cyanBright: init("", ""),
70
- whiteBright: init("", ""),
71
- bgBlackBright: init("", ""),
72
- bgRedBright: init("", ""),
73
- bgGreenBright: init("", ""),
74
- bgYellowBright: init("", ""),
75
- bgBlueBright: init("", ""),
76
- bgMagentaBright: init("", ""),
77
- bgCyanBright: init("", ""),
78
- bgWhiteBright: init("", ""),
79
- };
80
- };
81
- module.exports = createColors();
82
- module.exports.createColors = createColors;
83
- },
84
3
  135: (module, __unused_webpack_exports, __nccwpck_require__) => {
85
4
  "use strict";
86
5
  let Container = __nccwpck_require__(208);
@@ -500,8 +419,8 @@
500
419
  },
501
420
  873: (module, __unused_webpack_exports, __nccwpck_require__) => {
502
421
  "use strict";
503
- let pico = __nccwpck_require__(78);
504
- let terminalHighlight = __nccwpck_require__(272);
422
+ let pico = __nccwpck_require__(272);
423
+ let terminalHighlight = __nccwpck_require__(202);
505
424
  class CssSyntaxError extends Error {
506
425
  constructor(message, line, column, source, file, plugin) {
507
426
  super(message);
@@ -721,7 +640,7 @@
721
640
  let { fileURLToPath, pathToFileURL } = __nccwpck_require__(310);
722
641
  let CssSyntaxError = __nccwpck_require__(873);
723
642
  let PreviousMap = __nccwpck_require__(261);
724
- let terminalHighlight = __nccwpck_require__(272);
643
+ let terminalHighlight = __nccwpck_require__(202);
725
644
  let fromOffsetCache = Symbol("fromOffsetCache");
726
645
  let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
727
646
  let pathAvailable = Boolean(resolve && isAbsolute);
@@ -3503,9 +3422,9 @@
3503
3422
  module.exports.isClean = Symbol("isClean");
3504
3423
  module.exports.my = Symbol("my");
3505
3424
  },
3506
- 272: (module, __unused_webpack_exports, __nccwpck_require__) => {
3425
+ 202: (module, __unused_webpack_exports, __nccwpck_require__) => {
3507
3426
  "use strict";
3508
- let pico = __nccwpck_require__(78);
3427
+ let pico = __nccwpck_require__(272);
3509
3428
  let tokenizer = __nccwpck_require__(155);
3510
3429
  let Input;
3511
3430
  function registerInput(dependant) {
@@ -5987,6 +5906,10 @@
5987
5906
  exports.SourceMapConsumer = __nccwpck_require__(9).SourceMapConsumer;
5988
5907
  exports.SourceNode = __nccwpck_require__(835).SourceNode;
5989
5908
  },
5909
+ 272: (module) => {
5910
+ "use strict";
5911
+ module.exports = require("../picocolors");
5912
+ },
5990
5913
  147: (module) => {
5991
5914
  "use strict";
5992
5915
  module.exports = require("fs");
@@ -5995,10 +5918,6 @@
5995
5918
  "use strict";
5996
5919
  module.exports = require("path");
5997
5920
  },
5998
- 224: (module) => {
5999
- "use strict";
6000
- module.exports = require("tty");
6001
- },
6002
5921
  310: (module) => {
6003
5922
  "use strict";
6004
5923
  module.exports = require("url");
@@ -1,17 +1,17 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 562: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(373)["default"];
4
+ 546: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(14)["default"];
6
6
  },
7
- 373: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 14: (__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
- var _options = _interopRequireDefault(__nccwpck_require__(763));
14
- var _utils = __nccwpck_require__(273);
13
+ var _options = _interopRequireDefault(__nccwpck_require__(226));
14
+ var _utils = __nccwpck_require__(523);
15
15
  function _interopRequireDefault(obj) {
16
16
  return obj && obj.__esModule ? obj : { default: obj };
17
17
  }
@@ -82,7 +82,7 @@
82
82
  meta &&
83
83
  meta.ast &&
84
84
  meta.ast.type === "postcss" &&
85
- __nccwpck_require__(938).satisfies(
85
+ { satisfies: () => true }.satisfies(
86
86
  meta.ast.version,
87
87
  `^${_package.default.version}`,
88
88
  )
@@ -189,7 +189,7 @@
189
189
  callback(null, result.css, map, { ast });
190
190
  }
191
191
  },
192
- 273: (module, exports, __nccwpck_require__) => {
192
+ 523: (module, exports, __nccwpck_require__) => {
193
193
  module = __nccwpck_require__.nmd(module);
194
194
  Object.defineProperty(exports, "__esModule", { value: true });
195
195
  exports.exec = exec;
@@ -682,9 +682,6 @@
682
682
  993: (module) => {
683
683
  module.exports = require("../jiti");
684
684
  },
685
- 938: (module) => {
686
- module.exports = require("./semver");
687
- },
688
685
  188: (module) => {
689
686
  module.exports = require("module");
690
687
  },
@@ -694,7 +691,7 @@
694
691
  310: (module) => {
695
692
  module.exports = require("url");
696
693
  },
697
- 763: (module) => {
694
+ 226: (module) => {
698
695
  module.exports = JSON.parse(
699
696
  '{"title":"PostCSS Loader options","type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","link":"https://github.com/webpack-contrib/postcss-loader#postcssOptions","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS config path.","link":"https://github.com/webpack-contrib/postcss-loader#config","anyOf":[{"description":"Allows to specify the path to the configuration file","type":"string"},{"description":"Enables/Disables autoloading config","type":"boolean"}]}}},{"instanceof":"Function"}]},"execute":{"description":"Enables/Disables PostCSS parser support in \'CSS-in-JS\'.","link":"https://github.com/webpack-contrib/postcss-loader#execute","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/postcss-loader#sourcemap","type":"boolean"},"implementation":{"description":"The implementation of postcss to use, instead of the locally installed version","link":"https://github.com/webpack-contrib/postcss-loader#implementation","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
700
697
  );
@@ -739,6 +736,6 @@
739
736
  })();
740
737
  if (typeof __nccwpck_require__ !== "undefined")
741
738
  __nccwpck_require__.ab = __dirname + "/";
742
- var __webpack_exports__ = __nccwpck_require__(562);
739
+ var __webpack_exports__ = __nccwpck_require__(546);
743
740
  module.exports = __webpack_exports__;
744
741
  })();
@@ -349,6 +349,7 @@ declare namespace Config {
349
349
  RspackResolve['descriptionFiles'][number]
350
350
  >;
351
351
  extensions: TypedChainedSet<this, RspackResolve['extensions'][number]>;
352
+ extensionAlias: TypedChainedMap<this, RspackResolve['extensionAlias']>;
352
353
  mainFields: TypedChainedSet<this, RspackResolve['mainFields'][number]>;
353
354
  mainFiles: TypedChainedSet<this, RspackResolve['mainFiles'][number]>;
354
355
  exportsFields: TypedChainedSet<
@@ -627,7 +627,7 @@
627
627
  };
628
628
  exports.toString = toString;
629
629
  },
630
- 432: (module) => {
630
+ 86: (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
- 684: (module, __unused_webpack_exports, __nccwpck_require__) => {
644
- const createMap = __nccwpck_require__(84);
645
- const createChainable = __nccwpck_require__(537);
643
+ 465: (module, __unused_webpack_exports, __nccwpck_require__) => {
644
+ const createMap = __nccwpck_require__(670);
645
+ const createChainable = __nccwpck_require__(742);
646
646
  module.exports = createMap(createChainable(Object));
647
647
  },
648
- 740: (module, __unused_webpack_exports, __nccwpck_require__) => {
649
- const createSet = __nccwpck_require__(566);
650
- const createChainable = __nccwpck_require__(537);
648
+ 741: (module, __unused_webpack_exports, __nccwpck_require__) => {
649
+ const createSet = __nccwpck_require__(3);
650
+ const createChainable = __nccwpck_require__(742);
651
651
  module.exports = createSet(createChainable(Object));
652
652
  },
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);
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);
658
658
  module.exports = createValue(createMap(createChainable(Callable)));
659
659
  },
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);
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);
672
672
  module.exports = class extends ChainedMap {
673
673
  constructor() {
674
674
  super();
@@ -818,9 +818,9 @@
818
818
  }
819
819
  };
820
820
  },
821
- 692: (module, __unused_webpack_exports, __nccwpck_require__) => {
822
- const ChainedMap = __nccwpck_require__(684);
823
- const ChainedSet = __nccwpck_require__(740);
821
+ 222: (module, __unused_webpack_exports, __nccwpck_require__) => {
822
+ const ChainedMap = __nccwpck_require__(465);
823
+ const ChainedSet = __nccwpck_require__(741);
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
- 310: (module, __unused_webpack_exports, __nccwpck_require__) => {
896
- const ChainedMap = __nccwpck_require__(684);
897
- const Rule = __nccwpck_require__(315);
895
+ 486: (module, __unused_webpack_exports, __nccwpck_require__) => {
896
+ const ChainedMap = __nccwpck_require__(465);
897
+ const Rule = __nccwpck_require__(411);
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
- 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);
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);
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
- 201: (module) => {
1016
+ 570: (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
- 43: (module, __unused_webpack_exports, __nccwpck_require__) => {
1049
- const ChainedMap = __nccwpck_require__(684);
1048
+ 215: (module, __unused_webpack_exports, __nccwpck_require__) => {
1049
+ const ChainedMap = __nccwpck_require__(465);
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
- 549: (module, __unused_webpack_exports, __nccwpck_require__) => {
1104
- const ChainedValueMap = __nccwpck_require__(792);
1103
+ 731: (module, __unused_webpack_exports, __nccwpck_require__) => {
1104
+ const ChainedValueMap = __nccwpck_require__(19);
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
- 360: (module, __unused_webpack_exports, __nccwpck_require__) => {
1118
- const ChainedMap = __nccwpck_require__(684);
1119
- const Orderable = __nccwpck_require__(201);
1117
+ 558: (module, __unused_webpack_exports, __nccwpck_require__) => {
1118
+ const ChainedMap = __nccwpck_require__(465);
1119
+ const Orderable = __nccwpck_require__(570);
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__(900)(pluginPath);
1173
+ plugin = __nccwpck_require__(250)(pluginPath);
1174
1174
  }
1175
1175
  const constructorName = plugin.__expression
1176
1176
  ? `(${plugin.__expression})`
@@ -1188,11 +1188,11 @@
1188
1188
  },
1189
1189
  );
1190
1190
  },
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"];
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"];
1196
1196
  const childSets = [
1197
1197
  "aliasFields",
1198
1198
  "conditionNames",
@@ -1270,9 +1270,9 @@
1270
1270
  }
1271
1271
  };
1272
1272
  },
1273
- 799: (module, __unused_webpack_exports, __nccwpck_require__) => {
1274
- const Resolve = __nccwpck_require__(894);
1275
- const ChainedSet = __nccwpck_require__(740);
1273
+ 609: (module, __unused_webpack_exports, __nccwpck_require__) => {
1274
+ const Resolve = __nccwpck_require__(816);
1275
+ const ChainedSet = __nccwpck_require__(741);
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
- 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);
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);
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
- 735: (module, __unused_webpack_exports, __nccwpck_require__) => {
1432
+ 182: (module, __unused_webpack_exports, __nccwpck_require__) => {
1433
1433
  const merge = __nccwpck_require__(964);
1434
- const ChainedMap = __nccwpck_require__(684);
1435
- const Orderable = __nccwpck_require__(201);
1434
+ const ChainedMap = __nccwpck_require__(465);
1435
+ const Orderable = __nccwpck_require__(570);
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
- 537: (module) => {
1468
+ 742: (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
- 84: (module, __unused_webpack_exports, __nccwpck_require__) => {
1485
+ 670: (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
- 566: (module) => {
1609
+ 3: (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
- 908: (module) => {
1659
+ 783: (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
- 900: (module) => {
1697
+ 250: (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 = 900;
1705
+ webpackEmptyContext.id = 250;
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__(173);
1735
+ var __webpack_exports__ = __nccwpck_require__(453);
1736
1736
  module.exports = __webpack_exports__;
1737
1737
  })();
@@ -1 +1 @@
1
- {"name":"rspack-chain","author":"rspack-contrib","version":"1.0.1","license":"MPL-2.0","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"rspack-chain","author":"rspack-contrib","version":"1.0.3","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
- 525: (__unused_webpack_module, exports, __nccwpck_require__) => {
4
+ 747: (__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
- 950: (__unused_webpack_module, exports, __nccwpck_require__) => {
123
+ 192: (__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__(525);
133
+ const helpers_1 = __nccwpck_require__(747);
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__(950);
315
+ const hooks_1 = __nccwpck_require__(192);
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.5",
2307
+ version: "1.0.6",
2308
2308
  rootPath,
2309
2309
  distPath: "",
2310
2310
  cachePath,
@@ -5881,8 +5881,7 @@ var init_css = __esm({
5881
5881
  ...cssModules,
5882
5882
  localIdentName
5883
5883
  },
5884
- sourceMap: config.output.sourceMap.css,
5885
- _skipReuseAST: config.tools.lightningcssLoader !== false
5884
+ sourceMap: config.output.sourceMap.css
5886
5885
  };
5887
5886
  const mergedCssLoaderOptions = reduceConfigs({
5888
5887
  initial: defaultOptions2,
@@ -6040,7 +6039,10 @@ function applyFullySpecified({
6040
6039
  }) {
6041
6040
  chain.module.rule(CHAIN_ID2.RULE.MJS).test(/\.m?js/).resolve.set("fullySpecified", false);
6042
6041
  }
6043
- function applyExtensions({ chain }) {
6042
+ function applyExtensions({
6043
+ chain,
6044
+ tsconfigPath
6045
+ }) {
6044
6046
  const extensions = [
6045
6047
  // most projects are using TypeScript, resolve .ts(x) files first to reduce resolve time.
6046
6048
  ".ts",
@@ -6051,6 +6053,11 @@ function applyExtensions({ chain }) {
6051
6053
  ".json"
6052
6054
  ];
6053
6055
  chain.resolve.extensions.merge(extensions);
6056
+ if (tsconfigPath) {
6057
+ chain.resolve.extensionAlias.merge({
6058
+ ".js": [".ts", ".tsx", ".js"]
6059
+ });
6060
+ }
6054
6061
  }
6055
6062
  function applyAlias({
6056
6063
  chain,
@@ -6093,7 +6100,7 @@ var init_resolve = __esm({
6093
6100
  order: "pre",
6094
6101
  handler: (chain, { environment, CHAIN_ID: CHAIN_ID2 }) => {
6095
6102
  const { config, tsconfigPath } = environment;
6096
- applyExtensions({ chain });
6103
+ applyExtensions({ chain, tsconfigPath });
6097
6104
  applyAlias({
6098
6105
  chain,
6099
6106
  config,
@@ -9685,7 +9692,7 @@ var init_init = __esm({
9685
9692
 
9686
9693
  // src/cli/commands.ts
9687
9694
  function runCli() {
9688
- import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.5");
9695
+ import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.6");
9689
9696
  const devCommand = import_commander.program.command("dev");
9690
9697
  const buildCommand = import_commander.program.command("build");
9691
9698
  const previewCommand = import_commander.program.command("preview");
@@ -9808,7 +9815,7 @@ function prepareCli() {
9808
9815
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
9809
9816
  console.log();
9810
9817
  }
9811
- import_rslog.logger.greet(` ${`Rsbuild v${"1.0.5"}`}
9818
+ import_rslog.logger.greet(` ${`Rsbuild v${"1.0.6"}`}
9812
9819
  `);
9813
9820
  }
9814
9821
  var init_prepare = __esm({
@@ -9892,7 +9899,7 @@ init_logger();
9892
9899
  init_mergeConfig();
9893
9900
  init_helpers();
9894
9901
  init_constants();
9895
- var version = "1.0.5";
9902
+ var version = "1.0.6";
9896
9903
  // Annotate the CommonJS export names for ESM import in node:
9897
9904
  0 && (module.exports = {
9898
9905
  PLUGIN_CSS_NAME,
package/dist/index.js CHANGED
@@ -46,12 +46,12 @@ var __publicField = (obj, key, value) => {
46
46
  return value;
47
47
  };
48
48
 
49
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.60.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js
49
+ // ../../node_modules/.pnpm/@modern-js+module-tools@2.60.1_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js
50
50
  import path from "path";
51
51
  import { fileURLToPath } from "url";
52
52
  var getFilename, getDirname, __dirname, __filename;
53
53
  var init_esm = __esm({
54
- "../../node_modules/.pnpm/@modern-js+module-tools@2.60.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js"() {
54
+ "../../node_modules/.pnpm/@modern-js+module-tools@2.60.1_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js"() {
55
55
  "use strict";
56
56
  getFilename = () => fileURLToPath(import.meta.url);
57
57
  getDirname = () => path.dirname(getFilename());
@@ -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.5",
2345
+ version: "1.0.6",
2346
2346
  rootPath,
2347
2347
  distPath: "",
2348
2348
  cachePath,
@@ -5950,8 +5950,7 @@ var init_css = __esm({
5950
5950
  ...cssModules,
5951
5951
  localIdentName
5952
5952
  },
5953
- sourceMap: config.output.sourceMap.css,
5954
- _skipReuseAST: config.tools.lightningcssLoader !== false
5953
+ sourceMap: config.output.sourceMap.css
5955
5954
  };
5956
5955
  const mergedCssLoaderOptions = reduceConfigs({
5957
5956
  initial: defaultOptions2,
@@ -6110,7 +6109,10 @@ function applyFullySpecified({
6110
6109
  }) {
6111
6110
  chain.module.rule(CHAIN_ID2.RULE.MJS).test(/\.m?js/).resolve.set("fullySpecified", false);
6112
6111
  }
6113
- function applyExtensions({ chain }) {
6112
+ function applyExtensions({
6113
+ chain,
6114
+ tsconfigPath
6115
+ }) {
6114
6116
  const extensions = [
6115
6117
  // most projects are using TypeScript, resolve .ts(x) files first to reduce resolve time.
6116
6118
  ".ts",
@@ -6121,6 +6123,11 @@ function applyExtensions({ chain }) {
6121
6123
  ".json"
6122
6124
  ];
6123
6125
  chain.resolve.extensions.merge(extensions);
6126
+ if (tsconfigPath) {
6127
+ chain.resolve.extensionAlias.merge({
6128
+ ".js": [".ts", ".tsx", ".js"]
6129
+ });
6130
+ }
6124
6131
  }
6125
6132
  function applyAlias({
6126
6133
  chain,
@@ -6164,7 +6171,7 @@ var init_resolve = __esm({
6164
6171
  order: "pre",
6165
6172
  handler: (chain, { environment, CHAIN_ID: CHAIN_ID2 }) => {
6166
6173
  const { config, tsconfigPath } = environment;
6167
- applyExtensions({ chain });
6174
+ applyExtensions({ chain, tsconfigPath });
6168
6175
  applyAlias({
6169
6176
  chain,
6170
6177
  config,
@@ -9794,7 +9801,7 @@ import { existsSync } from "fs";
9794
9801
  import { program } from "../compiled/commander/index.js";
9795
9802
  import color16 from "../compiled/picocolors/index.js";
9796
9803
  function runCli() {
9797
- program.name("rsbuild").usage("<command> [options]").version("1.0.5");
9804
+ program.name("rsbuild").usage("<command> [options]").version("1.0.6");
9798
9805
  const devCommand = program.command("dev");
9799
9806
  const buildCommand = program.command("build");
9800
9807
  const previewCommand = program.command("preview");
@@ -9915,7 +9922,7 @@ function prepareCli() {
9915
9922
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
9916
9923
  console.log();
9917
9924
  }
9918
- logger.greet(` ${`Rsbuild v${"1.0.5"}`}
9925
+ logger.greet(` ${`Rsbuild v${"1.0.6"}`}
9919
9926
  `);
9920
9927
  }
9921
9928
  var init_prepare = __esm({
@@ -9986,7 +9993,7 @@ init_mergeConfig();
9986
9993
  init_helpers();
9987
9994
  init_constants();
9988
9995
  import { rspack as rspack10 } from "@rspack/core";
9989
- var version = "1.0.5";
9996
+ var version = "1.0.6";
9990
9997
  export {
9991
9998
  PLUGIN_CSS_NAME,
9992
9999
  PLUGIN_SWC_NAME,
@@ -138,11 +138,6 @@ export interface CSSLoaderOptions {
138
138
  * @default 'array'
139
139
  */
140
140
  exportType?: 'array' | 'string' | 'css-style-sheet';
141
- /**
142
- * Temp fix for https://github.com/web-infra-dev/rspack/issues/7819
143
- * @private
144
- */
145
- _skipReuseAST?: boolean;
146
141
  }
147
142
  export type StyleLoaderInjectType = 'styleTag' | 'singletonStyleTag' | 'lazyStyleTag' | 'lazySingletonStyleTag' | 'linkTag';
148
143
  export interface StyleLoaderOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
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.5",
49
+ "@rspack/core": "~1.0.6",
50
50
  "@rspack/lite-tapable": "~1.0.0",
51
51
  "@swc/helpers": "^0.5.13",
52
- "caniuse-lite": "^1.0.30001660",
52
+ "caniuse-lite": "^1.0.30001662",
53
53
  "core-js": "~3.38.1"
54
54
  },
55
55
  "devDependencies": {
@@ -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.1",
88
+ "rspack-chain": "^1.0.3",
89
89
  "rspack-manifest-plugin": "5.0.1",
90
90
  "sirv": "^2.0.4",
91
91
  "style-loader": "3.3.4",
package/types.d.ts CHANGED
@@ -149,6 +149,9 @@ declare module '*.opus' {
149
149
  /**
150
150
  * Configuration files
151
151
  */
152
+ /**
153
+ * @requires [@rsbuild/plugin-yaml](https://www.npmjs.com/package/@rsbuild/plugin-yaml)
154
+ */
152
155
  declare module '*.yaml' {
153
156
  const content: Record<string, any>;
154
157
  export default content;
@@ -157,6 +160,13 @@ declare module '*.yml' {
157
160
  const content: Record<string, any>;
158
161
  export default content;
159
162
  }
163
+ /**
164
+ * @requires [@rsbuild/plugin-toml](https://www.npmjs.com/package/@rsbuild/plugin-toml)
165
+ */
166
+ declare module '*.toml' {
167
+ const content: Record<string, any>;
168
+ export default content;
169
+ }
160
170
 
161
171
  /**
162
172
  * Queries
@@ -180,6 +190,9 @@ declare module '*.module.css' {
180
190
  const classes: CSSModuleClasses;
181
191
  export default classes;
182
192
  }
193
+ /**
194
+ * @requires [@rsbuild/plugin-sass](https://www.npmjs.com/package/@rsbuild/plugin-sass)
195
+ */
183
196
  declare module '*.module.scss' {
184
197
  const classes: CSSModuleClasses;
185
198
  export default classes;
@@ -188,10 +201,16 @@ declare module '*.module.sass' {
188
201
  const classes: CSSModuleClasses;
189
202
  export default classes;
190
203
  }
204
+ /**
205
+ * @requires [@rsbuild/plugin-less](https://www.npmjs.com/package/@rsbuild/plugin-less)
206
+ */
191
207
  declare module '*.module.less' {
192
208
  const classes: CSSModuleClasses;
193
209
  export default classes;
194
210
  }
211
+ /**
212
+ * @requires [@rsbuild/plugin-stylus](https://www.npmjs.com/package/@rsbuild/plugin-stylus)
213
+ */
195
214
  declare module '*.module.styl' {
196
215
  const classes: CSSModuleClasses;
197
216
  export default classes;
@@ -1 +0,0 @@
1
- module.exports.satisfies = () => true;
@@ -1 +0,0 @@
1
- module.exports.satisfies = () => true;