@rspack/cli 2.0.0-rc.2 → 2.0.0
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/162.js +3 -2
- package/package.json +6 -6
package/dist/162.js
CHANGED
|
@@ -844,7 +844,7 @@ function normalizeHotOption(value) {
|
|
|
844
844
|
class ServeCommand {
|
|
845
845
|
async apply(cli) {
|
|
846
846
|
const command = cli.program.command('serve', 'run the rspack dev server.').alias('server').alias('s').alias('dev');
|
|
847
|
-
commonOptionsForBuildAndServe(commonOptions(command)).option('--hot [mode]', 'enables hot module replacement').option('--port <port>', 'allows to specify a port to use').option('--host <host>', 'allows to specify a hostname to use');
|
|
847
|
+
commonOptionsForBuildAndServe(commonOptions(command)).option('--hot [mode]', 'enables hot module replacement').option('--port <port>', 'allows to specify a port to use').option('--host <host>', 'allows to specify a hostname to use').option('--open [value]', 'open browser on server start; pass --no-open to disable, or --open <url> to open a specific URL');
|
|
848
848
|
command.action(cli.wrapAction(async (cliOptions)=>{
|
|
849
849
|
setDefaultNodeEnv(cliOptions, 'development');
|
|
850
850
|
normalizeCommonOptions(cliOptions, 'serve');
|
|
@@ -910,6 +910,7 @@ class ServeCommand {
|
|
|
910
910
|
devServerOptions.hot = cliOptions.hot ?? devServerOptions.hot ?? true;
|
|
911
911
|
devServerOptions.host = cliOptions.host || devServerOptions.host;
|
|
912
912
|
devServerOptions.port = cliOptions.port ?? devServerOptions.port;
|
|
913
|
+
if (void 0 !== cliOptions.open) devServerOptions.open = cliOptions.open;
|
|
913
914
|
if (false !== devServerOptions.client) {
|
|
914
915
|
if (true === devServerOptions.client || null == devServerOptions.client) devServerOptions.client = {};
|
|
915
916
|
devServerOptions.client = {
|
|
@@ -1131,7 +1132,7 @@ class RspackCLI {
|
|
|
1131
1132
|
this.colors = this.createColors();
|
|
1132
1133
|
this.program = program;
|
|
1133
1134
|
program.help();
|
|
1134
|
-
program.version("2.0.0
|
|
1135
|
+
program.version("2.0.0");
|
|
1135
1136
|
}
|
|
1136
1137
|
wrapAction(fn) {
|
|
1137
1138
|
return (...args)=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/cli",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "CLI for rspack",
|
|
5
5
|
"homepage": "https://rspack.rs",
|
|
6
6
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@discoveryjs/json-ext": "^0.5.7",
|
|
32
|
-
"@rslib/core": "0.21.
|
|
33
|
-
"@rspack/dev-server": "2.0.0
|
|
32
|
+
"@rslib/core": "0.21.2",
|
|
33
|
+
"@rspack/dev-server": "^2.0.0",
|
|
34
34
|
"cac": "^7.0.0",
|
|
35
35
|
"concat-stream": "^2.0.0",
|
|
36
36
|
"cross-env": "^10.1.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"exit-hook": "^4.0.0",
|
|
39
39
|
"jiti": "^2.6.1",
|
|
40
40
|
"prebundle": "^1.6.4",
|
|
41
|
-
"typescript": "^6.0.
|
|
42
|
-
"@rspack/core": "2.0.0
|
|
43
|
-
"@rspack/test-tools": "2.0.0
|
|
41
|
+
"typescript": "^6.0.3",
|
|
42
|
+
"@rspack/core": "2.0.0",
|
|
43
|
+
"@rspack/test-tools": "2.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@rspack/core": "^2.0.0-0",
|