@rsbuild/core 1.0.1-beta.0 → 1.0.1-beta.2
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/browserslist/index.js +16 -12
- package/compiled/browserslist/package.json +1 -1
- package/compiled/css-loader/index.js +20 -20
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/html-rspack-plugin/loader.js +0 -11
- package/compiled/html-rspack-plugin/package.json +1 -1
- package/compiled/postcss-loader/index.js +12 -12
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/compiled/ws/index.d.ts +13 -22
- package/dist/client/hmr.js +1 -1
- package/dist/index.cjs +19 -8
- package/dist/index.js +21 -10
- package/dist-types/types/config/dev.d.ts +4 -2
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
932: (module) => {
|
|
4
4
|
function BrowserslistError(message) {
|
|
5
5
|
this.name = "BrowserslistError";
|
|
6
6
|
this.message = message;
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
BrowserslistError.prototype = Error.prototype;
|
|
13
13
|
module.exports = BrowserslistError;
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
80: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
16
16
|
var jsReleases = __nccwpck_require__(750);
|
|
17
17
|
var agents = __nccwpck_require__(768).agents;
|
|
18
18
|
var jsEOL = __nccwpck_require__(629);
|
|
19
19
|
var path = __nccwpck_require__(17);
|
|
20
|
-
var e2c = __nccwpck_require__(
|
|
21
|
-
var BrowserslistError = __nccwpck_require__(
|
|
22
|
-
var parse = __nccwpck_require__(
|
|
23
|
-
var env = __nccwpck_require__(
|
|
20
|
+
var e2c = __nccwpck_require__(310);
|
|
21
|
+
var BrowserslistError = __nccwpck_require__(932);
|
|
22
|
+
var parse = __nccwpck_require__(911);
|
|
23
|
+
var env = __nccwpck_require__(850);
|
|
24
24
|
var YEAR = 365.259641 * 24 * 60 * 60 * 1e3;
|
|
25
25
|
var ANDROID_EVERGREEN_FIRST = "37";
|
|
26
26
|
var OP_MOB_BLINK_FIRST = 14;
|
|
@@ -990,7 +990,7 @@
|
|
|
990
990
|
matches: [],
|
|
991
991
|
regexp: /^(firefox|ff|fx)\s+esr$/i,
|
|
992
992
|
select: function () {
|
|
993
|
-
return ["firefox 115"];
|
|
993
|
+
return ["firefox 115", "firefox 128"];
|
|
994
994
|
},
|
|
995
995
|
},
|
|
996
996
|
opera_mini_all: {
|
|
@@ -1178,12 +1178,12 @@
|
|
|
1178
1178
|
})();
|
|
1179
1179
|
module.exports = browserslist;
|
|
1180
1180
|
},
|
|
1181
|
-
|
|
1181
|
+
850: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1182
1182
|
var feature = __nccwpck_require__(711)["default"];
|
|
1183
1183
|
var region = __nccwpck_require__(225)["default"];
|
|
1184
1184
|
var path = __nccwpck_require__(17);
|
|
1185
1185
|
var fs = __nccwpck_require__(147);
|
|
1186
|
-
var BrowserslistError = __nccwpck_require__(
|
|
1186
|
+
var BrowserslistError = __nccwpck_require__(932);
|
|
1187
1187
|
var IS_SECTION = /^\s*\[(.+)]\s*$/;
|
|
1188
1188
|
var CONFIG_PATTERN = /^browserslist-config-/;
|
|
1189
1189
|
var SCOPED_CONFIG__PATTERN =
|
|
@@ -1575,7 +1575,7 @@
|
|
|
1575
1575
|
env: process.env,
|
|
1576
1576
|
};
|
|
1577
1577
|
},
|
|
1578
|
-
|
|
1578
|
+
911: (module) => {
|
|
1579
1579
|
var AND_REGEXP = /^\s+and\s+(.*)/i;
|
|
1580
1580
|
var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i;
|
|
1581
1581
|
function flatten(array) {
|
|
@@ -1648,7 +1648,7 @@
|
|
|
1648
1648
|
);
|
|
1649
1649
|
};
|
|
1650
1650
|
},
|
|
1651
|
-
|
|
1651
|
+
310: (module) => {
|
|
1652
1652
|
module.exports = {
|
|
1653
1653
|
"0.20": "39",
|
|
1654
1654
|
0.21: "41",
|
|
@@ -1804,7 +1804,11 @@
|
|
|
1804
1804
|
29.4: "122",
|
|
1805
1805
|
"30.0": "124",
|
|
1806
1806
|
30.1: "124",
|
|
1807
|
+
30.2: "124",
|
|
1807
1808
|
"31.0": "126",
|
|
1809
|
+
31.1: "126",
|
|
1810
|
+
31.2: "126",
|
|
1811
|
+
"32.0": "128",
|
|
1808
1812
|
};
|
|
1809
1813
|
},
|
|
1810
1814
|
768: (module) => {
|
|
@@ -1862,6 +1866,6 @@
|
|
|
1862
1866
|
}
|
|
1863
1867
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1864
1868
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1865
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1869
|
+
var __webpack_exports__ = __nccwpck_require__(80);
|
|
1866
1870
|
module.exports = __webpack_exports__;
|
|
1867
1871
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"browserslist","author":"Andrey Sitnik <andrey@sitnik.ru>","version":"4.23.
|
|
1
|
+
{"name":"browserslist","author":"Andrey Sitnik <andrey@sitnik.ru>","version":"4.23.2","funding":[{"type":"opencollective","url":"https://opencollective.com/browserslist"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/browserslist"},{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
4835: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(613);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(8333).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
613: (__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__(977));
|
|
15
15
|
var _package = _interopRequireDefault(__nccwpck_require__(7972));
|
|
16
16
|
var _semver = __nccwpck_require__(938);
|
|
17
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
18
|
-
var _plugins = __nccwpck_require__(
|
|
19
|
-
var _utils = __nccwpck_require__(
|
|
17
|
+
var _options = _interopRequireDefault(__nccwpck_require__(5243));
|
|
18
|
+
var _plugins = __nccwpck_require__(5984);
|
|
19
|
+
var _utils = __nccwpck_require__(8333);
|
|
20
20
|
function _interopRequireDefault(obj) {
|
|
21
21
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
22
22
|
}
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
callback(null, `${importCode}${moduleCode}${exportCode}`);
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
|
-
|
|
246
|
+
5984: (__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__(
|
|
268
|
+
__nccwpck_require__(3818),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(8822),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(8064));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
8822: (__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__(2304);
|
|
283
|
-
var _utils = __nccwpck_require__(
|
|
283
|
+
var _utils = __nccwpck_require__(8333);
|
|
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
|
-
|
|
382
|
+
3818: (__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__(1036),
|
|
388
388
|
);
|
|
389
|
-
var _utils = __nccwpck_require__(
|
|
389
|
+
var _utils = __nccwpck_require__(8333);
|
|
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
|
-
|
|
694
|
+
8064: (__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__(1036),
|
|
700
700
|
);
|
|
701
|
-
var _utils = __nccwpck_require__(
|
|
701
|
+
var _utils = __nccwpck_require__(8333);
|
|
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
|
-
|
|
1044
|
+
8333: (__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;
|
|
@@ -7501,7 +7501,7 @@
|
|
|
7501
7501
|
"use strict";
|
|
7502
7502
|
module.exports = require("util");
|
|
7503
7503
|
},
|
|
7504
|
-
|
|
7504
|
+
5243: (module) => {
|
|
7505
7505
|
"use strict";
|
|
7506
7506
|
module.exports = JSON.parse(
|
|
7507
7507
|
'{"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"}',
|
|
@@ -7536,6 +7536,6 @@
|
|
|
7536
7536
|
}
|
|
7537
7537
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
7538
7538
|
__nccwpck_require__.ab = __dirname + "/";
|
|
7539
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
7539
|
+
var __webpack_exports__ = __nccwpck_require__(4835);
|
|
7540
7540
|
module.exports = __webpack_exports__;
|
|
7541
7541
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
70: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(560);
|
|
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
|
+
560: (module) => {
|
|
308
308
|
"use strict";
|
|
309
309
|
class HtmlWebpackChildCompiler {
|
|
310
310
|
constructor(templates) {
|
|
@@ -465,7 +465,7 @@
|
|
|
465
465
|
}
|
|
466
466
|
module.exports = { HtmlWebpackChildCompiler };
|
|
467
467
|
},
|
|
468
|
-
|
|
468
|
+
570: (module) => {
|
|
469
469
|
"use strict";
|
|
470
470
|
module.exports = {};
|
|
471
471
|
module.exports.none = (chunks) => chunks;
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
};
|
|
485
485
|
module.exports.auto = module.exports.none;
|
|
486
486
|
},
|
|
487
|
-
|
|
487
|
+
35: (module) => {
|
|
488
488
|
"use strict";
|
|
489
489
|
module.exports = function (err) {
|
|
490
490
|
return {
|
|
@@ -505,7 +505,7 @@
|
|
|
505
505
|
};
|
|
506
506
|
};
|
|
507
507
|
},
|
|
508
|
-
|
|
508
|
+
191: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
509
509
|
"use strict";
|
|
510
510
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(348);
|
|
511
511
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
}
|
|
532
532
|
module.exports = { getHtmlRspackPluginHooks };
|
|
533
533
|
},
|
|
534
|
-
|
|
534
|
+
884: (module) => {
|
|
535
535
|
const voidTags = [
|
|
536
536
|
"area",
|
|
537
537
|
"base",
|
|
@@ -599,19 +599,19 @@
|
|
|
599
599
|
htmlTagObjectToString,
|
|
600
600
|
};
|
|
601
601
|
},
|
|
602
|
-
|
|
602
|
+
585: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
603
603
|
"use strict";
|
|
604
604
|
const promisify = __nccwpck_require__(837).promisify;
|
|
605
605
|
const vm = __nccwpck_require__(144);
|
|
606
606
|
const fs = __nccwpck_require__(147);
|
|
607
607
|
const path = __nccwpck_require__(17);
|
|
608
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
608
|
+
const { CachedChildCompilation } = __nccwpck_require__(70);
|
|
609
609
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
610
|
-
__nccwpck_require__(
|
|
611
|
-
const prettyError = __nccwpck_require__(
|
|
612
|
-
const chunkSorter = __nccwpck_require__(
|
|
610
|
+
__nccwpck_require__(884);
|
|
611
|
+
const prettyError = __nccwpck_require__(35);
|
|
612
|
+
const chunkSorter = __nccwpck_require__(570);
|
|
613
613
|
const getHtmlRspackPluginHooks =
|
|
614
|
-
__nccwpck_require__(
|
|
614
|
+
__nccwpck_require__(191).getHtmlRspackPluginHooks;
|
|
615
615
|
class HtmlRspackPlugin {
|
|
616
616
|
constructor(userOptions = {}) {
|
|
617
617
|
this.version = HtmlRspackPlugin.version;
|
|
@@ -1569,6 +1569,6 @@
|
|
|
1569
1569
|
}
|
|
1570
1570
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1571
1571
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1572
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1572
|
+
var __webpack_exports__ = __nccwpck_require__(585);
|
|
1573
1573
|
module.exports = __webpack_exports__;
|
|
1574
1574
|
})();
|
|
@@ -17,12 +17,6 @@ const reEmptyStringLeading = /\b__p \+= '';/g,
|
|
|
17
17
|
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
|
18
18
|
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Used to match
|
|
22
|
-
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
|
|
23
|
-
*/
|
|
24
|
-
const reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
|
25
|
-
|
|
26
20
|
/** Used to match unescaped characters in compiled string literals. */
|
|
27
21
|
const reUnescapedString = /['\n\r\u2028\u2029\\]/g;
|
|
28
22
|
|
|
@@ -50,8 +44,6 @@ function template(string) {
|
|
|
50
44
|
'|' +
|
|
51
45
|
reInterpolate.source +
|
|
52
46
|
'|' +
|
|
53
|
-
reEsTemplate.source +
|
|
54
|
-
'|' +
|
|
55
47
|
reEvaluate.source +
|
|
56
48
|
'|$',
|
|
57
49
|
'g',
|
|
@@ -63,12 +55,9 @@ function template(string) {
|
|
|
63
55
|
match,
|
|
64
56
|
escapeValue,
|
|
65
57
|
interpolateValue,
|
|
66
|
-
esTemplateValue,
|
|
67
58
|
evaluateValue,
|
|
68
59
|
offset,
|
|
69
60
|
) {
|
|
70
|
-
interpolateValue || (interpolateValue = esTemplateValue);
|
|
71
|
-
|
|
72
61
|
// Escape characters that can't be included in string literals.
|
|
73
62
|
source += string
|
|
74
63
|
.slice(index, offset)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.0.0-beta.
|
|
1
|
+
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.0.0-beta.9","funding":{"type":"opencollective","url":"https://opencollective.com/html-webpack-plugin"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -6670,7 +6670,7 @@
|
|
|
6670
6670
|
const errorEx = __nccwpck_require__(7861);
|
|
6671
6671
|
const fallback = __nccwpck_require__(3984);
|
|
6672
6672
|
const { default: LinesAndColumns } = __nccwpck_require__(7151);
|
|
6673
|
-
const { codeFrameColumns } = __nccwpck_require__(
|
|
6673
|
+
const { codeFrameColumns } = __nccwpck_require__(991);
|
|
6674
6674
|
const JSONError = errorEx("JSONError", {
|
|
6675
6675
|
fileName: errorEx.append("in %s"),
|
|
6676
6676
|
codeFrame: errorEx.append("\n\n%s\n"),
|
|
@@ -6780,19 +6780,19 @@
|
|
|
6780
6780
|
module.exports = createColors();
|
|
6781
6781
|
module.exports.createColors = createColors;
|
|
6782
6782
|
},
|
|
6783
|
-
|
|
6783
|
+
9635: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6784
6784
|
"use strict";
|
|
6785
|
-
module.exports = __nccwpck_require__(
|
|
6785
|
+
module.exports = __nccwpck_require__(3988)["default"];
|
|
6786
6786
|
},
|
|
6787
|
-
|
|
6787
|
+
3988: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
6788
6788
|
"use strict";
|
|
6789
6789
|
var __webpack_unused_export__;
|
|
6790
6790
|
__webpack_unused_export__ = { value: true };
|
|
6791
6791
|
exports["default"] = loader;
|
|
6792
6792
|
var _path = _interopRequireDefault(__nccwpck_require__(1017));
|
|
6793
6793
|
var _package = _interopRequireDefault(__nccwpck_require__(7972));
|
|
6794
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
6795
|
-
var _utils = __nccwpck_require__(
|
|
6794
|
+
var _options = _interopRequireDefault(__nccwpck_require__(4050));
|
|
6795
|
+
var _utils = __nccwpck_require__(6245);
|
|
6796
6796
|
function _interopRequireDefault(obj) {
|
|
6797
6797
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
6798
6798
|
}
|
|
@@ -6970,7 +6970,7 @@
|
|
|
6970
6970
|
callback(null, result.css, map, { ast });
|
|
6971
6971
|
}
|
|
6972
6972
|
},
|
|
6973
|
-
|
|
6973
|
+
6245: (module, exports, __nccwpck_require__) => {
|
|
6974
6974
|
"use strict";
|
|
6975
6975
|
module = __nccwpck_require__.nmd(module);
|
|
6976
6976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7688,12 +7688,12 @@
|
|
|
7688
7688
|
"use strict";
|
|
7689
7689
|
module.exports = require("util");
|
|
7690
7690
|
},
|
|
7691
|
-
|
|
7691
|
+
991: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
7692
7692
|
"use strict";
|
|
7693
7693
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7694
7694
|
exports.codeFrameColumns = codeFrameColumns;
|
|
7695
7695
|
exports["default"] = _default;
|
|
7696
|
-
var _highlight = __nccwpck_require__(
|
|
7696
|
+
var _highlight = __nccwpck_require__(8073);
|
|
7697
7697
|
var _picocolors = _interopRequireWildcard(__nccwpck_require__(701), true);
|
|
7698
7698
|
function _getRequireWildcardCache(e) {
|
|
7699
7699
|
if ("function" != typeof WeakMap) return null;
|
|
@@ -8140,7 +8140,7 @@
|
|
|
8140
8140
|
return keywords.has(word);
|
|
8141
8141
|
}
|
|
8142
8142
|
},
|
|
8143
|
-
|
|
8143
|
+
8073: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8144
8144
|
"use strict";
|
|
8145
8145
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8146
8146
|
exports["default"] = highlight;
|
|
@@ -8308,7 +8308,7 @@
|
|
|
8308
8308
|
};
|
|
8309
8309
|
}
|
|
8310
8310
|
},
|
|
8311
|
-
|
|
8311
|
+
4050: (module) => {
|
|
8312
8312
|
"use strict";
|
|
8313
8313
|
module.exports = JSON.parse(
|
|
8314
8314
|
'{"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}',
|
|
@@ -8418,6 +8418,6 @@
|
|
|
8418
8418
|
})();
|
|
8419
8419
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8420
8420
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8421
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8421
|
+
var __webpack_exports__ = __nccwpck_require__(9635);
|
|
8422
8422
|
module.exports = __webpack_exports__;
|
|
8423
8423
|
})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
482: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.transformFiles =
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
.map(standardizeFilePaths);
|
|
121
121
|
exports.transformFiles = transformFiles;
|
|
122
122
|
},
|
|
123
|
-
|
|
123
|
+
9178: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
124
124
|
"use strict";
|
|
125
125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
126
126
|
exports.normalModuleLoaderHook =
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
const path_1 = __nccwpck_require__(1017);
|
|
133
133
|
const tapable_1 = __nccwpck_require__(4260);
|
|
134
134
|
const webpack_sources_1 = __nccwpck_require__(5433);
|
|
135
|
-
const helpers_1 = __nccwpck_require__(
|
|
135
|
+
const helpers_1 = __nccwpck_require__(482);
|
|
136
136
|
const compilerHookMap = new WeakMap();
|
|
137
137
|
const getCompilerHooks = (compiler) => {
|
|
138
138
|
let hooks = compilerHookMap.get(compiler);
|
|
@@ -5802,7 +5802,7 @@
|
|
|
5802
5802
|
exports.getCompilerHooks =
|
|
5803
5803
|
void 0;
|
|
5804
5804
|
const path_1 = __nccwpck_require__(1017);
|
|
5805
|
-
const hooks_1 = __nccwpck_require__(
|
|
5805
|
+
const hooks_1 = __nccwpck_require__(9178);
|
|
5806
5806
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
5807
5807
|
enumerable: true,
|
|
5808
5808
|
get: function () {
|
package/compiled/ws/index.d.ts
CHANGED
|
@@ -106,32 +106,16 @@ declare class WebSocket extends EventEmitter {
|
|
|
106
106
|
resume(): void;
|
|
107
107
|
|
|
108
108
|
// HTML5 WebSocket events
|
|
109
|
-
addEventListener(
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
addEventListener<K extends keyof WebSocket.WebSocketEventMap>(
|
|
110
|
+
type: K,
|
|
111
|
+
listener: (event: WebSocket.WebSocketEventMap[K]) => void,
|
|
112
112
|
options?: WebSocket.EventListenerOptions,
|
|
113
113
|
): void;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
options?: WebSocket.EventListenerOptions,
|
|
118
|
-
): void;
|
|
119
|
-
addEventListener(
|
|
120
|
-
method: "error",
|
|
121
|
-
cb: (event: WebSocket.ErrorEvent) => void,
|
|
122
|
-
options?: WebSocket.EventListenerOptions,
|
|
123
|
-
): void;
|
|
124
|
-
addEventListener(
|
|
125
|
-
method: "open",
|
|
126
|
-
cb: (event: WebSocket.Event) => void,
|
|
127
|
-
options?: WebSocket.EventListenerOptions,
|
|
114
|
+
removeEventListener<K extends keyof WebSocket.WebSocketEventMap>(
|
|
115
|
+
type: K,
|
|
116
|
+
listener: (event: WebSocket.WebSocketEventMap[K]) => void,
|
|
128
117
|
): void;
|
|
129
118
|
|
|
130
|
-
removeEventListener(method: "message", cb: (event: WebSocket.MessageEvent) => void): void;
|
|
131
|
-
removeEventListener(method: "close", cb: (event: WebSocket.CloseEvent) => void): void;
|
|
132
|
-
removeEventListener(method: "error", cb: (event: WebSocket.ErrorEvent) => void): void;
|
|
133
|
-
removeEventListener(method: "open", cb: (event: WebSocket.Event) => void): void;
|
|
134
|
-
|
|
135
119
|
// Events
|
|
136
120
|
on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
|
|
137
121
|
on(event: "error", listener: (this: WebSocket, err: Error) => void): this;
|
|
@@ -299,6 +283,13 @@ declare namespace WebSocket {
|
|
|
299
283
|
target: WebSocket;
|
|
300
284
|
}
|
|
301
285
|
|
|
286
|
+
interface WebSocketEventMap {
|
|
287
|
+
open: Event;
|
|
288
|
+
error: ErrorEvent;
|
|
289
|
+
close: CloseEvent;
|
|
290
|
+
message: MessageEvent;
|
|
291
|
+
}
|
|
292
|
+
|
|
302
293
|
interface EventListenerOptions {
|
|
303
294
|
once?: boolean | undefined;
|
|
304
295
|
}
|
package/dist/client/hmr.js
CHANGED
|
@@ -69,7 +69,7 @@ function formatStatsMessages(stats, verbose) {
|
|
|
69
69
|
function formatURL({ port, protocol, hostname, pathname }) {
|
|
70
70
|
if (typeof URL !== "undefined") {
|
|
71
71
|
const url = new URL("http://localhost");
|
|
72
|
-
url.port = port;
|
|
72
|
+
url.port = String(port);
|
|
73
73
|
url.hostname = hostname;
|
|
74
74
|
url.protocol = protocol;
|
|
75
75
|
url.pathname = pathname;
|
package/dist/index.cjs
CHANGED
|
@@ -1311,6 +1311,9 @@ function loadEnv({
|
|
|
1311
1311
|
for (const envPath of filePaths) {
|
|
1312
1312
|
Object.assign(parsed, (0, import_dotenv.parse)(import_node_fs3.default.readFileSync(envPath)));
|
|
1313
1313
|
}
|
|
1314
|
+
if (parsed.NODE_ENV) {
|
|
1315
|
+
process.env.NODE_ENV = parsed.NODE_ENV;
|
|
1316
|
+
}
|
|
1314
1317
|
(0, import_dotenv_expand.expand)({ parsed });
|
|
1315
1318
|
const publicVars = {};
|
|
1316
1319
|
for (const key of Object.keys(process.env)) {
|
|
@@ -1595,7 +1598,7 @@ async function createContextByConfig(options, bundlerType) {
|
|
|
1595
1598
|
const rootPath = cwd;
|
|
1596
1599
|
const cachePath = (0, import_node_path8.join)(rootPath, "node_modules", ".cache");
|
|
1597
1600
|
return {
|
|
1598
|
-
version: "1.0.1-beta.
|
|
1601
|
+
version: "1.0.1-beta.2",
|
|
1599
1602
|
rootPath,
|
|
1600
1603
|
distPath: "",
|
|
1601
1604
|
cachePath,
|
|
@@ -2189,6 +2192,7 @@ var init_configChain = __esm({
|
|
|
2189
2192
|
PUG: "pug",
|
|
2190
2193
|
/** Rule for Vue */
|
|
2191
2194
|
VUE: "vue",
|
|
2195
|
+
// TODO: remove
|
|
2192
2196
|
/** Rule for yaml */
|
|
2193
2197
|
YAML: "yaml",
|
|
2194
2198
|
/** Rule for wasm */
|
|
@@ -2226,6 +2230,7 @@ var init_configChain = __esm({
|
|
|
2226
2230
|
SWC: "swc",
|
|
2227
2231
|
/** svgr */
|
|
2228
2232
|
SVGR: "svgr",
|
|
2233
|
+
// TODO: remove
|
|
2229
2234
|
/** yaml-loader */
|
|
2230
2235
|
YAML: "yaml",
|
|
2231
2236
|
/** babel-loader */
|
|
@@ -2255,6 +2260,7 @@ var init_configChain = __esm({
|
|
|
2255
2260
|
COPY: "copy",
|
|
2256
2261
|
/** HtmlRspackPlugin */
|
|
2257
2262
|
HTML: "html",
|
|
2263
|
+
// TODO: remove
|
|
2258
2264
|
/** ESLintWebpackPlugin */
|
|
2259
2265
|
ESLINT: "eslint",
|
|
2260
2266
|
/** DefinePlugin */
|
|
@@ -2285,6 +2291,7 @@ var init_configChain = __esm({
|
|
|
2285
2291
|
VUE_LOADER_PLUGIN: "vue-loader-plugin",
|
|
2286
2292
|
/** ReactFastRefreshPlugin */
|
|
2287
2293
|
REACT_FAST_REFRESH: "react-fast-refresh",
|
|
2294
|
+
// TODO: remove
|
|
2288
2295
|
/** ProvidePlugin for node polyfill */
|
|
2289
2296
|
NODE_POLYFILL_PROVIDE: "node-polyfill-provide",
|
|
2290
2297
|
/** WebpackSRIPlugin */
|
|
@@ -6513,7 +6520,7 @@ function applyScriptCondition({
|
|
|
6513
6520
|
rule.exclude.add(condition);
|
|
6514
6521
|
}
|
|
6515
6522
|
}
|
|
6516
|
-
function getDefaultSwcConfig(browserslist3) {
|
|
6523
|
+
function getDefaultSwcConfig(browserslist3, cacheRoot) {
|
|
6517
6524
|
return {
|
|
6518
6525
|
jsc: {
|
|
6519
6526
|
externalHelpers: true,
|
|
@@ -6524,7 +6531,10 @@ function getDefaultSwcConfig(browserslist3) {
|
|
|
6524
6531
|
},
|
|
6525
6532
|
// Avoid the webpack magic comment to be removed
|
|
6526
6533
|
// https://github.com/swc-project/swc/issues/6403
|
|
6527
|
-
preserveAllComments: true
|
|
6534
|
+
preserveAllComments: true,
|
|
6535
|
+
experimental: {
|
|
6536
|
+
cacheRoot
|
|
6537
|
+
}
|
|
6528
6538
|
},
|
|
6529
6539
|
isModule: "unknown",
|
|
6530
6540
|
env: {
|
|
@@ -6585,6 +6595,7 @@ var init_swc = __esm({
|
|
|
6585
6595
|
order: "pre",
|
|
6586
6596
|
handler: async (chain, { CHAIN_ID: CHAIN_ID2, target, environment }) => {
|
|
6587
6597
|
const { config, browserslist: browserslist3 } = environment;
|
|
6598
|
+
const cacheRoot = import_node_path28.default.join(api.context.cachePath, ".swc");
|
|
6588
6599
|
const rule = chain.module.rule(CHAIN_ID2.RULE.JS).test(SCRIPT_REGEX).type("javascript/auto");
|
|
6589
6600
|
const dataUriRule = chain.module.rule(CHAIN_ID2.RULE.JS_DATA_URI).mimetype({
|
|
6590
6601
|
or: ["text/javascript", "application/javascript"]
|
|
@@ -6600,7 +6611,7 @@ var init_swc = __esm({
|
|
|
6600
6611
|
if (api.context.bundlerType === "webpack") {
|
|
6601
6612
|
return;
|
|
6602
6613
|
}
|
|
6603
|
-
const swcConfig = getDefaultSwcConfig(browserslist3);
|
|
6614
|
+
const swcConfig = getDefaultSwcConfig(browserslist3, cacheRoot);
|
|
6604
6615
|
applyTransformImport(swcConfig, config.source.transformImport);
|
|
6605
6616
|
applySwcDecoratorConfig(swcConfig, config);
|
|
6606
6617
|
if (swcConfig.jsc?.externalHelpers) {
|
|
@@ -7927,7 +7938,7 @@ function pluginModuleFederation() {
|
|
|
7927
7938
|
if (moduleFederation.options.exposes && config.server?.port && !config.dev?.client?.port) {
|
|
7928
7939
|
config.dev ||= {};
|
|
7929
7940
|
config.dev.client ||= {};
|
|
7930
|
-
config.dev.client.port =
|
|
7941
|
+
config.dev.client.port = config.server.port;
|
|
7931
7942
|
}
|
|
7932
7943
|
});
|
|
7933
7944
|
api.modifyEnvironmentConfig((config) => {
|
|
@@ -8789,7 +8800,7 @@ var init_init = __esm({
|
|
|
8789
8800
|
|
|
8790
8801
|
// src/cli/commands.ts
|
|
8791
8802
|
function runCli() {
|
|
8792
|
-
import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.1-beta.
|
|
8803
|
+
import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.1-beta.2");
|
|
8793
8804
|
const devCommand = import_commander.program.command("dev");
|
|
8794
8805
|
const buildCommand = import_commander.program.command("build");
|
|
8795
8806
|
const previewCommand = import_commander.program.command("preview");
|
|
@@ -8903,7 +8914,7 @@ function prepareCli() {
|
|
|
8903
8914
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
8904
8915
|
console.log();
|
|
8905
8916
|
}
|
|
8906
|
-
import_rslog.logger.greet(` ${`Rsbuild v${"1.0.1-beta.
|
|
8917
|
+
import_rslog.logger.greet(` ${`Rsbuild v${"1.0.1-beta.2"}`}
|
|
8907
8918
|
`);
|
|
8908
8919
|
}
|
|
8909
8920
|
var init_prepare = __esm({
|
|
@@ -8986,7 +8997,7 @@ init_logger();
|
|
|
8986
8997
|
init_mergeConfig();
|
|
8987
8998
|
init_helpers();
|
|
8988
8999
|
init_constants();
|
|
8989
|
-
var version = "1.0.1-beta.
|
|
9000
|
+
var version = "1.0.1-beta.2";
|
|
8990
9001
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8991
9002
|
0 && (module.exports = {
|
|
8992
9003
|
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.
|
|
49
|
+
// ../../node_modules/.pnpm/@modern-js+module-tools@2.55.0_eslint@9.6.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js
|
|
50
50
|
import { fileURLToPath } from "url";
|
|
51
51
|
import path from "path";
|
|
52
52
|
var getFilename, getDirname, __dirname, __filename;
|
|
53
53
|
var init_esm = __esm({
|
|
54
|
-
"../../node_modules/.pnpm/@modern-js+module-tools@2.
|
|
54
|
+
"../../node_modules/.pnpm/@modern-js+module-tools@2.55.0_eslint@9.6.0_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());
|
|
@@ -1345,6 +1345,9 @@ function loadEnv({
|
|
|
1345
1345
|
for (const envPath of filePaths) {
|
|
1346
1346
|
Object.assign(parsed, parse(fs3.readFileSync(envPath)));
|
|
1347
1347
|
}
|
|
1348
|
+
if (parsed.NODE_ENV) {
|
|
1349
|
+
process.env.NODE_ENV = parsed.NODE_ENV;
|
|
1350
|
+
}
|
|
1348
1351
|
expand({ parsed });
|
|
1349
1352
|
const publicVars = {};
|
|
1350
1353
|
for (const key of Object.keys(process.env)) {
|
|
@@ -1629,7 +1632,7 @@ async function createContextByConfig(options, bundlerType) {
|
|
|
1629
1632
|
const rootPath = cwd;
|
|
1630
1633
|
const cachePath = join6(rootPath, "node_modules", ".cache");
|
|
1631
1634
|
return {
|
|
1632
|
-
version: "1.0.1-beta.
|
|
1635
|
+
version: "1.0.1-beta.2",
|
|
1633
1636
|
rootPath,
|
|
1634
1637
|
distPath: "",
|
|
1635
1638
|
cachePath,
|
|
@@ -2226,6 +2229,7 @@ var init_configChain = __esm({
|
|
|
2226
2229
|
PUG: "pug",
|
|
2227
2230
|
/** Rule for Vue */
|
|
2228
2231
|
VUE: "vue",
|
|
2232
|
+
// TODO: remove
|
|
2229
2233
|
/** Rule for yaml */
|
|
2230
2234
|
YAML: "yaml",
|
|
2231
2235
|
/** Rule for wasm */
|
|
@@ -2263,6 +2267,7 @@ var init_configChain = __esm({
|
|
|
2263
2267
|
SWC: "swc",
|
|
2264
2268
|
/** svgr */
|
|
2265
2269
|
SVGR: "svgr",
|
|
2270
|
+
// TODO: remove
|
|
2266
2271
|
/** yaml-loader */
|
|
2267
2272
|
YAML: "yaml",
|
|
2268
2273
|
/** babel-loader */
|
|
@@ -2292,6 +2297,7 @@ var init_configChain = __esm({
|
|
|
2292
2297
|
COPY: "copy",
|
|
2293
2298
|
/** HtmlRspackPlugin */
|
|
2294
2299
|
HTML: "html",
|
|
2300
|
+
// TODO: remove
|
|
2295
2301
|
/** ESLintWebpackPlugin */
|
|
2296
2302
|
ESLINT: "eslint",
|
|
2297
2303
|
/** DefinePlugin */
|
|
@@ -2322,6 +2328,7 @@ var init_configChain = __esm({
|
|
|
2322
2328
|
VUE_LOADER_PLUGIN: "vue-loader-plugin",
|
|
2323
2329
|
/** ReactFastRefreshPlugin */
|
|
2324
2330
|
REACT_FAST_REFRESH: "react-fast-refresh",
|
|
2331
|
+
// TODO: remove
|
|
2325
2332
|
/** ProvidePlugin for node polyfill */
|
|
2326
2333
|
NODE_POLYFILL_PROVIDE: "node-polyfill-provide",
|
|
2327
2334
|
/** WebpackSRIPlugin */
|
|
@@ -6592,7 +6599,7 @@ function applyScriptCondition({
|
|
|
6592
6599
|
rule.exclude.add(condition);
|
|
6593
6600
|
}
|
|
6594
6601
|
}
|
|
6595
|
-
function getDefaultSwcConfig(browserslist3) {
|
|
6602
|
+
function getDefaultSwcConfig(browserslist3, cacheRoot) {
|
|
6596
6603
|
return {
|
|
6597
6604
|
jsc: {
|
|
6598
6605
|
externalHelpers: true,
|
|
@@ -6603,7 +6610,10 @@ function getDefaultSwcConfig(browserslist3) {
|
|
|
6603
6610
|
},
|
|
6604
6611
|
// Avoid the webpack magic comment to be removed
|
|
6605
6612
|
// https://github.com/swc-project/swc/issues/6403
|
|
6606
|
-
preserveAllComments: true
|
|
6613
|
+
preserveAllComments: true,
|
|
6614
|
+
experimental: {
|
|
6615
|
+
cacheRoot
|
|
6616
|
+
}
|
|
6607
6617
|
},
|
|
6608
6618
|
isModule: "unknown",
|
|
6609
6619
|
env: {
|
|
@@ -6663,6 +6673,7 @@ var init_swc = __esm({
|
|
|
6663
6673
|
order: "pre",
|
|
6664
6674
|
handler: async (chain, { CHAIN_ID: CHAIN_ID2, target, environment }) => {
|
|
6665
6675
|
const { config, browserslist: browserslist3 } = environment;
|
|
6676
|
+
const cacheRoot = path14.join(api.context.cachePath, ".swc");
|
|
6666
6677
|
const rule = chain.module.rule(CHAIN_ID2.RULE.JS).test(SCRIPT_REGEX).type("javascript/auto");
|
|
6667
6678
|
const dataUriRule = chain.module.rule(CHAIN_ID2.RULE.JS_DATA_URI).mimetype({
|
|
6668
6679
|
or: ["text/javascript", "application/javascript"]
|
|
@@ -6678,7 +6689,7 @@ var init_swc = __esm({
|
|
|
6678
6689
|
if (api.context.bundlerType === "webpack") {
|
|
6679
6690
|
return;
|
|
6680
6691
|
}
|
|
6681
|
-
const swcConfig = getDefaultSwcConfig(browserslist3);
|
|
6692
|
+
const swcConfig = getDefaultSwcConfig(browserslist3, cacheRoot);
|
|
6682
6693
|
applyTransformImport(swcConfig, config.source.transformImport);
|
|
6683
6694
|
applySwcDecoratorConfig(swcConfig, config);
|
|
6684
6695
|
if (swcConfig.jsc?.externalHelpers) {
|
|
@@ -8022,7 +8033,7 @@ function pluginModuleFederation() {
|
|
|
8022
8033
|
if (moduleFederation.options.exposes && config.server?.port && !config.dev?.client?.port) {
|
|
8023
8034
|
config.dev ||= {};
|
|
8024
8035
|
config.dev.client ||= {};
|
|
8025
|
-
config.dev.client.port =
|
|
8036
|
+
config.dev.client.port = config.server.port;
|
|
8026
8037
|
}
|
|
8027
8038
|
});
|
|
8028
8039
|
api.modifyEnvironmentConfig((config) => {
|
|
@@ -8894,7 +8905,7 @@ import { existsSync } from "fs";
|
|
|
8894
8905
|
import { program } from "../compiled/commander/index.js";
|
|
8895
8906
|
import color14 from "../compiled/picocolors/index.js";
|
|
8896
8907
|
function runCli() {
|
|
8897
|
-
program.name("rsbuild").usage("<command> [options]").version("1.0.1-beta.
|
|
8908
|
+
program.name("rsbuild").usage("<command> [options]").version("1.0.1-beta.2");
|
|
8898
8909
|
const devCommand = program.command("dev");
|
|
8899
8910
|
const buildCommand = program.command("build");
|
|
8900
8911
|
const previewCommand = program.command("preview");
|
|
@@ -9006,7 +9017,7 @@ function prepareCli() {
|
|
|
9006
9017
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
9007
9018
|
console.log();
|
|
9008
9019
|
}
|
|
9009
|
-
logger.greet(` ${`Rsbuild v${"1.0.1-beta.
|
|
9020
|
+
logger.greet(` ${`Rsbuild v${"1.0.1-beta.2"}`}
|
|
9010
9021
|
`);
|
|
9011
9022
|
}
|
|
9012
9023
|
var init_prepare = __esm({
|
|
@@ -9076,7 +9087,7 @@ init_mergeConfig();
|
|
|
9076
9087
|
init_helpers();
|
|
9077
9088
|
init_constants();
|
|
9078
9089
|
import { rspack as rspack10 } from "@rspack/core";
|
|
9079
|
-
var version = "1.0.1-beta.
|
|
9090
|
+
var version = "1.0.1-beta.2";
|
|
9080
9091
|
export {
|
|
9081
9092
|
PLUGIN_CSS_NAME,
|
|
9082
9093
|
PLUGIN_SWC_NAME,
|
|
@@ -32,7 +32,7 @@ export type ServerAPIs = {
|
|
|
32
32
|
};
|
|
33
33
|
export type ClientConfig = {
|
|
34
34
|
path?: string;
|
|
35
|
-
port?: string;
|
|
35
|
+
port?: string | number;
|
|
36
36
|
host?: string;
|
|
37
37
|
protocol?: 'ws' | 'wss';
|
|
38
38
|
/** Shows an overlay in the browser when there are compiler errors. */
|
|
@@ -61,7 +61,9 @@ export interface DevConfig {
|
|
|
61
61
|
* Whether to display progress bar during compilation.
|
|
62
62
|
*/
|
|
63
63
|
progressBar?: boolean | ProgressBarConfig;
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Config for Rsbuild client code.
|
|
66
|
+
*/
|
|
65
67
|
client?: ClientConfig;
|
|
66
68
|
/** Provides the ability to execute a custom function and apply custom middlewares */
|
|
67
69
|
setupMiddlewares?: Array<(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.2",
|
|
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.0-alpha.
|
|
50
|
-
"@rspack/lite-tapable": "1.0.0-alpha.
|
|
49
|
+
"@rspack/core": "1.0.0-alpha.4",
|
|
50
|
+
"@rspack/lite-tapable": "1.0.0-alpha.4",
|
|
51
51
|
"@swc/helpers": "0.5.11",
|
|
52
|
-
"caniuse-lite": "^1.0.
|
|
52
|
+
"caniuse-lite": "^1.0.30001642",
|
|
53
53
|
"core-js": "~3.37.1",
|
|
54
54
|
"postcss": "^8.4.39"
|
|
55
55
|
},
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@types/node": "18.x",
|
|
60
60
|
"@types/on-finished": "2.3.4",
|
|
61
61
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
62
|
-
"@types/ws": "^8.5.
|
|
62
|
+
"@types/ws": "^8.5.11",
|
|
63
63
|
"autoprefixer": "10.4.19",
|
|
64
|
-
"browserslist": "4.23.
|
|
64
|
+
"browserslist": "4.23.2",
|
|
65
65
|
"browserslist-to-es-version": "^1.0.0",
|
|
66
66
|
"chokidar": "3.6.0",
|
|
67
67
|
"commander": "^12.1.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"dotenv": "16.4.5",
|
|
73
73
|
"dotenv-expand": "11.0.6",
|
|
74
74
|
"fs-extra": "^11.2.0",
|
|
75
|
-
"html-rspack-plugin": "6.0.0-beta.
|
|
75
|
+
"html-rspack-plugin": "6.0.0-beta.9",
|
|
76
76
|
"http-compression": "1.0.20",
|
|
77
77
|
"http-proxy-middleware": "^2.0.6",
|
|
78
78
|
"jiti": "^1.21.6",
|