@rsbuild/webpack 1.2.3 → 1.3.0-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/dist/{511.cjs → 81.cjs} +4 -5
- package/dist/{636.js → 945.js} +6 -6
- package/dist/997.cjs +4 -5
- package/dist/997.js +6 -6
- package/dist/index.cjs +11 -25
- package/dist/index.js +14 -28
- package/package.json +5 -5
package/dist/{511.cjs → 81.cjs}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
2
|
exports.ids = [
|
|
4
|
-
'
|
|
3
|
+
'81'
|
|
5
4
|
], exports.modules = {
|
|
6
5
|
"./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
6
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -170,7 +169,7 @@ exports.ids = [
|
|
|
170
169
|
let hrtime = process.hrtime(startTime), seconds = hrtime[0] + hrtime[1] / 1e9;
|
|
171
170
|
if (this.compileTime = this.prettyTime(seconds), startTime = null, !this.hasCompileErrors) {
|
|
172
171
|
let suffix = this.id ? external_picocolors_default().gray(` (${this.id})`) : '';
|
|
173
|
-
core_.logger.ready(`
|
|
172
|
+
core_.logger.ready(`built in ${this.compileTime} ${suffix}`);
|
|
174
173
|
}
|
|
175
174
|
}
|
|
176
175
|
});
|
|
@@ -182,8 +181,8 @@ exports.ids = [
|
|
|
182
181
|
let suffix = external_picocolors_default().gray(`(${id})`);
|
|
183
182
|
if (done) {
|
|
184
183
|
if (100 === prevPercentage) return;
|
|
185
|
-
prevPercentage = 100, hasErrors ? core_.logger.error(`
|
|
186
|
-
} else current - prevPercentage > 10 && (prevPercentage = current, core_.logger.info(`
|
|
184
|
+
prevPercentage = 100, hasErrors ? core_.logger.error(`built failed in ${compileTime} ${suffix}`) : core_.logger.ready(`built in ${compileTime} ${suffix}`);
|
|
185
|
+
} else current - prevPercentage > 10 && (prevPercentage = current, core_.logger.info(`build progress: ${current.toFixed(0)}% ${suffix}`));
|
|
187
186
|
}
|
|
188
187
|
}), friendlyPercentage = createFriendlyPercentage();
|
|
189
188
|
super({
|
package/dist/{636.js → 945.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const
|
|
2
|
-
'
|
|
1
|
+
export const __webpack_ids__ = [
|
|
2
|
+
'945'
|
|
3
3
|
];
|
|
4
|
-
export const
|
|
4
|
+
export const __webpack_modules__ = {
|
|
5
5
|
"./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
6
|
__webpack_require__.d(__webpack_exports__, {
|
|
7
7
|
ProgressPlugin: ()=>ProgressPlugin
|
|
@@ -169,7 +169,7 @@ export const modules = {
|
|
|
169
169
|
let hrtime = process.hrtime(startTime), seconds = hrtime[0] + hrtime[1] / 1e9;
|
|
170
170
|
if (this.compileTime = this.prettyTime(seconds), startTime = null, !this.hasCompileErrors) {
|
|
171
171
|
let suffix = this.id ? external_picocolors_.default.gray(` (${this.id})`) : '';
|
|
172
|
-
core_.logger.ready(`
|
|
172
|
+
core_.logger.ready(`built in ${this.compileTime} ${suffix}`);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
});
|
|
@@ -181,8 +181,8 @@ export const modules = {
|
|
|
181
181
|
let suffix = external_picocolors_.default.gray(`(${id})`);
|
|
182
182
|
if (done) {
|
|
183
183
|
if (100 === prevPercentage) return;
|
|
184
|
-
prevPercentage = 100, hasErrors ? core_.logger.error(`
|
|
185
|
-
} else current - prevPercentage > 10 && (prevPercentage = current, core_.logger.info(`
|
|
184
|
+
prevPercentage = 100, hasErrors ? core_.logger.error(`built failed in ${compileTime} ${suffix}`) : core_.logger.ready(`built in ${compileTime} ${suffix}`);
|
|
185
|
+
} else current - prevPercentage > 10 && (prevPercentage = current, core_.logger.info(`build progress: ${current.toFixed(0)}% ${suffix}`));
|
|
186
186
|
}
|
|
187
187
|
}), friendlyPercentage = createFriendlyPercentage();
|
|
188
188
|
super({
|
package/dist/997.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
let __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
2
1
|
exports.ids = [
|
|
3
2
|
'997'
|
|
4
3
|
], exports.modules = {
|
|
@@ -87,7 +86,7 @@ exports.ids = [
|
|
|
87
86
|
});
|
|
88
87
|
}, makeDynamicStyles = (wrap, targetSpace, identity, isBackground)=>{
|
|
89
88
|
void 0 === colorConvert && (colorConvert = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"));
|
|
90
|
-
let offset =
|
|
89
|
+
let offset = 10 * !!isBackground, styles = {};
|
|
91
90
|
for (let [sourceSpace, suite] of Object.entries(colorConvert)){
|
|
92
91
|
let name = 'ansi16' === sourceSpace ? 'ansi' : sourceSpace;
|
|
93
92
|
sourceSpace === targetSpace ? styles[name] = wrap(identity, offset) : 'object' == typeof suite && (styles[name] = wrap(suite[targetSpace], offset));
|
|
@@ -702,10 +701,10 @@ exports.ids = [
|
|
|
702
701
|
0xFF & integer
|
|
703
702
|
];
|
|
704
703
|
}, convert.rgb.hcg = function(rgb) {
|
|
705
|
-
let grayscale;
|
|
704
|
+
let grayscale, hue;
|
|
706
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;
|
|
707
706
|
return grayscale = chroma < 1 ? min / (1 - chroma) : 0, [
|
|
708
|
-
(chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma) / 6 % 1
|
|
707
|
+
360 * ((chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma) / 6 % 1),
|
|
709
708
|
100 * chroma,
|
|
710
709
|
100 * grayscale
|
|
711
710
|
];
|
|
@@ -1664,7 +1663,7 @@ exports.ids = [
|
|
|
1664
1663
|
},
|
|
1665
1664
|
"../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js": function(module) {
|
|
1666
1665
|
"use strict";
|
|
1667
|
-
let isFullwidthCodePoint = (codePoint)=>!Number.isNaN(codePoint) &&
|
|
1666
|
+
let isFullwidthCodePoint = (codePoint)=>!Number.isNaN(codePoint) && (codePoint >= 0x1100 && (codePoint <= 0x115F || 0x2329 === codePoint || 0x232A === codePoint || 0x2E80 <= codePoint && codePoint <= 0x3247 && 0x303F !== codePoint || 0x3250 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE6B || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x3FFFD) || !1);
|
|
1668
1667
|
module.exports = isFullwidthCodePoint, module.exports.default = isFullwidthCodePoint;
|
|
1669
1668
|
},
|
|
1670
1669
|
"../../../node_modules/.pnpm/patch-console@1.0.0/node_modules/patch-console/build/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
package/dist/997.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_ids__ = [
|
|
2
2
|
'997'
|
|
3
3
|
];
|
|
4
|
-
export const
|
|
4
|
+
export const __webpack_modules__ = {
|
|
5
5
|
"../../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js": function(module) {
|
|
6
6
|
let ansiEscapes = module.exports;
|
|
7
7
|
module.exports.default = ansiEscapes;
|
|
@@ -84,7 +84,7 @@ export const modules = {
|
|
|
84
84
|
});
|
|
85
85
|
}, makeDynamicStyles = (wrap, targetSpace, identity, isBackground)=>{
|
|
86
86
|
void 0 === colorConvert && (colorConvert = __webpack_require__("../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"));
|
|
87
|
-
let offset =
|
|
87
|
+
let offset = 10 * !!isBackground, styles = {};
|
|
88
88
|
for (let [sourceSpace, suite] of Object.entries(colorConvert)){
|
|
89
89
|
let name = 'ansi16' === sourceSpace ? 'ansi' : sourceSpace;
|
|
90
90
|
sourceSpace === targetSpace ? styles[name] = wrap(identity, offset) : 'object' == typeof suite && (styles[name] = wrap(suite[targetSpace], offset));
|
|
@@ -697,10 +697,10 @@ export const modules = {
|
|
|
697
697
|
0xFF & integer
|
|
698
698
|
];
|
|
699
699
|
}, convert.rgb.hcg = function(rgb) {
|
|
700
|
-
let grayscale;
|
|
700
|
+
let grayscale, hue;
|
|
701
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;
|
|
702
702
|
return grayscale = chroma < 1 ? min / (1 - chroma) : 0, [
|
|
703
|
-
(chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma) / 6 % 1
|
|
703
|
+
360 * ((chroma <= 0 ? 0 : max === r ? (g - b) / chroma % 6 : max === g ? 2 + (b - r) / chroma : 4 + (r - g) / chroma) / 6 % 1),
|
|
704
704
|
100 * chroma,
|
|
705
705
|
100 * grayscale
|
|
706
706
|
];
|
|
@@ -1656,7 +1656,7 @@ export const modules = {
|
|
|
1656
1656
|
};
|
|
1657
1657
|
},
|
|
1658
1658
|
"../../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js": function(module) {
|
|
1659
|
-
let isFullwidthCodePoint = (codePoint)=>!Number.isNaN(codePoint) &&
|
|
1659
|
+
let isFullwidthCodePoint = (codePoint)=>!Number.isNaN(codePoint) && (codePoint >= 0x1100 && (codePoint <= 0x115F || 0x2329 === codePoint || 0x232A === codePoint || 0x2E80 <= codePoint && codePoint <= 0x3247 && 0x303F !== codePoint || 0x3250 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE6B || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x3FFFD) || !1);
|
|
1660
1660
|
module.exports = isFullwidthCodePoint, module.exports.default = isFullwidthCodePoint;
|
|
1661
1661
|
},
|
|
1662
1662
|
"../../../node_modules/.pnpm/patch-console@1.0.0/node_modules/patch-console/build/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
package/dist/index.cjs
CHANGED
|
@@ -42,46 +42,32 @@ function __webpack_require__(moduleId) {
|
|
|
42
42
|
};
|
|
43
43
|
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.loaded = !0, module.exports;
|
|
44
44
|
}
|
|
45
|
-
__webpack_require__.m = __webpack_modules__, __webpack_require__.n =
|
|
46
|
-
var getter = module && module.__esModule ?
|
|
47
|
-
return module.default;
|
|
48
|
-
} : function() {
|
|
49
|
-
return module;
|
|
50
|
-
};
|
|
45
|
+
__webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
46
|
+
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
51
47
|
return __webpack_require__.d(getter, {
|
|
52
48
|
a: getter
|
|
53
49
|
}), getter;
|
|
54
|
-
}, __webpack_require__.d =
|
|
50
|
+
}, __webpack_require__.d = (exports1, definition)=>{
|
|
55
51
|
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
|
|
56
52
|
enumerable: !0,
|
|
57
53
|
get: definition[key]
|
|
58
54
|
});
|
|
59
|
-
}, __webpack_require__.f = {}, __webpack_require__.e =
|
|
60
|
-
return Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {
|
|
61
|
-
return __webpack_require__.f[key](chunkId, promises), promises;
|
|
62
|
-
}, []));
|
|
63
|
-
}, __webpack_require__.u = function(chunkId) {
|
|
64
|
-
return "" + chunkId + ".cjs";
|
|
65
|
-
}, __webpack_require__.o = function(obj, prop) {
|
|
66
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
67
|
-
}, __webpack_require__.r = function(exports1) {
|
|
55
|
+
}, __webpack_require__.f = {}, __webpack_require__.e = (chunkId)=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key)=>(__webpack_require__.f[key](chunkId, promises), promises), [])), __webpack_require__.u = (chunkId)=>"" + chunkId + ".cjs", __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
68
56
|
'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
69
57
|
value: 'Module'
|
|
70
58
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
71
59
|
value: !0
|
|
72
60
|
});
|
|
73
|
-
}, __webpack_require__.nmd =
|
|
74
|
-
return module.paths = [], module.children || (module.children = []), module;
|
|
75
|
-
}, (()=>{
|
|
61
|
+
}, __webpack_require__.nmd = (module)=>(module.paths = [], module.children || (module.children = []), module), (()=>{
|
|
76
62
|
var installedChunks = {
|
|
77
63
|
980: 1
|
|
78
|
-
}, installChunk =
|
|
64
|
+
}, installChunk = (chunk)=>{
|
|
79
65
|
var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;
|
|
80
66
|
for(var moduleId in moreModules)__webpack_require__.o(moreModules, moduleId) && (__webpack_require__.m[moduleId] = moreModules[moduleId]);
|
|
81
67
|
runtime && runtime(__webpack_require__);
|
|
82
68
|
for(var i = 0; i < chunkIds.length; i++)installedChunks[chunkIds[i]] = 1;
|
|
83
69
|
};
|
|
84
|
-
__webpack_require__.f.require =
|
|
70
|
+
__webpack_require__.f.require = (chunkId, promises)=>{
|
|
85
71
|
installedChunks[chunkId] || installChunk(require("./" + __webpack_require__.u(chunkId)));
|
|
86
72
|
};
|
|
87
73
|
})();
|
|
@@ -234,11 +220,11 @@ var __webpack_exports__ = {};
|
|
|
234
220
|
preset: 'errors-warnings',
|
|
235
221
|
...statsOptions
|
|
236
222
|
}), { message, level } = helpers.formatStats(statsJson, stats.hasErrors());
|
|
237
|
-
'error' === level
|
|
223
|
+
'error' === level ? core_.logger.error(message) : 'warning' === level && core_.logger.warn(message);
|
|
238
224
|
};
|
|
239
225
|
return compiler.hooks.done.tap('rsbuild:done', (stats)=>{
|
|
240
226
|
done(stats);
|
|
241
|
-
}), 'dev' === context.
|
|
227
|
+
}), 'dev' === context.action && helpers.registerDevHook({
|
|
242
228
|
compiler,
|
|
243
229
|
context,
|
|
244
230
|
bundlerConfigs: webpackConfigs,
|
|
@@ -276,7 +262,7 @@ var __webpack_exports__ = {};
|
|
|
276
262
|
};
|
|
277
263
|
let { stats } = await new Promise((resolve, reject)=>{
|
|
278
264
|
compiler.run((err, stats)=>{
|
|
279
|
-
err ? reject(err) : (null == stats ? void 0 : stats.hasErrors()) ? reject(Error('
|
|
265
|
+
err ? reject(err) : (null == stats ? void 0 : stats.hasErrors()) ? reject(Error('webpack build failed.')) : compiler.close((closeErr)=>{
|
|
280
266
|
closeErr && core_.logger.error(closeErr), resolve({
|
|
281
267
|
stats
|
|
282
268
|
});
|
|
@@ -327,7 +313,7 @@ var __webpack_exports__ = {};
|
|
|
327
313
|
if (progress) {
|
|
328
314
|
let { ProgressPlugin } = await Promise.all([
|
|
329
315
|
__webpack_require__.e("997"),
|
|
330
|
-
__webpack_require__.e("
|
|
316
|
+
__webpack_require__.e("81")
|
|
331
317
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
332
318
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
333
319
|
{
|
package/dist/index.js
CHANGED
|
@@ -34,46 +34,32 @@ function __webpack_require__(moduleId) {
|
|
|
34
34
|
};
|
|
35
35
|
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.loaded = !0, module.exports;
|
|
36
36
|
}
|
|
37
|
-
__webpack_require__.m = __webpack_modules__, __webpack_require__.n =
|
|
38
|
-
var getter = module && module.__esModule ?
|
|
39
|
-
return module.default;
|
|
40
|
-
} : function() {
|
|
41
|
-
return module;
|
|
42
|
-
};
|
|
37
|
+
__webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
38
|
+
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
43
39
|
return __webpack_require__.d(getter, {
|
|
44
40
|
a: getter
|
|
45
41
|
}), getter;
|
|
46
|
-
}, __webpack_require__.d =
|
|
42
|
+
}, __webpack_require__.d = (exports, definition)=>{
|
|
47
43
|
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key) && Object.defineProperty(exports, key, {
|
|
48
44
|
enumerable: !0,
|
|
49
45
|
get: definition[key]
|
|
50
46
|
});
|
|
51
|
-
}, __webpack_require__.f = {}, __webpack_require__.e =
|
|
52
|
-
return Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {
|
|
53
|
-
return __webpack_require__.f[key](chunkId, promises), promises;
|
|
54
|
-
}, []));
|
|
55
|
-
}, __webpack_require__.u = function(chunkId) {
|
|
56
|
-
return "" + chunkId + ".js";
|
|
57
|
-
}, __webpack_require__.o = function(obj, prop) {
|
|
58
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
59
|
-
}, __webpack_require__.nmd = function(module) {
|
|
60
|
-
return module.paths = [], module.children || (module.children = []), module;
|
|
61
|
-
}, installedChunks = {
|
|
47
|
+
}, __webpack_require__.f = {}, __webpack_require__.e = (chunkId)=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key)=>(__webpack_require__.f[key](chunkId, promises), promises), [])), __webpack_require__.u = (chunkId)=>"" + chunkId + ".js", __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.nmd = (module)=>(module.paths = [], module.children || (module.children = []), module), installedChunks = {
|
|
62
48
|
980: 0
|
|
63
|
-
}, installChunk =
|
|
64
|
-
var moduleId, chunkId,
|
|
65
|
-
for(moduleId in
|
|
66
|
-
for(
|
|
49
|
+
}, installChunk = (data)=>{
|
|
50
|
+
var moduleId, chunkId, __webpack_ids__ = data.__webpack_ids__, __webpack_modules__ = data.__webpack_modules__, __webpack_runtime__ = data.__webpack_runtime__, i = 0;
|
|
51
|
+
for(moduleId in __webpack_modules__)__webpack_require__.o(__webpack_modules__, moduleId) && (__webpack_require__.m[moduleId] = __webpack_modules__[moduleId]);
|
|
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;
|
|
67
53
|
}, __webpack_require__.f.j = function(chunkId, promises) {
|
|
68
54
|
var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : void 0;
|
|
69
55
|
if (0 !== installedChunkData) {
|
|
70
56
|
if (installedChunkData) promises.push(installedChunkData[1]);
|
|
71
57
|
else {
|
|
72
|
-
var promise = import("./" + __webpack_require__.u(chunkId)).then(installChunk,
|
|
58
|
+
var promise = import("./" + __webpack_require__.u(chunkId)).then(installChunk, (e)=>{
|
|
73
59
|
throw 0 !== installedChunks[chunkId] && (installedChunks[chunkId] = void 0), e;
|
|
74
60
|
}), promise = Promise.race([
|
|
75
61
|
promise,
|
|
76
|
-
new Promise(
|
|
62
|
+
new Promise((resolve)=>{
|
|
77
63
|
installedChunkData = installedChunks[chunkId] = [
|
|
78
64
|
resolve
|
|
79
65
|
];
|
|
@@ -225,11 +211,11 @@ async function createCompiler_createCompiler(options) {
|
|
|
225
211
|
preset: 'errors-warnings',
|
|
226
212
|
...statsOptions
|
|
227
213
|
}), { message, level } = helpers.formatStats(statsJson, stats.hasErrors());
|
|
228
|
-
'error' === level
|
|
214
|
+
'error' === level ? core_.logger.error(message) : 'warning' === level && core_.logger.warn(message);
|
|
229
215
|
};
|
|
230
216
|
return compiler.hooks.done.tap('rsbuild:done', (stats)=>{
|
|
231
217
|
done(stats);
|
|
232
|
-
}), 'dev' === context.
|
|
218
|
+
}), 'dev' === context.action && helpers.registerDevHook({
|
|
233
219
|
compiler,
|
|
234
220
|
context,
|
|
235
221
|
bundlerConfigs: webpackConfigs,
|
|
@@ -267,7 +253,7 @@ let build = async (initOptions, { watch, compiler: customCompiler } = {})=>{
|
|
|
267
253
|
};
|
|
268
254
|
let { stats } = await new Promise((resolve, reject)=>{
|
|
269
255
|
compiler.run((err, stats)=>{
|
|
270
|
-
err ? reject(err) : (null == stats ? void 0 : stats.hasErrors()) ? reject(Error('
|
|
256
|
+
err ? reject(err) : (null == stats ? void 0 : stats.hasErrors()) ? reject(Error('webpack build failed.')) : compiler.close((closeErr)=>{
|
|
271
257
|
closeErr && core_.logger.error(closeErr), resolve({
|
|
272
258
|
stats
|
|
273
259
|
});
|
|
@@ -315,7 +301,7 @@ let getMainFields = (chain, target)=>{
|
|
|
315
301
|
if (progress) {
|
|
316
302
|
let { ProgressPlugin } = await Promise.all([
|
|
317
303
|
__webpack_require__.e("997"),
|
|
318
|
-
__webpack_require__.e("
|
|
304
|
+
__webpack_require__.e("945")
|
|
319
305
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
320
306
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
321
307
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "1.2
|
|
3
|
+
"version": "1.3.0-beta.2",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"webpack": "^5.98.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@rslib/core": "0.
|
|
36
|
-
"@types/node": "^22.13.
|
|
35
|
+
"@rslib/core": "0.5.5",
|
|
36
|
+
"@types/node": "^22.13.11",
|
|
37
37
|
"ansi-escapes": "4.3.2",
|
|
38
38
|
"cli-truncate": "2.1.0",
|
|
39
39
|
"patch-console": "1.0.0",
|
|
40
|
-
"typescript": "^5.
|
|
41
|
-
"@rsbuild/core": "1.2
|
|
40
|
+
"typescript": "^5.8.2",
|
|
41
|
+
"@rsbuild/core": "1.3.0-beta.2",
|
|
42
42
|
"@scripts/test-helper": "1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|