@rsbuild/core 1.3.11 → 1.3.13
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.
- package/compiled/css-loader/index.js +19 -19
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/http-proxy-middleware/index.js +40 -38
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/index.cjs +46 -27
- package/dist/index.js +46 -27
- package/dist-types/types/config.d.ts +22 -15
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
2019: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(6797);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(3288).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
6797: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11
11
|
"use strict";
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports["default"] = loader;
|
|
14
14
|
var _postcss = _interopRequireDefault(__nccwpck_require__(9409));
|
|
15
|
-
var _plugins = __nccwpck_require__(
|
|
16
|
-
var _utils = __nccwpck_require__(
|
|
15
|
+
var _plugins = __nccwpck_require__(5922);
|
|
16
|
+
var _utils = __nccwpck_require__(3288);
|
|
17
17
|
function _interopRequireDefault(obj) {
|
|
18
18
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
19
19
|
}
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
callback(null, `${importCode}${moduleCode}${exportCode}`);
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
|
|
239
|
+
5922: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
240
240
|
"use strict";
|
|
241
241
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
242
242
|
Object.defineProperty(exports, "icssParser", {
|
|
@@ -257,21 +257,21 @@
|
|
|
257
257
|
return _postcssUrlParser.default;
|
|
258
258
|
},
|
|
259
259
|
});
|
|
260
|
-
var _postcssImportParser = _interopRequireDefault(
|
|
261
|
-
|
|
260
|
+
var _postcssImportParser = _interopRequireDefault(__nccwpck_require__(1));
|
|
261
|
+
var _postcssIcssParser = _interopRequireDefault(
|
|
262
|
+
__nccwpck_require__(6712),
|
|
262
263
|
);
|
|
263
|
-
var
|
|
264
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(7013));
|
|
264
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(5295));
|
|
265
265
|
function _interopRequireDefault(obj) {
|
|
266
266
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
-
|
|
269
|
+
6712: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
270
270
|
"use strict";
|
|
271
271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
272
272
|
exports["default"] = void 0;
|
|
273
273
|
var _icssUtils = __nccwpck_require__(4531);
|
|
274
|
-
var _utils = __nccwpck_require__(
|
|
274
|
+
var _utils = __nccwpck_require__(3288);
|
|
275
275
|
const plugin = (options = {}) => ({
|
|
276
276
|
postcssPlugin: "postcss-icss-parser",
|
|
277
277
|
async OnceExit(root) {
|
|
@@ -370,14 +370,14 @@
|
|
|
370
370
|
plugin.postcss = true;
|
|
371
371
|
var _default = (exports["default"] = plugin);
|
|
372
372
|
},
|
|
373
|
-
|
|
373
|
+
1: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
374
374
|
"use strict";
|
|
375
375
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
376
376
|
exports["default"] = void 0;
|
|
377
377
|
var _postcssValueParser = _interopRequireDefault(
|
|
378
378
|
__nccwpck_require__(2948),
|
|
379
379
|
);
|
|
380
|
-
var _utils = __nccwpck_require__(
|
|
380
|
+
var _utils = __nccwpck_require__(3288);
|
|
381
381
|
function _interopRequireDefault(obj) {
|
|
382
382
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
383
383
|
}
|
|
@@ -682,14 +682,14 @@
|
|
|
682
682
|
plugin.postcss = true;
|
|
683
683
|
var _default = (exports["default"] = plugin);
|
|
684
684
|
},
|
|
685
|
-
|
|
685
|
+
5295: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
686
686
|
"use strict";
|
|
687
687
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
688
688
|
exports["default"] = void 0;
|
|
689
689
|
var _postcssValueParser = _interopRequireDefault(
|
|
690
690
|
__nccwpck_require__(2948),
|
|
691
691
|
);
|
|
692
|
-
var _utils = __nccwpck_require__(
|
|
692
|
+
var _utils = __nccwpck_require__(3288);
|
|
693
693
|
function _interopRequireDefault(obj) {
|
|
694
694
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
695
695
|
}
|
|
@@ -1032,7 +1032,7 @@
|
|
|
1032
1032
|
plugin.postcss = true;
|
|
1033
1033
|
var _default = (exports["default"] = plugin);
|
|
1034
1034
|
},
|
|
1035
|
-
|
|
1035
|
+
3288: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1036
1036
|
"use strict";
|
|
1037
1037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1038
1038
|
exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
|
|
@@ -8096,6 +8096,6 @@
|
|
|
8096
8096
|
}
|
|
8097
8097
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8098
8098
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8099
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8099
|
+
var __webpack_exports__ = __nccwpck_require__(2019);
|
|
8100
8100
|
module.exports = __webpack_exports__;
|
|
8101
8101
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
150: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(543);
|
|
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
|
-
|
|
307
|
+
543: (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
|
-
|
|
476
|
+
525: (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
|
-
|
|
495
|
+
628: (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
|
-
|
|
516
|
+
491: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
517
517
|
"use strict";
|
|
518
518
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(408);
|
|
519
519
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -539,7 +539,7 @@
|
|
|
539
539
|
}
|
|
540
540
|
module.exports = { getHtmlRspackPluginHooks };
|
|
541
541
|
},
|
|
542
|
-
|
|
542
|
+
690: (module) => {
|
|
543
543
|
const voidTags = [
|
|
544
544
|
"area",
|
|
545
545
|
"base",
|
|
@@ -607,19 +607,19 @@
|
|
|
607
607
|
htmlTagObjectToString,
|
|
608
608
|
};
|
|
609
609
|
},
|
|
610
|
-
|
|
610
|
+
867: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
611
611
|
"use strict";
|
|
612
612
|
const promisify = __nccwpck_require__(23).promisify;
|
|
613
613
|
const vm = __nccwpck_require__(154);
|
|
614
614
|
const fs = __nccwpck_require__(896);
|
|
615
615
|
const path = __nccwpck_require__(928);
|
|
616
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
616
|
+
const { CachedChildCompilation } = __nccwpck_require__(150);
|
|
617
617
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
618
|
-
__nccwpck_require__(
|
|
619
|
-
const prettyError = __nccwpck_require__(
|
|
620
|
-
const chunkSorter = __nccwpck_require__(
|
|
618
|
+
__nccwpck_require__(690);
|
|
619
|
+
const prettyError = __nccwpck_require__(628);
|
|
620
|
+
const chunkSorter = __nccwpck_require__(525);
|
|
621
621
|
const getHtmlRspackPluginHooks =
|
|
622
|
-
__nccwpck_require__(
|
|
622
|
+
__nccwpck_require__(491).getHtmlRspackPluginHooks;
|
|
623
623
|
class HtmlRspackPlugin {
|
|
624
624
|
constructor(userOptions = {}) {
|
|
625
625
|
this.version = HtmlRspackPlugin.version;
|
|
@@ -1586,6 +1586,6 @@
|
|
|
1586
1586
|
}
|
|
1587
1587
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1588
1588
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1589
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1589
|
+
var __webpack_exports__ = __nccwpck_require__(867);
|
|
1590
1590
|
module.exports = __webpack_exports__;
|
|
1591
1591
|
})();
|
|
@@ -1589,11 +1589,11 @@
|
|
|
1589
1589
|
module.exports = wrap({ http, https });
|
|
1590
1590
|
module.exports.wrap = wrap;
|
|
1591
1591
|
},
|
|
1592
|
-
|
|
1592
|
+
7826: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1593
1593
|
"use strict";
|
|
1594
1594
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1595
1595
|
exports.getHandlers = exports.init = void 0;
|
|
1596
|
-
const logger_1 = __nccwpck_require__(
|
|
1596
|
+
const logger_1 = __nccwpck_require__(5696);
|
|
1597
1597
|
const logger = (0, logger_1.getInstance)();
|
|
1598
1598
|
function init(proxy, option) {
|
|
1599
1599
|
const handlers = getHandlers(option);
|
|
@@ -1667,14 +1667,14 @@
|
|
|
1667
1667
|
logger.info("[HPM] Client disconnected");
|
|
1668
1668
|
}
|
|
1669
1669
|
},
|
|
1670
|
-
|
|
1670
|
+
5325: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1671
1671
|
"use strict";
|
|
1672
1672
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1673
1673
|
exports.createConfig = void 0;
|
|
1674
1674
|
const isPlainObj = __nccwpck_require__(6139);
|
|
1675
1675
|
const url = __nccwpck_require__(7016);
|
|
1676
|
-
const errors_1 = __nccwpck_require__(
|
|
1677
|
-
const logger_1 = __nccwpck_require__(
|
|
1676
|
+
const errors_1 = __nccwpck_require__(6431);
|
|
1677
|
+
const logger_1 = __nccwpck_require__(5696);
|
|
1678
1678
|
const logger = (0, logger_1.getInstance)();
|
|
1679
1679
|
function createConfig(context, opts) {
|
|
1680
1680
|
const config = { context: undefined, options: {} };
|
|
@@ -1720,14 +1720,14 @@
|
|
|
1720
1720
|
}
|
|
1721
1721
|
}
|
|
1722
1722
|
},
|
|
1723
|
-
|
|
1723
|
+
7138: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1724
1724
|
"use strict";
|
|
1725
1725
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1726
1726
|
exports.match = void 0;
|
|
1727
1727
|
const isGlob = __nccwpck_require__(4831);
|
|
1728
1728
|
const micromatch = __nccwpck_require__(6970);
|
|
1729
1729
|
const url = __nccwpck_require__(7016);
|
|
1730
|
-
const errors_1 = __nccwpck_require__(
|
|
1730
|
+
const errors_1 = __nccwpck_require__(6431);
|
|
1731
1731
|
function match(context, uri, req) {
|
|
1732
1732
|
if (isStringPath(context)) {
|
|
1733
1733
|
return matchSingleStringPath(context, uri);
|
|
@@ -1783,7 +1783,7 @@
|
|
|
1783
1783
|
return isGlob(context);
|
|
1784
1784
|
}
|
|
1785
1785
|
},
|
|
1786
|
-
|
|
1786
|
+
6431: (__unused_webpack_module, exports) => {
|
|
1787
1787
|
"use strict";
|
|
1788
1788
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1789
1789
|
exports.ERRORS = void 0;
|
|
@@ -1799,34 +1799,36 @@
|
|
|
1799
1799
|
"[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";
|
|
1800
1800
|
})((ERRORS = exports.ERRORS || (exports.ERRORS = {})));
|
|
1801
1801
|
},
|
|
1802
|
-
|
|
1802
|
+
3094: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1803
1803
|
"use strict";
|
|
1804
1804
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1805
1805
|
exports.fixRequestBody = void 0;
|
|
1806
1806
|
const querystring = __nccwpck_require__(3480);
|
|
1807
1807
|
function fixRequestBody(proxyReq, req) {
|
|
1808
|
+
if (req.readableLength !== 0) {
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1808
1811
|
const requestBody = req.body;
|
|
1809
1812
|
if (!requestBody) {
|
|
1810
1813
|
return;
|
|
1811
1814
|
}
|
|
1812
1815
|
const contentType = proxyReq.getHeader("Content-Type");
|
|
1816
|
+
if (!contentType) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1813
1819
|
const writeBody = (bodyData) => {
|
|
1814
1820
|
proxyReq.setHeader("Content-Length", Buffer.byteLength(bodyData));
|
|
1815
1821
|
proxyReq.write(bodyData);
|
|
1816
1822
|
};
|
|
1817
|
-
if (contentType
|
|
1823
|
+
if (contentType.includes("application/json")) {
|
|
1818
1824
|
writeBody(JSON.stringify(requestBody));
|
|
1819
|
-
}
|
|
1820
|
-
if (
|
|
1821
|
-
contentType &&
|
|
1822
|
-
contentType.includes("application/x-www-form-urlencoded")
|
|
1823
|
-
) {
|
|
1825
|
+
} else if (contentType.includes("application/x-www-form-urlencoded")) {
|
|
1824
1826
|
writeBody(querystring.stringify(requestBody));
|
|
1825
1827
|
}
|
|
1826
1828
|
}
|
|
1827
1829
|
exports.fixRequestBody = fixRequestBody;
|
|
1828
1830
|
},
|
|
1829
|
-
|
|
1831
|
+
6982: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
1830
1832
|
"use strict";
|
|
1831
1833
|
var __createBinding =
|
|
1832
1834
|
(this && this.__createBinding) ||
|
|
@@ -1855,20 +1857,20 @@
|
|
|
1855
1857
|
__createBinding(exports, m, p);
|
|
1856
1858
|
};
|
|
1857
1859
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1858
|
-
__exportStar(__nccwpck_require__(
|
|
1860
|
+
__exportStar(__nccwpck_require__(8493), exports);
|
|
1859
1861
|
},
|
|
1860
|
-
|
|
1862
|
+
8493: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1861
1863
|
"use strict";
|
|
1862
1864
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1863
1865
|
exports.fixRequestBody = exports.responseInterceptor = void 0;
|
|
1864
|
-
var response_interceptor_1 = __nccwpck_require__(
|
|
1866
|
+
var response_interceptor_1 = __nccwpck_require__(1485);
|
|
1865
1867
|
Object.defineProperty(exports, "responseInterceptor", {
|
|
1866
1868
|
enumerable: true,
|
|
1867
1869
|
get: function () {
|
|
1868
1870
|
return response_interceptor_1.responseInterceptor;
|
|
1869
1871
|
},
|
|
1870
1872
|
});
|
|
1871
|
-
var fix_request_body_1 = __nccwpck_require__(
|
|
1873
|
+
var fix_request_body_1 = __nccwpck_require__(3094);
|
|
1872
1874
|
Object.defineProperty(exports, "fixRequestBody", {
|
|
1873
1875
|
enumerable: true,
|
|
1874
1876
|
get: function () {
|
|
@@ -1876,7 +1878,7 @@
|
|
|
1876
1878
|
},
|
|
1877
1879
|
});
|
|
1878
1880
|
},
|
|
1879
|
-
|
|
1881
|
+
1485: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1880
1882
|
"use strict";
|
|
1881
1883
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1882
1884
|
exports.responseInterceptor = void 0;
|
|
@@ -1954,17 +1956,17 @@
|
|
|
1954
1956
|
}
|
|
1955
1957
|
}
|
|
1956
1958
|
},
|
|
1957
|
-
|
|
1959
|
+
9234: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1958
1960
|
"use strict";
|
|
1959
1961
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1960
1962
|
exports.HttpProxyMiddleware = void 0;
|
|
1961
1963
|
const httpProxy = __nccwpck_require__(3563);
|
|
1962
|
-
const config_factory_1 = __nccwpck_require__(
|
|
1963
|
-
const contextMatcher = __nccwpck_require__(
|
|
1964
|
-
const handlers = __nccwpck_require__(
|
|
1965
|
-
const logger_1 = __nccwpck_require__(
|
|
1966
|
-
const PathRewriter = __nccwpck_require__(
|
|
1967
|
-
const Router = __nccwpck_require__(
|
|
1964
|
+
const config_factory_1 = __nccwpck_require__(5325);
|
|
1965
|
+
const contextMatcher = __nccwpck_require__(7138);
|
|
1966
|
+
const handlers = __nccwpck_require__(7826);
|
|
1967
|
+
const logger_1 = __nccwpck_require__(5696);
|
|
1968
|
+
const PathRewriter = __nccwpck_require__(5878);
|
|
1969
|
+
const Router = __nccwpck_require__(3321);
|
|
1968
1970
|
class HttpProxyMiddleware {
|
|
1969
1971
|
constructor(context, opts) {
|
|
1970
1972
|
this.logger = (0, logger_1.getInstance)();
|
|
@@ -2116,7 +2118,7 @@
|
|
|
2116
2118
|
}
|
|
2117
2119
|
exports.HttpProxyMiddleware = HttpProxyMiddleware;
|
|
2118
2120
|
},
|
|
2119
|
-
|
|
2121
|
+
1546: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
2120
2122
|
"use strict";
|
|
2121
2123
|
var __createBinding =
|
|
2122
2124
|
(this && this.__createBinding) ||
|
|
@@ -2146,7 +2148,7 @@
|
|
|
2146
2148
|
};
|
|
2147
2149
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2148
2150
|
exports.createProxyMiddleware = void 0;
|
|
2149
|
-
const http_proxy_middleware_1 = __nccwpck_require__(
|
|
2151
|
+
const http_proxy_middleware_1 = __nccwpck_require__(9234);
|
|
2150
2152
|
function createProxyMiddleware(context, options) {
|
|
2151
2153
|
const { middleware } = new http_proxy_middleware_1.HttpProxyMiddleware(
|
|
2152
2154
|
context,
|
|
@@ -2155,9 +2157,9 @@
|
|
|
2155
2157
|
return middleware;
|
|
2156
2158
|
}
|
|
2157
2159
|
exports.createProxyMiddleware = createProxyMiddleware;
|
|
2158
|
-
__exportStar(__nccwpck_require__(
|
|
2160
|
+
__exportStar(__nccwpck_require__(6982), exports);
|
|
2159
2161
|
},
|
|
2160
|
-
|
|
2162
|
+
5696: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2161
2163
|
"use strict";
|
|
2162
2164
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2163
2165
|
exports.getArrow = exports.getInstance = void 0;
|
|
@@ -2270,13 +2272,13 @@
|
|
|
2270
2272
|
}
|
|
2271
2273
|
exports.getArrow = getArrow;
|
|
2272
2274
|
},
|
|
2273
|
-
|
|
2275
|
+
5878: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2274
2276
|
"use strict";
|
|
2275
2277
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2276
2278
|
exports.createPathRewriter = void 0;
|
|
2277
2279
|
const isPlainObj = __nccwpck_require__(6139);
|
|
2278
|
-
const errors_1 = __nccwpck_require__(
|
|
2279
|
-
const logger_1 = __nccwpck_require__(
|
|
2280
|
+
const errors_1 = __nccwpck_require__(6431);
|
|
2281
|
+
const logger_1 = __nccwpck_require__(5696);
|
|
2280
2282
|
const logger = (0, logger_1.getInstance)();
|
|
2281
2283
|
function createPathRewriter(rewriteConfig) {
|
|
2282
2284
|
let rulesCache;
|
|
@@ -2333,12 +2335,12 @@
|
|
|
2333
2335
|
return rules;
|
|
2334
2336
|
}
|
|
2335
2337
|
},
|
|
2336
|
-
|
|
2338
|
+
3321: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2337
2339
|
"use strict";
|
|
2338
2340
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2339
2341
|
exports.getTarget = void 0;
|
|
2340
2342
|
const isPlainObj = __nccwpck_require__(6139);
|
|
2341
|
-
const logger_1 = __nccwpck_require__(
|
|
2343
|
+
const logger_1 = __nccwpck_require__(5696);
|
|
2342
2344
|
const logger = (0, logger_1.getInstance)();
|
|
2343
2345
|
async function getTarget(req, config) {
|
|
2344
2346
|
let newTarget;
|
|
@@ -5273,6 +5275,6 @@
|
|
|
5273
5275
|
}
|
|
5274
5276
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
5275
5277
|
__nccwpck_require__.ab = __dirname + "/";
|
|
5276
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
5278
|
+
var __webpack_exports__ = __nccwpck_require__(1546);
|
|
5277
5279
|
module.exports = __webpack_exports__;
|
|
5278
5280
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"http-proxy-middleware","author":"Steven Chim","version":"2.0.
|
|
1
|
+
{"name":"http-proxy-middleware","author":"Steven Chim","version":"2.0.9","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
744: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(742)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
742: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = loader;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(991);
|
|
13
13
|
function _interopRequireDefault(obj) {
|
|
14
14
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
15
15
|
}
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
callback(null, result.css, map, { ast });
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
|
-
|
|
182
|
+
991: (module, exports, __nccwpck_require__) => {
|
|
183
183
|
module = __nccwpck_require__.nmd(module);
|
|
184
184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
185
|
exports.exec = exec;
|
|
@@ -716,6 +716,6 @@
|
|
|
716
716
|
})();
|
|
717
717
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
718
718
|
__nccwpck_require__.ab = __dirname + "/";
|
|
719
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
719
|
+
var __webpack_exports__ = __nccwpck_require__(744);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
492: (__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
|
-
|
|
123
|
+
597: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
124
124
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
125
125
|
exports.normalModuleLoaderHook =
|
|
126
126
|
exports.getCompilerHooks =
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
const fs_1 = __nccwpck_require__(896);
|
|
131
131
|
const path_1 = __nccwpck_require__(928);
|
|
132
132
|
const lite_tapable_1 = __nccwpck_require__(408);
|
|
133
|
-
const helpers_1 = __nccwpck_require__(
|
|
133
|
+
const helpers_1 = __nccwpck_require__(492);
|
|
134
134
|
const compilerHookMap = new WeakMap();
|
|
135
135
|
const getCompilerHooks = (compiler) => {
|
|
136
136
|
let hooks = compilerHookMap.get(compiler);
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
exports.getCompilerHooks =
|
|
313
313
|
void 0;
|
|
314
314
|
const path_1 = __nccwpck_require__(928);
|
|
315
|
-
const hooks_1 = __nccwpck_require__(
|
|
315
|
+
const hooks_1 = __nccwpck_require__(597);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
package/dist/index.cjs
CHANGED
|
@@ -1339,7 +1339,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1339
1339
|
}, verbose);
|
|
1340
1340
|
return {
|
|
1341
1341
|
message: function(errors) {
|
|
1342
|
-
let title = index_js_default().bold(index_js_default().red('Build error: '));
|
|
1342
|
+
let title = index_js_default().bold(index_js_default().red(errors.length > 1 ? 'Build errors: ' : 'Build error: '));
|
|
1343
1343
|
if (!errors.length) return `${title}\n${index_js_default().yellow("For more details, please setting 'stats.errors: true' ")}`;
|
|
1344
1344
|
let text = `${errors.join('\n\n')}\n`;
|
|
1345
1345
|
return `${title}\n${text}`;
|
|
@@ -1352,7 +1352,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1352
1352
|
warnings: getAllStatsWarnings(statsData)
|
|
1353
1353
|
}, verbose);
|
|
1354
1354
|
if (warnings.length) {
|
|
1355
|
-
let title = index_js_default().bold(index_js_default().yellow('
|
|
1355
|
+
let title = index_js_default().bold(index_js_default().yellow(warnings.length > 1 ? 'Build warnings: \n' : 'Build warning: \n'));
|
|
1356
1356
|
return {
|
|
1357
1357
|
message: `${title}${warnings.join('\n\n')}\n`,
|
|
1358
1358
|
level: 'warning'
|
|
@@ -2258,7 +2258,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2258
2258
|
async function createContext(options, userConfig) {
|
|
2259
2259
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_namespaceObject.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
|
|
2260
2260
|
return {
|
|
2261
|
-
version: "1.3.
|
|
2261
|
+
version: "1.3.13",
|
|
2262
2262
|
rootPath,
|
|
2263
2263
|
distPath: '',
|
|
2264
2264
|
cachePath,
|
|
@@ -3095,7 +3095,9 @@ for(var __webpack_i__ in (()=>{
|
|
|
3095
3095
|
}, assets = await getAssets();
|
|
3096
3096
|
if (0 === assets.length) return logs;
|
|
3097
3097
|
logs.push(''), assets.sort((a, b)=>a.size - b.size);
|
|
3098
|
-
let
|
|
3098
|
+
let totalSize = 0, totalGzipSize = 0;
|
|
3099
|
+
for (let asset of assets)totalSize += asset.size, options.compressed && (totalGzipSize += asset.gzippedSize ?? asset.size);
|
|
3100
|
+
let showTotalSize = !1 !== options.total && assets.length > 1, fileHeader = `File (${environmentName})`, totalSizeLabel = showTotalSize ? 'Total:' : '', totalSizeStr = showTotalSize ? calcFileSize(totalSize) : '', maxFileLength = Math.max(...assets.map((a)=>(a.folder + external_node_path_default().sep + a.name).length), fileHeader.length, totalSizeLabel.length), maxSizeLength = Math.max(...assets.map((a)=>a.sizeLabel.length), totalSizeStr.length);
|
|
3099
3101
|
if (!1 !== options.detail) {
|
|
3100
3102
|
let showGzipHeader = !!(options.compressed && assets.some((item)=>null !== item.gzippedSize));
|
|
3101
3103
|
logs.push(function(maxFileLength, maxSizeLength, fileHeader, showGzipHeader) {
|
|
@@ -3114,10 +3116,9 @@ for(var __webpack_i__ in (()=>{
|
|
|
3114
3116
|
return index_js_default().blue(headerRow);
|
|
3115
3117
|
}(maxFileLength, maxSizeLength, fileHeader, showGzipHeader));
|
|
3116
3118
|
}
|
|
3117
|
-
let totalSize = 0, totalGzipSize = 0;
|
|
3118
3119
|
for (let asset of assets){
|
|
3119
3120
|
let { sizeLabel } = asset, { name, folder, gzipSizeLabel } = asset, fileNameLength = (folder + external_node_path_default().sep + name).length, sizeLength = sizeLabel.length;
|
|
3120
|
-
if (
|
|
3121
|
+
if (!1 !== options.detail) {
|
|
3121
3122
|
sizeLength < maxSizeLength && (sizeLabel += ' '.repeat(maxSizeLength - sizeLength));
|
|
3122
3123
|
let fileNameLabel = index_js_default().dim(asset.folder + external_node_path_default().sep) + coloringAssetName(asset.name);
|
|
3123
3124
|
fileNameLength < maxFileLength && (fileNameLabel += ' '.repeat(maxFileLength - fileNameLength));
|
|
@@ -3126,8 +3127,13 @@ for(var __webpack_i__ in (()=>{
|
|
|
3126
3127
|
}
|
|
3127
3128
|
}
|
|
3128
3129
|
if (!1 !== options.total && assets.length > 1) {
|
|
3129
|
-
|
|
3130
|
-
|
|
3130
|
+
logs.push('');
|
|
3131
|
+
let log = ' ';
|
|
3132
|
+
if (log += ' '.repeat(maxFileLength - totalSizeLabel.length), log += index_js_default().magenta(totalSizeLabel), log += ` ${totalSizeStr}`, options.compressed) {
|
|
3133
|
+
let colorFn = getAssetColor(totalGzipSize / assets.length);
|
|
3134
|
+
log += ' '.repeat(maxSizeLength - totalSizeStr.length), log += ` ${colorFn(calcFileSize(totalGzipSize))}`;
|
|
3135
|
+
}
|
|
3136
|
+
logs.push(log);
|
|
3131
3137
|
}
|
|
3132
3138
|
return logs.push(''), logs;
|
|
3133
3139
|
}
|
|
@@ -3569,9 +3575,11 @@ for(var __webpack_i__ in (()=>{
|
|
|
3569
3575
|
function recursiveChunkEntryNames(chunk) {
|
|
3570
3576
|
let [...chunkGroups] = chunk.groupsIterable;
|
|
3571
3577
|
return [
|
|
3572
|
-
...new Set(chunkGroups.flatMap((chunkGroup)=>(function recursiveChunkGroup(chunkGroup) {
|
|
3578
|
+
...new Set(chunkGroups.flatMap((chunkGroup)=>(function recursiveChunkGroup(chunkGroup, visited = new Set()) {
|
|
3579
|
+
if (visited.has(chunkGroup)) return [];
|
|
3580
|
+
visited.add(chunkGroup);
|
|
3573
3581
|
let parents = chunkGroup.getParents();
|
|
3574
|
-
return parents.length ? parents.flatMap((chunkParent)=>recursiveChunkGroup(chunkParent)) : [
|
|
3582
|
+
return parents.length ? parents.flatMap((chunkParent)=>recursiveChunkGroup(chunkParent, visited)) : [
|
|
3575
3583
|
chunkGroup.name
|
|
3576
3584
|
];
|
|
3577
3585
|
})(chunkGroup)).filter((name)=>!!name))
|
|
@@ -5509,7 +5517,8 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5509
5517
|
display: none;
|
|
5510
5518
|
}
|
|
5511
5519
|
.file-link,
|
|
5512
|
-
.url-link
|
|
5520
|
+
.url-link,
|
|
5521
|
+
.config-link {
|
|
5513
5522
|
cursor: pointer;
|
|
5514
5523
|
text-decoration: underline;
|
|
5515
5524
|
text-underline-offset: 3px;
|
|
@@ -5526,6 +5535,10 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5526
5535
|
.url-link {
|
|
5527
5536
|
color: #eff986;
|
|
5528
5537
|
}
|
|
5538
|
+
.config-link {
|
|
5539
|
+
color: inherit;
|
|
5540
|
+
text-decoration: none;
|
|
5541
|
+
}
|
|
5529
5542
|
.close {
|
|
5530
5543
|
position: absolute;
|
|
5531
5544
|
top: 27px;
|
|
@@ -5579,7 +5592,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5579
5592
|
<pre class="content">${htmlItems.join('\n\n').trim()}</pre>
|
|
5580
5593
|
<footer class="footer">
|
|
5581
5594
|
<p><span>Fix error</span>, click outside, or press Esc to close the overlay.</p>
|
|
5582
|
-
<p>Disable overlay by setting Rsbuild's <span>dev.client.overlay</span> config to false.<p>
|
|
5595
|
+
<p>Disable overlay by setting Rsbuild's <span><a class="config-link" target="_blank" rel="noopener noreferrer" href="https://rsbuild.dev/config/dev/client">dev.client.overlay</a></span> config to false.<p>
|
|
5583
5596
|
</footer>
|
|
5584
5597
|
</div>
|
|
5585
5598
|
</div>
|
|
@@ -5868,6 +5881,12 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5868
5881
|
return ret;
|
|
5869
5882
|
}(proxyOptions), proxyMiddlewares = [], middlewares = [], { createProxyMiddleware: baseMiddleware } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../compiled/http-proxy-middleware/index.js"));
|
|
5870
5883
|
for (let opts of formattedOptions){
|
|
5884
|
+
let { onProxyRes } = opts;
|
|
5885
|
+
opts.onProxyRes = (proxyRes, _req, res)=>{
|
|
5886
|
+
onProxyRes && onProxyRes(proxyRes, _req, res), res.on('close', ()=>{
|
|
5887
|
+
res.writableEnded || proxyRes.destroy();
|
|
5888
|
+
});
|
|
5889
|
+
};
|
|
5871
5890
|
let proxyMiddleware = baseMiddleware(opts.context, opts), middleware = async (req, res, next)=>{
|
|
5872
5891
|
let bypassUrl = 'function' == typeof opts.bypass ? await opts.bypass(req, res, opts) : null;
|
|
5873
5892
|
!1 === bypassUrl ? (res.statusCode = 404, next()) : 'string' == typeof bypassUrl ? (req.url = bypassUrl, next()) : !0 === bypassUrl ? next() : proxyMiddleware(req, res, next);
|
|
@@ -5898,7 +5917,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5898
5917
|
};
|
|
5899
5918
|
}, applyDefaultMiddlewares = async ({ dev, middlewares, server, compilationManager, context, pwd, environments, postCallbacks })=>{
|
|
5900
5919
|
let upgradeEvents = [];
|
|
5901
|
-
if (server.
|
|
5920
|
+
if (server.cors) {
|
|
5902
5921
|
let { default: corsMiddleware } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../compiled/cors/index.js"));
|
|
5903
5922
|
middlewares.push(corsMiddleware('boolean' == typeof server.cors ? {} : server.cors));
|
|
5904
5923
|
}
|
|
@@ -5906,14 +5925,14 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5906
5925
|
if (headers && middlewares.push((_req, res, next)=>{
|
|
5907
5926
|
for (let [key, value] of Object.entries(headers))res.setHeader(key, value);
|
|
5908
5927
|
next();
|
|
5909
|
-
}),
|
|
5910
|
-
let { compiler } = compilationManager;
|
|
5911
|
-
'object' == typeof dev.lazyCompilation && 'string' == typeof dev.lazyCompilation.serverUrl && context.devServer && (dev.lazyCompilation.serverUrl = replacePortPlaceholder(dev.lazyCompilation.serverUrl, context.devServer.port)), middlewares.push(core_default().experiments.lazyCompilationMiddleware(helpers_isMultiCompiler(compiler) ? compiler.compilers[0] : compiler, dev.lazyCompilation));
|
|
5912
|
-
}
|
|
5913
|
-
if (server.proxy) {
|
|
5928
|
+
}), server.proxy) {
|
|
5914
5929
|
let { middlewares: proxyMiddlewares, upgrade } = await createProxyMiddleware(server.proxy);
|
|
5915
5930
|
for (let middleware of (upgradeEvents.push(upgrade), proxyMiddlewares))middlewares.push(middleware);
|
|
5916
5931
|
}
|
|
5932
|
+
if (server.compress && middlewares.push(gzipMiddleware()), 'dev' === context.action && 'rspack' === context.bundlerType && dev.lazyCompilation && compilationManager) {
|
|
5933
|
+
let { compiler } = compilationManager;
|
|
5934
|
+
'object' == typeof dev.lazyCompilation && 'string' == typeof dev.lazyCompilation.serverUrl && context.devServer && (dev.lazyCompilation.serverUrl = replacePortPlaceholder(dev.lazyCompilation.serverUrl, context.devServer.port)), middlewares.push(core_default().experiments.lazyCompilationMiddleware(helpers_isMultiCompiler(compiler) ? compiler.compilers[0] : compiler, dev.lazyCompilation));
|
|
5935
|
+
}
|
|
5917
5936
|
server.base && '/' !== server.base && middlewares.push(getBaseMiddleware({
|
|
5918
5937
|
base: server.base
|
|
5919
5938
|
}));
|
|
@@ -6519,8 +6538,8 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6519
6538
|
};
|
|
6520
6539
|
let { stats } = await new Promise((resolve, reject)=>{
|
|
6521
6540
|
compiler.run((err, stats)=>{
|
|
6522
|
-
|
|
6523
|
-
closeErr && rslog_index_js_namespaceObject.logger.error(closeErr), resolve({
|
|
6541
|
+
compiler.close((closeErr)=>{
|
|
6542
|
+
closeErr && rslog_index_js_namespaceObject.logger.error('Failed to close compiler: ', closeErr), err ? reject(err) : (null == stats ? void 0 : stats.hasErrors()) ? reject(Error(RSPACK_BUILD_ERROR)) : resolve({
|
|
6524
6543
|
stats
|
|
6525
6544
|
});
|
|
6526
6545
|
});
|
|
@@ -6596,9 +6615,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6596
6615
|
}
|
|
6597
6616
|
async applyDefaultMiddlewares() {
|
|
6598
6617
|
let { headers, proxy, historyApiFallback, compress, base, cors } = this.options.serverConfig;
|
|
6599
|
-
if ('verbose' === rslog_index_js_namespaceObject.logger.level && this.middlewares.use(await getRequestLoggerMiddleware()),
|
|
6600
|
-
level: 6
|
|
6601
|
-
})), cors) {
|
|
6618
|
+
if ('verbose' === rslog_index_js_namespaceObject.logger.level && this.middlewares.use(await getRequestLoggerMiddleware()), cors) {
|
|
6602
6619
|
let { default: corsMiddleware } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../compiled/cors/index.js"));
|
|
6603
6620
|
this.middlewares.use(corsMiddleware('boolean' == typeof cors ? {} : cors));
|
|
6604
6621
|
}
|
|
@@ -6610,7 +6627,9 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6610
6627
|
for (let middleware of middlewares)this.middlewares.use(middleware);
|
|
6611
6628
|
this.app.on('upgrade', upgrade);
|
|
6612
6629
|
}
|
|
6613
|
-
if (
|
|
6630
|
+
if (compress && this.middlewares.use(gzipMiddleware({
|
|
6631
|
+
level: 6
|
|
6632
|
+
})), base && '/' !== base && this.middlewares.use(getBaseMiddleware({
|
|
6614
6633
|
base
|
|
6615
6634
|
})), await this.applyStaticAssetMiddleware(), historyApiFallback) {
|
|
6616
6635
|
let { default: connectHistoryApiFallback } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../compiled/connect-history-api-fallback/index.js")), historyApiFallbackMiddleware = connectHistoryApiFallback(!0 === historyApiFallback ? {} : historyApiFallback);
|
|
@@ -7488,11 +7507,11 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
7488
7507
|
}
|
|
7489
7508
|
process.title = 'rsbuild-node';
|
|
7490
7509
|
let { npm_execpath } = process.env;
|
|
7491
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.3.
|
|
7510
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.3.13\n`);
|
|
7492
7511
|
try {
|
|
7493
7512
|
!function() {
|
|
7494
7513
|
let cli = cac_dist('rsbuild');
|
|
7495
|
-
cli.help(), cli.version("1.3.
|
|
7514
|
+
cli.help(), cli.version("1.3.13"), applyCommonOptions(cli);
|
|
7496
7515
|
let devCommand = cli.command('', 'starting the dev server').alias('dev'), buildCommand = cli.command('build', 'build the app for production'), previewCommand = cli.command('preview', 'preview the production build locally'), inspectCommand = cli.command('inspect', 'inspect the Rspack and Rsbuild configs');
|
|
7497
7516
|
applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
|
|
7498
7517
|
try {
|
|
@@ -7543,7 +7562,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
7543
7562
|
rslog_index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), rslog_index_js_namespaceObject.logger.error(err);
|
|
7544
7563
|
}
|
|
7545
7564
|
}
|
|
7546
|
-
let src_version = "1.3.
|
|
7565
|
+
let src_version = "1.3.13";
|
|
7547
7566
|
})(), exports.PLUGIN_CSS_NAME = __webpack_exports__.PLUGIN_CSS_NAME, exports.PLUGIN_SWC_NAME = __webpack_exports__.PLUGIN_SWC_NAME, exports.createRsbuild = __webpack_exports__.createRsbuild, exports.defineConfig = __webpack_exports__.defineConfig, exports.ensureAssetPrefix = __webpack_exports__.ensureAssetPrefix, exports.loadConfig = __webpack_exports__.loadConfig, exports.loadEnv = __webpack_exports__.loadEnv, exports.logger = __webpack_exports__.logger, exports.mergeRsbuildConfig = __webpack_exports__.mergeRsbuildConfig, exports.rspack = __webpack_exports__.rspack, exports.runCLI = __webpack_exports__.runCLI, exports.version = __webpack_exports__.version, __webpack_exports__)-1 === [
|
|
7548
7567
|
"PLUGIN_CSS_NAME",
|
|
7549
7568
|
"PLUGIN_SWC_NAME",
|
package/dist/index.js
CHANGED
|
@@ -1207,7 +1207,7 @@ function formatStats(statsData, hasErrors) {
|
|
|
1207
1207
|
}, verbose);
|
|
1208
1208
|
return {
|
|
1209
1209
|
message: function(errors) {
|
|
1210
|
-
let title = __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.bold(__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.red('Build error: '));
|
|
1210
|
+
let title = __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.bold(__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.red(errors.length > 1 ? 'Build errors: ' : 'Build error: '));
|
|
1211
1211
|
if (!errors.length) return `${title}\n${__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.yellow("For more details, please setting 'stats.errors: true' ")}`;
|
|
1212
1212
|
let text = `${errors.join('\n\n')}\n`;
|
|
1213
1213
|
return `${title}\n${text}`;
|
|
@@ -1220,7 +1220,7 @@ function formatStats(statsData, hasErrors) {
|
|
|
1220
1220
|
warnings: getAllStatsWarnings(statsData)
|
|
1221
1221
|
}, verbose);
|
|
1222
1222
|
if (warnings.length) {
|
|
1223
|
-
let title = __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.bold(__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.yellow('
|
|
1223
|
+
let title = __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.bold(__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.yellow(warnings.length > 1 ? 'Build warnings: \n' : 'Build warning: \n'));
|
|
1224
1224
|
return {
|
|
1225
1225
|
message: `${title}${warnings.join('\n\n')}\n`,
|
|
1226
1226
|
level: 'warning'
|
|
@@ -2117,7 +2117,7 @@ async function updateEnvironmentContext(context, configs) {
|
|
|
2117
2117
|
async function createContext(options, userConfig) {
|
|
2118
2118
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
|
|
2119
2119
|
return {
|
|
2120
|
-
version: "1.3.
|
|
2120
|
+
version: "1.3.13",
|
|
2121
2121
|
rootPath,
|
|
2122
2122
|
distPath: '',
|
|
2123
2123
|
cachePath,
|
|
@@ -2951,7 +2951,9 @@ async function printFileSizes(options, stats, rootPath, environmentName) {
|
|
|
2951
2951
|
}, assets = await getAssets();
|
|
2952
2952
|
if (0 === assets.length) return logs;
|
|
2953
2953
|
logs.push(''), assets.sort((a, b)=>a.size - b.size);
|
|
2954
|
-
let
|
|
2954
|
+
let totalSize = 0, totalGzipSize = 0;
|
|
2955
|
+
for (let asset of assets)totalSize += asset.size, options.compressed && (totalGzipSize += asset.gzippedSize ?? asset.size);
|
|
2956
|
+
let showTotalSize = !1 !== options.total && assets.length > 1, fileHeader = `File (${environmentName})`, totalSizeLabel = showTotalSize ? 'Total:' : '', totalSizeStr = showTotalSize ? calcFileSize(totalSize) : '', maxFileLength = Math.max(...assets.map((a)=>(a.folder + __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.sep + a.name).length), fileHeader.length, totalSizeLabel.length), maxSizeLength = Math.max(...assets.map((a)=>a.sizeLabel.length), totalSizeStr.length);
|
|
2955
2957
|
if (!1 !== options.detail) {
|
|
2956
2958
|
let showGzipHeader = !!(options.compressed && assets.some((item)=>null !== item.gzippedSize));
|
|
2957
2959
|
logs.push(function(maxFileLength, maxSizeLength, fileHeader, showGzipHeader) {
|
|
@@ -2970,10 +2972,9 @@ async function printFileSizes(options, stats, rootPath, environmentName) {
|
|
|
2970
2972
|
return __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.blue(headerRow);
|
|
2971
2973
|
}(maxFileLength, maxSizeLength, fileHeader, showGzipHeader));
|
|
2972
2974
|
}
|
|
2973
|
-
let totalSize = 0, totalGzipSize = 0;
|
|
2974
2975
|
for (let asset of assets){
|
|
2975
2976
|
let { sizeLabel } = asset, { name, folder, gzipSizeLabel } = asset, fileNameLength = (folder + __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.sep + name).length, sizeLength = sizeLabel.length;
|
|
2976
|
-
if (
|
|
2977
|
+
if (!1 !== options.detail) {
|
|
2977
2978
|
sizeLength < maxSizeLength && (sizeLabel += ' '.repeat(maxSizeLength - sizeLength));
|
|
2978
2979
|
let fileNameLabel = __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.dim(asset.folder + __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.sep) + coloringAssetName(asset.name);
|
|
2979
2980
|
fileNameLength < maxFileLength && (fileNameLabel += ' '.repeat(maxFileLength - fileNameLength));
|
|
@@ -2982,8 +2983,13 @@ async function printFileSizes(options, stats, rootPath, environmentName) {
|
|
|
2982
2983
|
}
|
|
2983
2984
|
}
|
|
2984
2985
|
if (!1 !== options.total && assets.length > 1) {
|
|
2985
|
-
|
|
2986
|
-
|
|
2986
|
+
logs.push('');
|
|
2987
|
+
let log = ' ';
|
|
2988
|
+
if (log += ' '.repeat(maxFileLength - totalSizeLabel.length), log += __WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js_ea7a20e9__.default.magenta(totalSizeLabel), log += ` ${totalSizeStr}`, options.compressed) {
|
|
2989
|
+
let colorFn = getAssetColor(totalGzipSize / assets.length);
|
|
2990
|
+
log += ' '.repeat(maxSizeLength - totalSizeStr.length), log += ` ${colorFn(calcFileSize(totalGzipSize))}`;
|
|
2991
|
+
}
|
|
2992
|
+
logs.push(log);
|
|
2987
2993
|
}
|
|
2988
2994
|
return logs.push(''), logs;
|
|
2989
2995
|
}
|
|
@@ -3424,9 +3430,11 @@ let getInlineTests = (config)=>{
|
|
|
3424
3430
|
function recursiveChunkEntryNames(chunk) {
|
|
3425
3431
|
let [...chunkGroups] = chunk.groupsIterable;
|
|
3426
3432
|
return [
|
|
3427
|
-
...new Set(chunkGroups.flatMap((chunkGroup)=>(function recursiveChunkGroup(chunkGroup) {
|
|
3433
|
+
...new Set(chunkGroups.flatMap((chunkGroup)=>(function recursiveChunkGroup(chunkGroup, visited = new Set()) {
|
|
3434
|
+
if (visited.has(chunkGroup)) return [];
|
|
3435
|
+
visited.add(chunkGroup);
|
|
3428
3436
|
let parents = chunkGroup.getParents();
|
|
3429
|
-
return parents.length ? parents.flatMap((chunkParent)=>recursiveChunkGroup(chunkParent)) : [
|
|
3437
|
+
return parents.length ? parents.flatMap((chunkParent)=>recursiveChunkGroup(chunkParent, visited)) : [
|
|
3430
3438
|
chunkGroup.name
|
|
3431
3439
|
];
|
|
3432
3440
|
})(chunkGroup)).filter((name)=>!!name))
|
|
@@ -5351,7 +5359,8 @@ class SocketServer {
|
|
|
5351
5359
|
display: none;
|
|
5352
5360
|
}
|
|
5353
5361
|
.file-link,
|
|
5354
|
-
.url-link
|
|
5362
|
+
.url-link,
|
|
5363
|
+
.config-link {
|
|
5355
5364
|
cursor: pointer;
|
|
5356
5365
|
text-decoration: underline;
|
|
5357
5366
|
text-underline-offset: 3px;
|
|
@@ -5368,6 +5377,10 @@ class SocketServer {
|
|
|
5368
5377
|
.url-link {
|
|
5369
5378
|
color: #eff986;
|
|
5370
5379
|
}
|
|
5380
|
+
.config-link {
|
|
5381
|
+
color: inherit;
|
|
5382
|
+
text-decoration: none;
|
|
5383
|
+
}
|
|
5371
5384
|
.close {
|
|
5372
5385
|
position: absolute;
|
|
5373
5386
|
top: 27px;
|
|
@@ -5421,7 +5434,7 @@ class SocketServer {
|
|
|
5421
5434
|
<pre class="content">${htmlItems.join('\n\n').trim()}</pre>
|
|
5422
5435
|
<footer class="footer">
|
|
5423
5436
|
<p><span>Fix error</span>, click outside, or press Esc to close the overlay.</p>
|
|
5424
|
-
<p>Disable overlay by setting Rsbuild's <span>dev.client.overlay</span> config to false.<p>
|
|
5437
|
+
<p>Disable overlay by setting Rsbuild's <span><a class="config-link" target="_blank" rel="noopener noreferrer" href="https://rsbuild.dev/config/dev/client">dev.client.overlay</a></span> config to false.<p>
|
|
5425
5438
|
</footer>
|
|
5426
5439
|
</div>
|
|
5427
5440
|
</div>
|
|
@@ -5710,6 +5723,12 @@ let ENCODING_REGEX = /\bgzip\b/, CONTENT_TYPE_REGEX = /text|javascript|\/json|xm
|
|
|
5710
5723
|
return ret;
|
|
5711
5724
|
}(proxyOptions), proxyMiddlewares = [], middlewares = [], { createProxyMiddleware: baseMiddleware } = await import("../compiled/http-proxy-middleware/index.js");
|
|
5712
5725
|
for (let opts of formattedOptions){
|
|
5726
|
+
let { onProxyRes } = opts;
|
|
5727
|
+
opts.onProxyRes = (proxyRes, _req, res)=>{
|
|
5728
|
+
onProxyRes && onProxyRes(proxyRes, _req, res), res.on('close', ()=>{
|
|
5729
|
+
res.writableEnded || proxyRes.destroy();
|
|
5730
|
+
});
|
|
5731
|
+
};
|
|
5713
5732
|
let proxyMiddleware = baseMiddleware(opts.context, opts), middleware = async (req, res, next)=>{
|
|
5714
5733
|
let bypassUrl = 'function' == typeof opts.bypass ? await opts.bypass(req, res, opts) : null;
|
|
5715
5734
|
!1 === bypassUrl ? (res.statusCode = 404, next()) : 'string' == typeof bypassUrl ? (req.url = bypassUrl, next()) : !0 === bypassUrl ? next() : proxyMiddleware(req, res, next);
|
|
@@ -5740,7 +5759,7 @@ let ENCODING_REGEX = /\bgzip\b/, CONTENT_TYPE_REGEX = /text|javascript|\/json|xm
|
|
|
5740
5759
|
};
|
|
5741
5760
|
}, applyDefaultMiddlewares = async ({ dev, middlewares, server, compilationManager, context, pwd, environments, postCallbacks })=>{
|
|
5742
5761
|
let upgradeEvents = [];
|
|
5743
|
-
if (server.
|
|
5762
|
+
if (server.cors) {
|
|
5744
5763
|
let { default: corsMiddleware } = await import("../compiled/cors/index.js");
|
|
5745
5764
|
middlewares.push(corsMiddleware('boolean' == typeof server.cors ? {} : server.cors));
|
|
5746
5765
|
}
|
|
@@ -5748,14 +5767,14 @@ let ENCODING_REGEX = /\bgzip\b/, CONTENT_TYPE_REGEX = /text|javascript|\/json|xm
|
|
|
5748
5767
|
if (headers && middlewares.push((_req, res, next)=>{
|
|
5749
5768
|
for (let [key, value] of Object.entries(headers))res.setHeader(key, value);
|
|
5750
5769
|
next();
|
|
5751
|
-
}),
|
|
5752
|
-
let { compiler } = compilationManager;
|
|
5753
|
-
'object' == typeof dev.lazyCompilation && 'string' == typeof dev.lazyCompilation.serverUrl && context.devServer && (dev.lazyCompilation.serverUrl = replacePortPlaceholder(dev.lazyCompilation.serverUrl, context.devServer.port)), middlewares.push(__WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.default.experiments.lazyCompilationMiddleware(helpers_isMultiCompiler(compiler) ? compiler.compilers[0] : compiler, dev.lazyCompilation));
|
|
5754
|
-
}
|
|
5755
|
-
if (server.proxy) {
|
|
5770
|
+
}), server.proxy) {
|
|
5756
5771
|
let { middlewares: proxyMiddlewares, upgrade } = await createProxyMiddleware(server.proxy);
|
|
5757
5772
|
for (let middleware of (upgradeEvents.push(upgrade), proxyMiddlewares))middlewares.push(middleware);
|
|
5758
5773
|
}
|
|
5774
|
+
if (server.compress && middlewares.push(gzipMiddleware()), 'dev' === context.action && 'rspack' === context.bundlerType && dev.lazyCompilation && compilationManager) {
|
|
5775
|
+
let { compiler } = compilationManager;
|
|
5776
|
+
'object' == typeof dev.lazyCompilation && 'string' == typeof dev.lazyCompilation.serverUrl && context.devServer && (dev.lazyCompilation.serverUrl = replacePortPlaceholder(dev.lazyCompilation.serverUrl, context.devServer.port)), middlewares.push(__WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.default.experiments.lazyCompilationMiddleware(helpers_isMultiCompiler(compiler) ? compiler.compilers[0] : compiler, dev.lazyCompilation));
|
|
5777
|
+
}
|
|
5759
5778
|
server.base && '/' !== server.base && middlewares.push(getBaseMiddleware({
|
|
5760
5779
|
base: server.base
|
|
5761
5780
|
}));
|
|
@@ -6356,8 +6375,8 @@ let RSPACK_BUILD_ERROR = 'Rspack build failed.', build_build = async (initOption
|
|
|
6356
6375
|
};
|
|
6357
6376
|
let { stats } = await new Promise((resolve, reject)=>{
|
|
6358
6377
|
compiler.run((err, stats)=>{
|
|
6359
|
-
|
|
6360
|
-
closeErr && __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error(closeErr), resolve({
|
|
6378
|
+
compiler.close((closeErr)=>{
|
|
6379
|
+
closeErr && __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error('Failed to close compiler: ', closeErr), err ? reject(err) : (null == stats ? void 0 : stats.hasErrors()) ? reject(Error(RSPACK_BUILD_ERROR)) : resolve({
|
|
6361
6380
|
stats
|
|
6362
6381
|
});
|
|
6363
6382
|
});
|
|
@@ -6433,9 +6452,7 @@ class RsbuildProdServer {
|
|
|
6433
6452
|
}
|
|
6434
6453
|
async applyDefaultMiddlewares() {
|
|
6435
6454
|
let { headers, proxy, historyApiFallback, compress, base, cors } = this.options.serverConfig;
|
|
6436
|
-
if ('verbose' === __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.level && this.middlewares.use(await getRequestLoggerMiddleware()),
|
|
6437
|
-
level: 6
|
|
6438
|
-
})), cors) {
|
|
6455
|
+
if ('verbose' === __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.level && this.middlewares.use(await getRequestLoggerMiddleware()), cors) {
|
|
6439
6456
|
let { default: corsMiddleware } = await import("../compiled/cors/index.js");
|
|
6440
6457
|
this.middlewares.use(corsMiddleware('boolean' == typeof cors ? {} : cors));
|
|
6441
6458
|
}
|
|
@@ -6447,7 +6464,9 @@ class RsbuildProdServer {
|
|
|
6447
6464
|
for (let middleware of middlewares)this.middlewares.use(middleware);
|
|
6448
6465
|
this.app.on('upgrade', upgrade);
|
|
6449
6466
|
}
|
|
6450
|
-
if (
|
|
6467
|
+
if (compress && this.middlewares.use(gzipMiddleware({
|
|
6468
|
+
level: 6
|
|
6469
|
+
})), base && '/' !== base && this.middlewares.use(getBaseMiddleware({
|
|
6451
6470
|
base
|
|
6452
6471
|
})), await this.applyStaticAssetMiddleware(), historyApiFallback) {
|
|
6453
6472
|
let { default: connectHistoryApiFallback } = await import("../compiled/connect-history-api-fallback/index.js"), historyApiFallbackMiddleware = connectHistoryApiFallback(!0 === historyApiFallback ? {} : historyApiFallback);
|
|
@@ -7323,11 +7342,11 @@ async function runCLI() {
|
|
|
7323
7342
|
}
|
|
7324
7343
|
process.title = 'rsbuild-node';
|
|
7325
7344
|
let { npm_execpath } = process.env;
|
|
7326
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.3.
|
|
7345
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.3.13\n`);
|
|
7327
7346
|
try {
|
|
7328
7347
|
!function() {
|
|
7329
7348
|
let cli = cac_dist('rsbuild');
|
|
7330
|
-
cli.help(), cli.version("1.3.
|
|
7349
|
+
cli.help(), cli.version("1.3.13"), applyCommonOptions(cli);
|
|
7331
7350
|
let devCommand = cli.command('', 'starting the dev server').alias('dev'), buildCommand = cli.command('build', 'build the app for production'), previewCommand = cli.command('preview', 'preview the production build locally'), inspectCommand = cli.command('inspect', 'inspect the Rspack and Rsbuild configs');
|
|
7332
7351
|
applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
|
|
7333
7352
|
try {
|
|
@@ -7378,6 +7397,6 @@ async function runCLI() {
|
|
|
7378
7397
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error('Failed to start Rsbuild CLI.'), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error(err);
|
|
7379
7398
|
}
|
|
7380
7399
|
}
|
|
7381
|
-
let src_version = "1.3.
|
|
7400
|
+
let src_version = "1.3.13";
|
|
7382
7401
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack;
|
|
7383
7402
|
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defineConfig, ensureAssetPrefix, config_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, runCLI, src_version as version, __webpack_exports__logger as logger, __webpack_exports__rspack as rspack };
|
|
@@ -511,9 +511,9 @@ export interface PerformanceConfig {
|
|
|
511
511
|
*
|
|
512
512
|
* `performance.preload` can be set to an object to specify the options.
|
|
513
513
|
*
|
|
514
|
-
* When `performance.preload` is set to `true`, Rsbuild will use the following default
|
|
515
|
-
* to preload resources. This means preloading all async resources on the current
|
|
516
|
-
* async JS and its associated CSS, image, font, and other resources.
|
|
514
|
+
* When `performance.preload` is set to `true`, Rsbuild will use the following default
|
|
515
|
+
* options to preload resources. This means preloading all async resources on the current
|
|
516
|
+
* page, including async JS and its associated CSS, image, font, and other resources.
|
|
517
517
|
*
|
|
518
518
|
* ```js
|
|
519
519
|
* const defaultOptions = {
|
|
@@ -527,9 +527,9 @@ export interface PerformanceConfig {
|
|
|
527
527
|
*
|
|
528
528
|
* `performance.prefetch` can be set to an object to specify the options.
|
|
529
529
|
*
|
|
530
|
-
* When `performance.prefetch` is set to `true`, Rsbuild will use the following default
|
|
531
|
-
* to prefetch resources. This means prefetching all async resources on the current
|
|
532
|
-
* async JS and its associated CSS, image, font, and other resources.
|
|
530
|
+
* When `performance.prefetch` is set to `true`, Rsbuild will use the following default
|
|
531
|
+
* options to prefetch resources. This means prefetching all async resources on the current
|
|
532
|
+
* page, including async JS and its associated CSS, image, font, and other resources.
|
|
533
533
|
*
|
|
534
534
|
* ```js
|
|
535
535
|
* const defaultOptions = {
|
|
@@ -849,8 +849,8 @@ export interface OutputConfig {
|
|
|
849
849
|
*/
|
|
850
850
|
target?: RsbuildTarget;
|
|
851
851
|
/**
|
|
852
|
-
* At build time, prevent some `import` dependencies from being packed into bundles in
|
|
853
|
-
* and instead fetch them externally at runtime.
|
|
852
|
+
* At build time, prevent some `import` dependencies from being packed into bundles in
|
|
853
|
+
* your code, and instead fetch them externally at runtime.
|
|
854
854
|
* For more information, please see: [Rspack Externals](https://rspack.dev/config/externals)
|
|
855
855
|
* @default undefined
|
|
856
856
|
*/
|
|
@@ -974,8 +974,8 @@ export interface OutputConfig {
|
|
|
974
974
|
emitAssets?: boolean;
|
|
975
975
|
/**
|
|
976
976
|
* Whether to emit CSS to the output bundles.
|
|
977
|
-
* If `false`, the CSS will not be extracted to separate files or injected into the
|
|
978
|
-
* bundles via `output.injectStyles`.
|
|
977
|
+
* If `false`, the CSS will not be extracted to separate files or injected into the
|
|
978
|
+
* JavaScript bundles via `output.injectStyles`.
|
|
979
979
|
* @default `true` when `output.target` is `web`, otherwise `false`
|
|
980
980
|
*/
|
|
981
981
|
emitCss?: boolean;
|
|
@@ -1268,7 +1268,8 @@ export interface DevConfig {
|
|
|
1268
1268
|
liveReload?: boolean;
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Set the URL prefix of static assets in development mode,
|
|
1271
|
-
* similar to the [output.publicPath](https://rspack.dev/config/output#outputpublicpath)
|
|
1271
|
+
* similar to the [output.publicPath](https://rspack.dev/config/output#outputpublicpath)
|
|
1272
|
+
* config of Rspack.
|
|
1272
1273
|
*/
|
|
1273
1274
|
assetPrefix?: string | boolean;
|
|
1274
1275
|
/**
|
|
@@ -1305,7 +1306,8 @@ export interface DevConfig {
|
|
|
1305
1306
|
*/
|
|
1306
1307
|
writeToDisk?: boolean | ((filename: string) => boolean);
|
|
1307
1308
|
/**
|
|
1308
|
-
* This option allows you to configure a list of globs/directories/files to watch for
|
|
1309
|
+
* This option allows you to configure a list of globs/directories/files to watch for
|
|
1310
|
+
* file changes.
|
|
1309
1311
|
*/
|
|
1310
1312
|
watchFiles?: WatchFiles | WatchFiles[];
|
|
1311
1313
|
/**
|
|
@@ -1324,13 +1326,18 @@ export interface ResolveConfig {
|
|
|
1324
1326
|
*/
|
|
1325
1327
|
dedupe?: string[];
|
|
1326
1328
|
/**
|
|
1327
|
-
* Set the alias for the module path, which is used to simplify the import path or
|
|
1329
|
+
* Set the alias for the module path, which is used to simplify the import path or
|
|
1330
|
+
* redirect the module reference.
|
|
1328
1331
|
* Similar to the [resolve.alias](https://rspack.dev/config/resolve) config of Rspack.
|
|
1329
1332
|
*/
|
|
1330
1333
|
alias?: ConfigChain<Alias>;
|
|
1331
1334
|
/**
|
|
1332
|
-
*
|
|
1333
|
-
* and the `resolve.alias` option of Rsbuild.
|
|
1335
|
+
* Set the strategy for path alias resolution, to control the priority relationship
|
|
1336
|
+
* between the `paths` option in `tsconfig.json` and the `resolve.alias` option of Rsbuild.
|
|
1337
|
+
* - `prefer-tsconfig`: The `paths` option in `tsconfig.json` will take precedence over the
|
|
1338
|
+
* `resolve.alias` option of Rsbuild.
|
|
1339
|
+
* - `prefer-alias`: The `resolve.alias` option of Rsbuild will take precedence over the
|
|
1340
|
+
* `paths` option in `tsconfig.json`.
|
|
1334
1341
|
* @default 'prefer-tsconfig'
|
|
1335
1342
|
*/
|
|
1336
1343
|
aliasStrategy?: AliasStrategy;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "1.3.
|
|
49
|
+
"@rspack/core": "1.3.7",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.17",
|
|
52
52
|
"core-js": "~3.41.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@rslib/core": "0.6.6",
|
|
57
57
|
"@types/connect": "3.4.38",
|
|
58
58
|
"@types/cors": "^2.8.17",
|
|
59
|
-
"@types/node": "^22.
|
|
59
|
+
"@types/node": "^22.15.2",
|
|
60
60
|
"@types/on-finished": "2.3.4",
|
|
61
61
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
62
62
|
"@types/ws": "^8.18.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"dotenv": "16.5.0",
|
|
72
72
|
"dotenv-expand": "12.0.2",
|
|
73
73
|
"html-rspack-plugin": "6.0.5",
|
|
74
|
-
"http-proxy-middleware": "^2.0.
|
|
74
|
+
"http-proxy-middleware": "^2.0.9",
|
|
75
75
|
"launch-editor-middleware": "^2.10.0",
|
|
76
76
|
"mrmime": "^2.0.1",
|
|
77
77
|
"on-finished": "2.4.1",
|