Skip to content

Commit a73cfa0

Browse files
sosukesuzukifisker
andauthored
Fix build script --report option (#15323)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
1 parent 941c6b3 commit a73cfa0

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

scripts/build/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ yarn build --report=all
7979
yarn build --report=stdout --report=text --report=html
8080
```
8181

82-
**`--report` equals to `--report=html`**
83-
8482
### `--minify` and `--no-minify`
8583

8684
By default, the file minification is controlled by `config.mjs` and `bundler.mjs`, these flags are added to override that behavior.

scripts/build/parse-arguments.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function parseArguments() {
3030
minify: values.minify ? true : values["no-minify"] ? false : undefined,
3131
clean: values.clean,
3232
saveAs: values["save-as"],
33-
report: values.report,
33+
reports: values.report,
3434
};
3535

3636
if (result.saveAs) {
@@ -59,14 +59,14 @@ function parseArguments() {
5959
}
6060
}
6161

62-
if (Array.isArray(result.report) && result.report.includes("all")) {
63-
if (result.report.length !== 1) {
62+
if (Array.isArray(result.reports) && result.reports.includes("all")) {
63+
if (result.reports.length !== 1) {
6464
throw new Error(
6565
"'--report=all' can not use with another '--report' flag",
6666
);
6767
}
6868

69-
result.report = ["html", "text", "stdin"];
69+
result.reports = ["html", "text", "stdout"];
7070
}
7171

7272
return result;

0 commit comments

Comments
 (0)