@rspack/cli 0.3.2 → 0.3.3-canary-0f5a67f-20230913040612
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/rspack-cli.d.ts +1 -1
- package/dist/utils/profile.js +32 -0
- package/package.json +3 -3
package/dist/rspack-cli.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import yargs from "yargs";
|
|
2
2
|
import { RspackBuildCLIOptions, RspackCLIColors, RspackCLILogger, RspackCLIOptions } from "./types";
|
|
3
3
|
import { RspackOptions, MultiCompiler, Compiler, MultiRspackOptions, Stats, MultiStats } from "@rspack/core";
|
|
4
|
-
import { RspackPluginInstance, RspackPluginFunction } from "@rspack/core";
|
|
4
|
+
import type { RspackPluginInstance, RspackPluginFunction } from "@rspack/core";
|
|
5
5
|
type Command = "serve" | "build";
|
|
6
6
|
export declare class RspackCLI {
|
|
7
7
|
colors: RspackCLIColors;
|
package/dist/utils/profile.js
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
The full syntax, remember update this when you change something in this file.
|
|
4
|
+
|
|
5
|
+
`RSPACK_PROFILE='TRACE=filter=trace&output=./rspack.trace&layer=chrome|JSCPU=output=./rspack.jscpuprofile|LOGGING=output=./rspack.logging' rspack build`
|
|
6
|
+
^----------------------------------------------: querystring syntax trace options
|
|
7
|
+
^: | is a delimiter for different profile options
|
|
8
|
+
^---------------------------------: querystring syntax js cpuprofile options
|
|
9
|
+
^: | is a delimiter for different profile options
|
|
10
|
+
^------------------------------: querystring syntax stats.logging options
|
|
11
|
+
^-----------: trace filter, default to `trace`, more syntax: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax
|
|
12
|
+
^--------------------: trace output, `stderr`, `stdout`, or a file path, default to `./.rspack-profile-${timestamp}/trace.json` for layer `chrome` and default to `stdout` for layer `logger`
|
|
13
|
+
^-----------: trace layer, `chrome` or `logger`, default to `chrome`
|
|
14
|
+
^---------------------------: js cpuprofile output, `stderr`, `stdout`, or a file path, default to `./.rspack-profile-${timestamp}/jscpuprofile.json`
|
|
15
|
+
^----------------------: stats.logging output, default to `./.rspack-profile-${timestamp}/logging.json`
|
|
16
|
+
|
|
17
|
+
`RSPACK_PROFILE='TRACE=filter=trace&output=./rspack.trace&layer=chrome' rspack build`: only enable trace
|
|
18
|
+
|
|
19
|
+
`RSPACK_PROFILE=TRACE rspack build`: only enable trace, and use default options for trace
|
|
20
|
+
|
|
21
|
+
`RSPACK_PROFILE='JSCPU=output=./rspack.jscpuprofile' rspack build`: only enable js cpuprofile
|
|
22
|
+
|
|
23
|
+
`RSPACK_PROFILE=JSCPU rspack build`: only enable js cpuprofile, and use default options for js cpuprofile
|
|
24
|
+
|
|
25
|
+
`RSPACK_PROFILE='LOGGING=output=./rspack.logging' rspack build`: only enable stats.logging
|
|
26
|
+
|
|
27
|
+
`RSPACK_PROFILE=LOGGING rspack build`: only enable stats.logging, and use default options for stats.logging
|
|
28
|
+
|
|
29
|
+
`RSPACK_PROFILE=ALL rspack build`: enable all, and use default options
|
|
30
|
+
|
|
31
|
+
`RSPACK_PROFILE=[rspack_node,rspack_core] rspack build`: enable all, but customize trace filter
|
|
32
|
+
|
|
33
|
+
*/
|
|
2
34
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3-canary-0f5a67f-20230913040612",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "CLI for rspack",
|
|
6
6
|
"bin": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"semver": "6.3.1",
|
|
38
38
|
"webpack-bundle-analyzer": "4.6.1",
|
|
39
39
|
"yargs": "17.6.2",
|
|
40
|
-
"@rspack/core": "0.3.
|
|
41
|
-
"@rspack/dev-server": "0.3.
|
|
40
|
+
"@rspack/core": "0.3.3-canary-0f5a67f-20230913040612",
|
|
41
|
+
"@rspack/dev-server": "0.3.3-canary-0f5a67f-20230913040612"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "rimraf dist/ && tsc -b ./tsconfig.build.json --force",
|