@rsbuild/webpack 1.3.0-beta.3 → 1.3.1
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/dist/{945.js → 812.js} +7 -11
- package/dist/{81.cjs → 818.cjs} +7 -14
- package/dist/997.cjs +13 -27
- package/dist/997.js +13 -24
- package/dist/index.cjs +27 -21
- package/dist/index.js +19 -22
- package/package.json +6 -6
package/dist/{945.js → 812.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const __webpack_ids__ = [
|
|
2
|
-
|
|
2
|
+
"812"
|
|
3
3
|
];
|
|
4
4
|
export const __webpack_modules__ = {
|
|
5
5
|
"./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -12,10 +12,10 @@ export const __webpack_modules__ = {
|
|
|
12
12
|
current: 0,
|
|
13
13
|
color: 'green',
|
|
14
14
|
bgColor: 'gray',
|
|
15
|
-
char:
|
|
15
|
+
char: "\u2501",
|
|
16
16
|
width: 25,
|
|
17
|
-
buildIcon:
|
|
18
|
-
errorIcon:
|
|
17
|
+
buildIcon: "\u25EF",
|
|
18
|
+
errorIcon: "\u2716",
|
|
19
19
|
errorInfo: 'compile failed',
|
|
20
20
|
message: '',
|
|
21
21
|
done: !1,
|
|
@@ -102,10 +102,7 @@ export const __webpack_modules__ = {
|
|
|
102
102
|
], getProgressColor = (index)=>colorList[index % colorList.length], bus = new class {
|
|
103
103
|
update(state) {
|
|
104
104
|
let index = this.states.findIndex((i)=>i.id === state.id);
|
|
105
|
-
if (-1 === index)
|
|
106
|
-
this.states.push(state);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
105
|
+
if (-1 === index) return void this.states.push(state);
|
|
109
106
|
this.states[index] = state;
|
|
110
107
|
}
|
|
111
108
|
writeToStd(type = 'stdout', data) {
|
|
@@ -114,7 +111,7 @@ export const __webpack_modules__ = {
|
|
|
114
111
|
render() {
|
|
115
112
|
let maxIdLen = Math.max(...this.states.map((i)=>{
|
|
116
113
|
var _i_id;
|
|
117
|
-
return (null
|
|
114
|
+
return (null == (_i_id = i.id) ? void 0 : _i_id.length) ?? 0;
|
|
118
115
|
})) + 2, { columns = 70 } = process.stdout;
|
|
119
116
|
this.prevOutput = this.states.map((i, k)=>{
|
|
120
117
|
let bar = renderBar({
|
|
@@ -175,8 +172,7 @@ export const __webpack_modules__ = {
|
|
|
175
172
|
});
|
|
176
173
|
}
|
|
177
174
|
constructor(options){
|
|
178
|
-
let prevPercentage
|
|
179
|
-
let { id = 'Rsbuild' } = options, nonTTYLogger = (prevPercentage = 0, {
|
|
175
|
+
let prevPercentage, { id = 'Rsbuild' } = options, nonTTYLogger = (prevPercentage = 0, {
|
|
180
176
|
log: ({ id, done, current, hasErrors, compileTime })=>{
|
|
181
177
|
let suffix = external_picocolors_.default.gray(`(${id})`);
|
|
182
178
|
if (done) {
|
package/dist/{81.cjs → 818.cjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.ids = [
|
|
3
|
-
|
|
3
|
+
"818"
|
|
4
4
|
], exports.modules = {
|
|
5
5
|
"./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
6
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -12,10 +12,10 @@ exports.ids = [
|
|
|
12
12
|
current: 0,
|
|
13
13
|
color: 'green',
|
|
14
14
|
bgColor: 'gray',
|
|
15
|
-
char:
|
|
15
|
+
char: "\u2501",
|
|
16
16
|
width: 25,
|
|
17
|
-
buildIcon:
|
|
18
|
-
errorIcon:
|
|
17
|
+
buildIcon: "\u25EF",
|
|
18
|
+
errorIcon: "\u2716",
|
|
19
19
|
errorInfo: 'compile failed',
|
|
20
20
|
message: '',
|
|
21
21
|
done: !1,
|
|
@@ -102,10 +102,7 @@ exports.ids = [
|
|
|
102
102
|
], getProgressColor = (index)=>colorList[index % colorList.length], bus = new class {
|
|
103
103
|
update(state) {
|
|
104
104
|
let index = this.states.findIndex((i)=>i.id === state.id);
|
|
105
|
-
if (-1 === index)
|
|
106
|
-
this.states.push(state);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
105
|
+
if (-1 === index) return void this.states.push(state);
|
|
109
106
|
this.states[index] = state;
|
|
110
107
|
}
|
|
111
108
|
writeToStd(type = 'stdout', data) {
|
|
@@ -114,7 +111,7 @@ exports.ids = [
|
|
|
114
111
|
render() {
|
|
115
112
|
let maxIdLen = Math.max(...this.states.map((i)=>{
|
|
116
113
|
var _i_id;
|
|
117
|
-
return (null
|
|
114
|
+
return (null == (_i_id = i.id) ? void 0 : _i_id.length) ?? 0;
|
|
118
115
|
})) + 2, { columns = 70 } = process.stdout;
|
|
119
116
|
this.prevOutput = this.states.map((i, k)=>{
|
|
120
117
|
let bar = renderBar({
|
|
@@ -175,8 +172,7 @@ exports.ids = [
|
|
|
175
172
|
});
|
|
176
173
|
}
|
|
177
174
|
constructor(options){
|
|
178
|
-
let prevPercentage
|
|
179
|
-
let { id = 'Rsbuild' } = options, nonTTYLogger = (prevPercentage = 0, {
|
|
175
|
+
let prevPercentage, { id = 'Rsbuild' } = options, nonTTYLogger = (prevPercentage = 0, {
|
|
180
176
|
log: ({ id, done, current, hasErrors, compileTime })=>{
|
|
181
177
|
let suffix = external_picocolors_default().gray(`(${id})`);
|
|
182
178
|
if (done) {
|
|
@@ -215,6 +211,3 @@ exports.ids = [
|
|
|
215
211
|
}
|
|
216
212
|
}
|
|
217
213
|
};
|
|
218
|
-
|
|
219
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
220
|
-
0 && (module.exports = { webpackProvider: exports.webpackProvider });
|
package/dist/997.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
exports.ids = [
|
|
2
|
-
|
|
2
|
+
"997"
|
|
3
3
|
], exports.modules = {
|
|
4
4
|
"../../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js": function(module) {
|
|
5
5
|
"use strict";
|
|
@@ -429,8 +429,7 @@ exports.ids = [
|
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
convert.rgb.hsl = function(rgb) {
|
|
432
|
-
let h;
|
|
433
|
-
let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), delta = max - min;
|
|
432
|
+
let h, r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), delta = max - min;
|
|
434
433
|
max === min ? h = 0 : r === max ? h = (g - b) / delta : g === max ? h = 2 + (b - r) / delta : b === max && (h = 4 + (r - g) / delta), (h = Math.min(60 * h, 360)) < 0 && (h += 360);
|
|
435
434
|
let l = (min + max) / 2;
|
|
436
435
|
return [
|
|
@@ -439,8 +438,7 @@ exports.ids = [
|
|
|
439
438
|
100 * l
|
|
440
439
|
];
|
|
441
440
|
}, convert.rgb.hsv = function(rgb) {
|
|
442
|
-
let rdif, gdif, bdif, h, s
|
|
443
|
-
let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, v = Math.max(r, g, b), diff = v - Math.min(r, g, b), diffc = function(c) {
|
|
441
|
+
let rdif, gdif, bdif, h, s, r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, v = Math.max(r, g, b), diff = v - Math.min(r, g, b), diffc = function(c) {
|
|
444
442
|
return (v - c) / 6 / diff + 0.5;
|
|
445
443
|
};
|
|
446
444
|
return 0 === diff ? (h = 0, s = 0) : (s = diff / v, rdif = diffc(r), gdif = diffc(g), bdif = diffc(b), r === v ? h = bdif - gdif : g === v ? h = 1 / 3 + rdif - bdif : b === v && (h = 2 / 3 + gdif - rdif), h < 0 ? h += 1 : h > 1 && (h -= 1)), [
|
|
@@ -464,8 +462,7 @@ exports.ids = [
|
|
|
464
462
|
100 * k
|
|
465
463
|
];
|
|
466
464
|
}, convert.rgb.keyword = function(rgb) {
|
|
467
|
-
let currentClosestKeyword;
|
|
468
|
-
let reversed = reverseKeywords[rgb];
|
|
465
|
+
let currentClosestKeyword, reversed = reverseKeywords[rgb];
|
|
469
466
|
if (reversed) return reversed;
|
|
470
467
|
let currentClosestDistance = 1 / 0;
|
|
471
468
|
for (let keyword of Object.keys(cssKeywords)){
|
|
@@ -490,8 +487,7 @@ exports.ids = [
|
|
|
490
487
|
200 * (y - (z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116))
|
|
491
488
|
];
|
|
492
489
|
}, convert.hsl.rgb = function(hsl) {
|
|
493
|
-
let t2, t3, val;
|
|
494
|
-
let h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100;
|
|
490
|
+
let t2, t3, val, h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100;
|
|
495
491
|
if (0 === s) return [
|
|
496
492
|
val = 255 * l,
|
|
497
493
|
val,
|
|
@@ -555,8 +551,7 @@ exports.ids = [
|
|
|
555
551
|
];
|
|
556
552
|
}
|
|
557
553
|
}, convert.hsv.hsl = function(hsv) {
|
|
558
|
-
let sl, l;
|
|
559
|
-
let h = hsv[0], s = hsv[1] / 100, v = hsv[2] / 100, vmin = Math.max(v, 0.01);
|
|
554
|
+
let sl, l, h = hsv[0], s = hsv[1] / 100, v = hsv[2] / 100, vmin = Math.max(v, 0.01);
|
|
560
555
|
l = (2 - s) * v;
|
|
561
556
|
let lmin = (2 - s) * vmin;
|
|
562
557
|
return [
|
|
@@ -565,8 +560,7 @@ exports.ids = [
|
|
|
565
560
|
100 * (l /= 2)
|
|
566
561
|
];
|
|
567
562
|
}, convert.hwb.rgb = function(hwb) {
|
|
568
|
-
let f, r, g, b;
|
|
569
|
-
let h = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl;
|
|
563
|
+
let f, r, g, b, h = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl;
|
|
570
564
|
ratio > 1 && (wh /= ratio, bl /= ratio);
|
|
571
565
|
let i = Math.floor(6 * h), v = 1 - bl;
|
|
572
566
|
f = 6 * h - i, (0x01 & i) != 0 && (f = 1 - f);
|
|
@@ -605,8 +599,7 @@ exports.ids = [
|
|
|
605
599
|
255 * (1 - Math.min(1, y * (1 - k) + k))
|
|
606
600
|
];
|
|
607
601
|
}, convert.xyz.rgb = function(xyz) {
|
|
608
|
-
let r, g, b;
|
|
609
|
-
let x = xyz[0] / 100, y = xyz[1] / 100, z = xyz[2] / 100;
|
|
602
|
+
let r, g, b, x = xyz[0] / 100, y = xyz[1] / 100, z = xyz[2] / 100;
|
|
610
603
|
return r = (r = 3.2406 * x + -1.5372 * y + -0.4986 * z) > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : 12.92 * r, g = (g = -0.9689 * x + 1.8758 * y + 0.0415 * z) > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : 12.92 * g, b = (b = 0.0557 * x + -0.204 * y + 1.0570 * z) > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : 12.92 * b, [
|
|
611
604
|
255 * (r = Math.min(Math.max(0, r), 1)),
|
|
612
605
|
255 * (g = Math.min(Math.max(0, g), 1)),
|
|
@@ -620,8 +613,7 @@ exports.ids = [
|
|
|
620
613
|
200 * (y - (z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116))
|
|
621
614
|
];
|
|
622
615
|
}, convert.lab.xyz = function(lab) {
|
|
623
|
-
let x, y, z;
|
|
624
|
-
let l = lab[0], a = lab[1], b = lab[2];
|
|
616
|
+
let x, y, z, l = lab[0], a = lab[1], b = lab[2];
|
|
625
617
|
x = a / 500 + (y = (l + 16) / 116), z = y - b / 200;
|
|
626
618
|
let y2 = y ** 3, x2 = x ** 3, z2 = z ** 3;
|
|
627
619
|
return y = (y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787) * 100, [
|
|
@@ -630,8 +622,7 @@ exports.ids = [
|
|
|
630
622
|
z = (z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787) * 108.883
|
|
631
623
|
];
|
|
632
624
|
}, convert.lab.lch = function(lab) {
|
|
633
|
-
let h;
|
|
634
|
-
let l = lab[0], a = lab[1], b = lab[2];
|
|
625
|
+
let h, l = lab[0], a = lab[1], b = lab[2];
|
|
635
626
|
return (h = 360 * Math.atan2(b, a) / 2 / Math.PI) < 0 && (h += 360), [
|
|
636
627
|
l,
|
|
637
628
|
Math.sqrt(a * a + b * b),
|
|
@@ -701,8 +692,7 @@ exports.ids = [
|
|
|
701
692
|
0xFF & integer
|
|
702
693
|
];
|
|
703
694
|
}, convert.rgb.hcg = function(rgb) {
|
|
704
|
-
let grayscale, hue;
|
|
705
|
-
let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, max = Math.max(Math.max(r, g), b), min = Math.min(Math.min(r, g), b), chroma = max - min;
|
|
695
|
+
let grayscale, hue, r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, max = Math.max(Math.max(r, g), b), min = Math.min(Math.min(r, g), b), chroma = max - min;
|
|
706
696
|
return grayscale = chroma < 1 ? min / (1 - chroma) : 0, [
|
|
707
697
|
360 * ((chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma) / 6 % 1),
|
|
708
698
|
100 * chroma,
|
|
@@ -1733,8 +1723,7 @@ exports.ids = [
|
|
|
1733
1723
|
return output.join('');
|
|
1734
1724
|
};
|
|
1735
1725
|
module.exports = (string, begin, end)=>{
|
|
1736
|
-
let ansiCode
|
|
1737
|
-
let characters = [
|
|
1726
|
+
let ansiCode, characters = [
|
|
1738
1727
|
...string.normalize()
|
|
1739
1728
|
], ansiCodes = [];
|
|
1740
1729
|
end = 'number' == typeof end ? end : characters.length;
|
|
@@ -1766,7 +1755,7 @@ exports.ids = [
|
|
|
1766
1755
|
let width = 0;
|
|
1767
1756
|
for(let i = 0; i < string.length; i++){
|
|
1768
1757
|
let code = string.codePointAt(i);
|
|
1769
|
-
|
|
1758
|
+
code <= 0x1F || code >= 0x7F && code <= 0x9F || code >= 0x300 && code <= 0x36F || (code > 0xFFFF && i++, width += isFullwidthCodePoint(code) ? 2 : 1);
|
|
1770
1759
|
}
|
|
1771
1760
|
return width;
|
|
1772
1761
|
};
|
|
@@ -1778,6 +1767,3 @@ exports.ids = [
|
|
|
1778
1767
|
module.exports = (string)=>'string' == typeof string ? string.replace(ansiRegex(), '') : string;
|
|
1779
1768
|
}
|
|
1780
1769
|
};
|
|
1781
|
-
|
|
1782
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1783
|
-
0 && (module.exports = { webpackProvider: exports.webpackProvider });
|
package/dist/997.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const __webpack_ids__ = [
|
|
2
|
-
|
|
2
|
+
"997"
|
|
3
3
|
];
|
|
4
4
|
export const __webpack_modules__ = {
|
|
5
5
|
"../../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js": function(module) {
|
|
@@ -425,8 +425,7 @@ export const __webpack_modules__ = {
|
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
convert.rgb.hsl = function(rgb) {
|
|
428
|
-
let h;
|
|
429
|
-
let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), delta = max - min;
|
|
428
|
+
let h, r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), delta = max - min;
|
|
430
429
|
max === min ? h = 0 : r === max ? h = (g - b) / delta : g === max ? h = 2 + (b - r) / delta : b === max && (h = 4 + (r - g) / delta), (h = Math.min(60 * h, 360)) < 0 && (h += 360);
|
|
431
430
|
let l = (min + max) / 2;
|
|
432
431
|
return [
|
|
@@ -435,8 +434,7 @@ export const __webpack_modules__ = {
|
|
|
435
434
|
100 * l
|
|
436
435
|
];
|
|
437
436
|
}, convert.rgb.hsv = function(rgb) {
|
|
438
|
-
let rdif, gdif, bdif, h, s
|
|
439
|
-
let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, v = Math.max(r, g, b), diff = v - Math.min(r, g, b), diffc = function(c) {
|
|
437
|
+
let rdif, gdif, bdif, h, s, r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, v = Math.max(r, g, b), diff = v - Math.min(r, g, b), diffc = function(c) {
|
|
440
438
|
return (v - c) / 6 / diff + 0.5;
|
|
441
439
|
};
|
|
442
440
|
return 0 === diff ? (h = 0, s = 0) : (s = diff / v, rdif = diffc(r), gdif = diffc(g), bdif = diffc(b), r === v ? h = bdif - gdif : g === v ? h = 1 / 3 + rdif - bdif : b === v && (h = 2 / 3 + gdif - rdif), h < 0 ? h += 1 : h > 1 && (h -= 1)), [
|
|
@@ -460,8 +458,7 @@ export const __webpack_modules__ = {
|
|
|
460
458
|
100 * k
|
|
461
459
|
];
|
|
462
460
|
}, convert.rgb.keyword = function(rgb) {
|
|
463
|
-
let currentClosestKeyword;
|
|
464
|
-
let reversed = reverseKeywords[rgb];
|
|
461
|
+
let currentClosestKeyword, reversed = reverseKeywords[rgb];
|
|
465
462
|
if (reversed) return reversed;
|
|
466
463
|
let currentClosestDistance = 1 / 0;
|
|
467
464
|
for (let keyword of Object.keys(cssKeywords)){
|
|
@@ -486,8 +483,7 @@ export const __webpack_modules__ = {
|
|
|
486
483
|
200 * (y - (z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116))
|
|
487
484
|
];
|
|
488
485
|
}, convert.hsl.rgb = function(hsl) {
|
|
489
|
-
let t2, t3, val;
|
|
490
|
-
let h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100;
|
|
486
|
+
let t2, t3, val, h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100;
|
|
491
487
|
if (0 === s) return [
|
|
492
488
|
val = 255 * l,
|
|
493
489
|
val,
|
|
@@ -551,8 +547,7 @@ export const __webpack_modules__ = {
|
|
|
551
547
|
];
|
|
552
548
|
}
|
|
553
549
|
}, convert.hsv.hsl = function(hsv) {
|
|
554
|
-
let sl, l;
|
|
555
|
-
let h = hsv[0], s = hsv[1] / 100, v = hsv[2] / 100, vmin = Math.max(v, 0.01);
|
|
550
|
+
let sl, l, h = hsv[0], s = hsv[1] / 100, v = hsv[2] / 100, vmin = Math.max(v, 0.01);
|
|
556
551
|
l = (2 - s) * v;
|
|
557
552
|
let lmin = (2 - s) * vmin;
|
|
558
553
|
return [
|
|
@@ -561,8 +556,7 @@ export const __webpack_modules__ = {
|
|
|
561
556
|
100 * (l /= 2)
|
|
562
557
|
];
|
|
563
558
|
}, convert.hwb.rgb = function(hwb) {
|
|
564
|
-
let f, r, g, b;
|
|
565
|
-
let h = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl;
|
|
559
|
+
let f, r, g, b, h = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl;
|
|
566
560
|
ratio > 1 && (wh /= ratio, bl /= ratio);
|
|
567
561
|
let i = Math.floor(6 * h), v = 1 - bl;
|
|
568
562
|
f = 6 * h - i, (0x01 & i) != 0 && (f = 1 - f);
|
|
@@ -601,8 +595,7 @@ export const __webpack_modules__ = {
|
|
|
601
595
|
255 * (1 - Math.min(1, y * (1 - k) + k))
|
|
602
596
|
];
|
|
603
597
|
}, convert.xyz.rgb = function(xyz) {
|
|
604
|
-
let r, g, b;
|
|
605
|
-
let x = xyz[0] / 100, y = xyz[1] / 100, z = xyz[2] / 100;
|
|
598
|
+
let r, g, b, x = xyz[0] / 100, y = xyz[1] / 100, z = xyz[2] / 100;
|
|
606
599
|
return r = (r = 3.2406 * x + -1.5372 * y + -0.4986 * z) > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : 12.92 * r, g = (g = -0.9689 * x + 1.8758 * y + 0.0415 * z) > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : 12.92 * g, b = (b = 0.0557 * x + -0.204 * y + 1.0570 * z) > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : 12.92 * b, [
|
|
607
600
|
255 * (r = Math.min(Math.max(0, r), 1)),
|
|
608
601
|
255 * (g = Math.min(Math.max(0, g), 1)),
|
|
@@ -616,8 +609,7 @@ export const __webpack_modules__ = {
|
|
|
616
609
|
200 * (y - (z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116))
|
|
617
610
|
];
|
|
618
611
|
}, convert.lab.xyz = function(lab) {
|
|
619
|
-
let x, y, z;
|
|
620
|
-
let l = lab[0], a = lab[1], b = lab[2];
|
|
612
|
+
let x, y, z, l = lab[0], a = lab[1], b = lab[2];
|
|
621
613
|
x = a / 500 + (y = (l + 16) / 116), z = y - b / 200;
|
|
622
614
|
let y2 = y ** 3, x2 = x ** 3, z2 = z ** 3;
|
|
623
615
|
return y = (y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787) * 100, [
|
|
@@ -626,8 +618,7 @@ export const __webpack_modules__ = {
|
|
|
626
618
|
z = (z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787) * 108.883
|
|
627
619
|
];
|
|
628
620
|
}, convert.lab.lch = function(lab) {
|
|
629
|
-
let h;
|
|
630
|
-
let l = lab[0], a = lab[1], b = lab[2];
|
|
621
|
+
let h, l = lab[0], a = lab[1], b = lab[2];
|
|
631
622
|
return (h = 360 * Math.atan2(b, a) / 2 / Math.PI) < 0 && (h += 360), [
|
|
632
623
|
l,
|
|
633
624
|
Math.sqrt(a * a + b * b),
|
|
@@ -697,8 +688,7 @@ export const __webpack_modules__ = {
|
|
|
697
688
|
0xFF & integer
|
|
698
689
|
];
|
|
699
690
|
}, convert.rgb.hcg = function(rgb) {
|
|
700
|
-
let grayscale, hue;
|
|
701
|
-
let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, max = Math.max(Math.max(r, g), b), min = Math.min(Math.min(r, g), b), chroma = max - min;
|
|
691
|
+
let grayscale, hue, r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, max = Math.max(Math.max(r, g), b), min = Math.min(Math.min(r, g), b), chroma = max - min;
|
|
702
692
|
return grayscale = chroma < 1 ? min / (1 - chroma) : 0, [
|
|
703
693
|
360 * ((chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma) / 6 % 1),
|
|
704
694
|
100 * chroma,
|
|
@@ -1724,8 +1714,7 @@ export const __webpack_modules__ = {
|
|
|
1724
1714
|
return output.join('');
|
|
1725
1715
|
};
|
|
1726
1716
|
module.exports = (string, begin, end)=>{
|
|
1727
|
-
let ansiCode
|
|
1728
|
-
let characters = [
|
|
1717
|
+
let ansiCode, characters = [
|
|
1729
1718
|
...string.normalize()
|
|
1730
1719
|
], ansiCodes = [];
|
|
1731
1720
|
end = 'number' == typeof end ? end : characters.length;
|
|
@@ -1756,7 +1745,7 @@ export const __webpack_modules__ = {
|
|
|
1756
1745
|
let width = 0;
|
|
1757
1746
|
for(let i = 0; i < string.length; i++){
|
|
1758
1747
|
let code = string.codePointAt(i);
|
|
1759
|
-
|
|
1748
|
+
code <= 0x1F || code >= 0x7F && code <= 0x9F || code >= 0x300 && code <= 0x36F || (code > 0xFFFF && i++, width += isFullwidthCodePoint(code) ? 2 : 1);
|
|
1760
1749
|
}
|
|
1761
1750
|
return width;
|
|
1762
1751
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -17,19 +17,29 @@ var __webpack_modules__ = {
|
|
|
17
17
|
module.exports = require("webpack");
|
|
18
18
|
},
|
|
19
19
|
"copy-webpack-plugin": function(module) {
|
|
20
|
-
module.exports = import("copy-webpack-plugin")
|
|
20
|
+
module.exports = import("copy-webpack-plugin").then(function(module) {
|
|
21
|
+
return module;
|
|
22
|
+
});
|
|
21
23
|
},
|
|
22
24
|
"html-webpack-plugin": function(module) {
|
|
23
|
-
module.exports = import("html-webpack-plugin")
|
|
25
|
+
module.exports = import("html-webpack-plugin").then(function(module) {
|
|
26
|
+
return module;
|
|
27
|
+
});
|
|
24
28
|
},
|
|
25
29
|
"mini-css-extract-plugin": function(module) {
|
|
26
|
-
module.exports = import("mini-css-extract-plugin")
|
|
30
|
+
module.exports = import("mini-css-extract-plugin").then(function(module) {
|
|
31
|
+
return module;
|
|
32
|
+
});
|
|
27
33
|
},
|
|
28
34
|
"tsconfig-paths-webpack-plugin": function(module) {
|
|
29
|
-
module.exports = import("tsconfig-paths-webpack-plugin")
|
|
35
|
+
module.exports = import("tsconfig-paths-webpack-plugin").then(function(module) {
|
|
36
|
+
return module;
|
|
37
|
+
});
|
|
30
38
|
},
|
|
31
39
|
"webpack?fd69": function(module) {
|
|
32
|
-
module.exports = import("webpack")
|
|
40
|
+
module.exports = import("webpack").then(function(module) {
|
|
41
|
+
return module;
|
|
42
|
+
});
|
|
33
43
|
}
|
|
34
44
|
}, __webpack_module_cache__ = {};
|
|
35
45
|
function __webpack_require__(moduleId) {
|
|
@@ -72,7 +82,7 @@ __webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
|
72
82
|
};
|
|
73
83
|
})();
|
|
74
84
|
var __webpack_exports__ = {};
|
|
75
|
-
(()=>{
|
|
85
|
+
for(var __webpack_i__ in (()=>{
|
|
76
86
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
77
87
|
webpackProvider: ()=>webpackProvider
|
|
78
88
|
});
|
|
@@ -127,7 +137,7 @@ var __webpack_exports__ = {};
|
|
|
127
137
|
utils
|
|
128
138
|
]
|
|
129
139
|
});
|
|
130
|
-
if (null
|
|
140
|
+
if (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpackChain) for (let item of castArray(utils.environment.config.tools.webpackChain))item(modifiedChain, utils);
|
|
131
141
|
return core_.logger.debug('modify webpack chain done'), modifiedChain;
|
|
132
142
|
}
|
|
133
143
|
async function modifyWebpackConfig(context, webpackConfig, utils) {
|
|
@@ -140,7 +150,7 @@ var __webpack_exports__ = {};
|
|
|
140
150
|
utils
|
|
141
151
|
]
|
|
142
152
|
});
|
|
143
|
-
return (null
|
|
153
|
+
return (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpack) && (modifiedConfig = (0, external_reduce_configs_namespaceObject.reduceConfigsWithContext)({
|
|
144
154
|
initial: modifiedConfig,
|
|
145
155
|
config: utils.environment.config.tools.webpack,
|
|
146
156
|
ctx: utils,
|
|
@@ -172,7 +182,7 @@ var __webpack_exports__ = {};
|
|
|
172
182
|
HotModuleReplacementPlugin
|
|
173
183
|
}
|
|
174
184
|
}), webpackConfig = (await modifyWebpackChain(context, chainUtils, bundlerChain)).toConfig(), configUtils = await helpers.getConfigUtils(webpackConfig, chainUtils);
|
|
175
|
-
return await modifyWebpackConfig(context, webpackConfig, configUtils);
|
|
185
|
+
return webpackConfig = await modifyWebpackConfig(context, webpackConfig, configUtils);
|
|
176
186
|
}
|
|
177
187
|
async function initConfigs({ context, pluginManager, rsbuildOptions, helpers }) {
|
|
178
188
|
let normalizedConfig = await helpers.initRsbuildConfig({
|
|
@@ -238,8 +248,7 @@ var __webpack_exports__ = {};
|
|
|
238
248
|
};
|
|
239
249
|
}
|
|
240
250
|
let build = async (initOptions, { watch, compiler: customCompiler } = {})=>{
|
|
241
|
-
let compiler, bundlerConfigs;
|
|
242
|
-
let { helpers, context } = initOptions;
|
|
251
|
+
let compiler, bundlerConfigs, { helpers, context } = initOptions;
|
|
243
252
|
if (customCompiler) compiler = customCompiler;
|
|
244
253
|
else {
|
|
245
254
|
let result = await createCompiler_createCompiler(initOptions);
|
|
@@ -313,7 +322,7 @@ var __webpack_exports__ = {};
|
|
|
313
322
|
if (progress) {
|
|
314
323
|
let { ProgressPlugin } = await Promise.all([
|
|
315
324
|
__webpack_require__.e("997"),
|
|
316
|
-
__webpack_require__.e("
|
|
325
|
+
__webpack_require__.e("818")
|
|
317
326
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
318
327
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
319
328
|
{
|
|
@@ -334,8 +343,8 @@ var __webpack_exports__ = {};
|
|
|
334
343
|
}
|
|
335
344
|
}), api.modifyWebpackConfig(async (config)=>{
|
|
336
345
|
var _config_plugins, _config_plugins1;
|
|
337
|
-
let copyPlugin = null
|
|
338
|
-
copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !external_node_fs_default().existsSync(pattern.context)) && (config.plugins = null
|
|
346
|
+
let copyPlugin = null == (_config_plugins = config.plugins) ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
|
|
347
|
+
copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !external_node_fs_default().existsSync(pattern.context)) && (config.plugins = null == (_config_plugins1 = config.plugins) ? void 0 : _config_plugins1.filter((item)=>(null == item ? void 0 : item.constructor.name) !== 'CopyPlugin'));
|
|
339
348
|
});
|
|
340
349
|
}
|
|
341
350
|
}), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
|
|
@@ -401,12 +410,9 @@ var __webpack_exports__ = {};
|
|
|
401
410
|
})
|
|
402
411
|
};
|
|
403
412
|
};
|
|
404
|
-
})()
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
413
|
+
})(), exports.webpackProvider = __webpack_exports__.webpackProvider, __webpack_exports__)-1 === [
|
|
414
|
+
"webpackProvider"
|
|
415
|
+
].indexOf(__webpack_i__) && (exports[__webpack_i__] = __webpack_exports__[__webpack_i__]);
|
|
416
|
+
Object.defineProperty(exports, '__esModule', {
|
|
408
417
|
value: !0
|
|
409
418
|
});
|
|
410
|
-
|
|
411
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
412
|
-
0 && (module.exports = { webpackProvider: exports.webpackProvider });
|
package/dist/index.js
CHANGED
|
@@ -52,21 +52,19 @@ __webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
|
52
52
|
for(__webpack_runtime__ && __webpack_runtime__(__webpack_require__); i < __webpack_ids__.length; i++)chunkId = __webpack_ids__[i], __webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId] && installedChunks[chunkId][0](), installedChunks[__webpack_ids__[i]] = 0;
|
|
53
53
|
}, __webpack_require__.f.j = function(chunkId, promises) {
|
|
54
54
|
var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : void 0;
|
|
55
|
-
if (0 !== installedChunkData)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
promises.push(installedChunkData[1] = promise);
|
|
69
|
-
}
|
|
55
|
+
if (0 !== installedChunkData) if (installedChunkData) promises.push(installedChunkData[1]);
|
|
56
|
+
else {
|
|
57
|
+
var promise = import("./" + __webpack_require__.u(chunkId)).then(installChunk, (e)=>{
|
|
58
|
+
throw 0 !== installedChunks[chunkId] && (installedChunks[chunkId] = void 0), e;
|
|
59
|
+
}), promise = Promise.race([
|
|
60
|
+
promise,
|
|
61
|
+
new Promise((resolve)=>{
|
|
62
|
+
installedChunkData = installedChunks[chunkId] = [
|
|
63
|
+
resolve
|
|
64
|
+
];
|
|
65
|
+
})
|
|
66
|
+
]);
|
|
67
|
+
promises.push(installedChunkData[1] = promise);
|
|
70
68
|
}
|
|
71
69
|
};
|
|
72
70
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
@@ -118,7 +116,7 @@ async function modifyWebpackChain(context, utils, chain) {
|
|
|
118
116
|
utils
|
|
119
117
|
]
|
|
120
118
|
});
|
|
121
|
-
if (null
|
|
119
|
+
if (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpackChain) for (let item of castArray(utils.environment.config.tools.webpackChain))item(modifiedChain, utils);
|
|
122
120
|
return core_.logger.debug('modify webpack chain done'), modifiedChain;
|
|
123
121
|
}
|
|
124
122
|
async function modifyWebpackConfig(context, webpackConfig, utils) {
|
|
@@ -131,7 +129,7 @@ async function modifyWebpackConfig(context, webpackConfig, utils) {
|
|
|
131
129
|
utils
|
|
132
130
|
]
|
|
133
131
|
});
|
|
134
|
-
return (null
|
|
132
|
+
return (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpack) && (modifiedConfig = (0, __WEBPACK_EXTERNAL_MODULE_reduce_configs_02786df6__.reduceConfigsWithContext)({
|
|
135
133
|
initial: modifiedConfig,
|
|
136
134
|
config: utils.environment.config.tools.webpack,
|
|
137
135
|
ctx: utils,
|
|
@@ -229,8 +227,7 @@ async function createCompiler_createCompiler(options) {
|
|
|
229
227
|
};
|
|
230
228
|
}
|
|
231
229
|
let build = async (initOptions, { watch, compiler: customCompiler } = {})=>{
|
|
232
|
-
let compiler, bundlerConfigs;
|
|
233
|
-
let { helpers, context } = initOptions;
|
|
230
|
+
let compiler, bundlerConfigs, { helpers, context } = initOptions;
|
|
234
231
|
if (customCompiler) compiler = customCompiler;
|
|
235
232
|
else {
|
|
236
233
|
let result = await createCompiler_createCompiler(initOptions);
|
|
@@ -301,7 +298,7 @@ let getMainFields = (chain, target)=>{
|
|
|
301
298
|
if (progress) {
|
|
302
299
|
let { ProgressPlugin } = await Promise.all([
|
|
303
300
|
__webpack_require__.e("997"),
|
|
304
|
-
__webpack_require__.e("
|
|
301
|
+
__webpack_require__.e("812")
|
|
305
302
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
306
303
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
307
304
|
{
|
|
@@ -322,8 +319,8 @@ let getMainFields = (chain, target)=>{
|
|
|
322
319
|
}
|
|
323
320
|
}), api.modifyWebpackConfig(async (config)=>{
|
|
324
321
|
var _config_plugins, _config_plugins1;
|
|
325
|
-
let copyPlugin = null
|
|
326
|
-
copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default.existsSync(pattern.context)) && (config.plugins = null
|
|
322
|
+
let copyPlugin = null == (_config_plugins = config.plugins) ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
|
|
323
|
+
copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default.existsSync(pattern.context)) && (config.plugins = null == (_config_plugins1 = config.plugins) ? void 0 : _config_plugins1.filter((item)=>(null == item ? void 0 : item.constructor.name) !== 'CopyPlugin'));
|
|
327
324
|
});
|
|
328
325
|
}
|
|
329
326
|
}), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"picocolors": "^1.1.1",
|
|
30
30
|
"reduce-configs": "^1.1.0",
|
|
31
31
|
"tsconfig-paths-webpack-plugin": "4.2.0",
|
|
32
|
-
"webpack": "^5.
|
|
32
|
+
"webpack": "^5.99.8"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@rslib/core": "0.
|
|
36
|
-
"@types/node": "^22.
|
|
35
|
+
"@rslib/core": "0.7.0",
|
|
36
|
+
"@types/node": "^22.15.17",
|
|
37
37
|
"ansi-escapes": "4.3.2",
|
|
38
38
|
"cli-truncate": "2.1.0",
|
|
39
39
|
"patch-console": "1.0.0",
|
|
40
|
-
"typescript": "^5.8.
|
|
41
|
-
"@rsbuild/core": "1.3.
|
|
40
|
+
"typescript": "^5.8.3",
|
|
41
|
+
"@rsbuild/core": "1.3.20",
|
|
42
42
|
"@scripts/test-helper": "1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|