@rsbuild/webpack 1.0.6 → 1.0.8
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/index.cjs +8 -5
- package/dist/index.js +8 -5
- package/package.json +6 -3
package/dist/index.cjs
CHANGED
|
@@ -313,10 +313,13 @@ async function createCompiler(options) {
|
|
|
313
313
|
const { default: webpack2 } = await import("webpack");
|
|
314
314
|
const compiler = webpackConfigs.length === 1 ? webpack2(webpackConfigs[0]) : webpack2(webpackConfigs);
|
|
315
315
|
const done = (stats) => {
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
const statsOptions = getStatsOptions(compiler);
|
|
317
|
+
const statsJson = stats.toJson({
|
|
318
|
+
children: true,
|
|
319
|
+
...typeof statsOptions === "string" ? { preset: statsOptions } : { preset: "errors-warnings" },
|
|
320
|
+
...typeof statsOptions === "object" ? statsOptions : {}
|
|
321
|
+
});
|
|
322
|
+
const { message, level } = formatStats(statsJson, stats.hasErrors());
|
|
320
323
|
if (level === "error") {
|
|
321
324
|
import_core4.logger.error(message);
|
|
322
325
|
}
|
|
@@ -2465,7 +2468,7 @@ var init_build = __esm({
|
|
|
2465
2468
|
if (err) {
|
|
2466
2469
|
reject(err);
|
|
2467
2470
|
} else if (stats2?.hasErrors()) {
|
|
2468
|
-
reject(new Error("
|
|
2471
|
+
reject(new Error("Webpack build failed!"));
|
|
2469
2472
|
} else {
|
|
2470
2473
|
compiler.close((closeErr) => {
|
|
2471
2474
|
closeErr && import_core7.logger.error(closeErr);
|
package/dist/index.js
CHANGED
|
@@ -339,10 +339,13 @@ async function createCompiler(options) {
|
|
|
339
339
|
const { default: webpack2 } = await import("webpack");
|
|
340
340
|
const compiler = webpackConfigs.length === 1 ? webpack2(webpackConfigs[0]) : webpack2(webpackConfigs);
|
|
341
341
|
const done = (stats) => {
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
342
|
+
const statsOptions = getStatsOptions(compiler);
|
|
343
|
+
const statsJson = stats.toJson({
|
|
344
|
+
children: true,
|
|
345
|
+
...typeof statsOptions === "string" ? { preset: statsOptions } : { preset: "errors-warnings" },
|
|
346
|
+
...typeof statsOptions === "object" ? statsOptions : {}
|
|
347
|
+
});
|
|
348
|
+
const { message, level } = formatStats(statsJson, stats.hasErrors());
|
|
346
349
|
if (level === "error") {
|
|
347
350
|
logger3.error(message);
|
|
348
351
|
}
|
|
@@ -2514,7 +2517,7 @@ var init_build = __esm({
|
|
|
2514
2517
|
if (err) {
|
|
2515
2518
|
reject(err);
|
|
2516
2519
|
} else if (stats2?.hasErrors()) {
|
|
2517
|
-
reject(new Error("
|
|
2520
|
+
reject(new Error("Webpack build failed!"));
|
|
2518
2521
|
} else {
|
|
2519
2522
|
compiler.close((closeErr) => {
|
|
2520
2523
|
closeErr && logger6.error(closeErr);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"picocolors": "^1.1.0",
|
|
30
30
|
"reduce-configs": "^1.0.0",
|
|
31
31
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
32
|
-
"webpack": "^5.
|
|
33
|
-
"@rsbuild/core": "1.0.6"
|
|
32
|
+
"webpack": "^5.95.0"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@types/node": "18.x",
|
|
@@ -38,8 +37,12 @@
|
|
|
38
37
|
"cli-truncate": "2.1.0",
|
|
39
38
|
"patch-console": "1.0.0",
|
|
40
39
|
"typescript": "^5.5.2",
|
|
40
|
+
"@rsbuild/core": "1.0.8",
|
|
41
41
|
"@scripts/test-helper": "1.0.1"
|
|
42
42
|
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@rsbuild/core": "1.x"
|
|
45
|
+
},
|
|
43
46
|
"publishConfig": {
|
|
44
47
|
"access": "public",
|
|
45
48
|
"provenance": true,
|