@rspack/cli 1.4.0-beta.0 → 1.4.0-rc.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/README.md +1 -1
- package/dist/index.js +10 -13
- package/dist/index.mjs +14 -17
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -443,19 +443,16 @@ var __webpack_exports__ = {};
|
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
const result = compilerForDevServer.options.devServer ??= {};
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
];
|
|
457
|
-
};
|
|
458
|
-
}
|
|
446
|
+
const setupMiddlewares = result.setupMiddlewares;
|
|
447
|
+
const lazyCompileMiddleware = core_.rspack.experiments.lazyCompilationMiddleware(compiler);
|
|
448
|
+
result.setupMiddlewares = (middlewares, server)=>{
|
|
449
|
+
let finalMiddlewares = middlewares;
|
|
450
|
+
if (setupMiddlewares) finalMiddlewares = setupMiddlewares(finalMiddlewares, server);
|
|
451
|
+
return [
|
|
452
|
+
lazyCompileMiddleware,
|
|
453
|
+
...finalMiddlewares
|
|
454
|
+
];
|
|
455
|
+
};
|
|
459
456
|
result.hot = options.hot ?? result.hot ?? true;
|
|
460
457
|
result.host = options.host || result.host;
|
|
461
458
|
result.port = options.port || result.port;
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__ from "@rspack/core";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import node_util from "node:util";
|
|
5
5
|
import { createColors, isColorSupported } from "colorette";
|
|
6
|
-
import
|
|
6
|
+
import yargs_0 from "yargs";
|
|
7
7
|
import { hideBin } from "yargs/helpers";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
|
9
9
|
var __webpack_modules__ = {
|
|
@@ -408,19 +408,16 @@ class ServeCommand {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
const result = compilerForDevServer.options.devServer ??= {};
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
];
|
|
422
|
-
};
|
|
423
|
-
}
|
|
411
|
+
const setupMiddlewares = result.setupMiddlewares;
|
|
412
|
+
const lazyCompileMiddleware = core_.rspack.experiments.lazyCompilationMiddleware(compiler);
|
|
413
|
+
result.setupMiddlewares = (middlewares, server)=>{
|
|
414
|
+
let finalMiddlewares = middlewares;
|
|
415
|
+
if (setupMiddlewares) finalMiddlewares = setupMiddlewares(finalMiddlewares, server);
|
|
416
|
+
return [
|
|
417
|
+
lazyCompileMiddleware,
|
|
418
|
+
...finalMiddlewares
|
|
419
|
+
];
|
|
420
|
+
};
|
|
424
421
|
result.hot = options.hot ?? result.hot ?? true;
|
|
425
422
|
result.host = options.host || result.host;
|
|
426
423
|
result.port = options.port || result.port;
|
|
@@ -623,7 +620,7 @@ class RspackCLI {
|
|
|
623
620
|
}
|
|
624
621
|
getLogger() {
|
|
625
622
|
return {
|
|
626
|
-
error: (val)=>console.error(`[rspack-cli] ${this.colors.red(
|
|
623
|
+
error: (val)=>console.error(`[rspack-cli] ${this.colors.red(node_util.format(val))}`),
|
|
627
624
|
warn: (val)=>console.warn(`[rspack-cli] ${this.colors.yellow(val)}`),
|
|
628
625
|
info: (val)=>console.info(`[rspack-cli] ${this.colors.cyan(val)}`),
|
|
629
626
|
success: (val)=>console.log(`[rspack-cli] ${this.colors.green(val)}`),
|
|
@@ -736,7 +733,7 @@ class RspackCLI {
|
|
|
736
733
|
_define_property(this, "colors", void 0);
|
|
737
734
|
_define_property(this, "program", void 0);
|
|
738
735
|
this.colors = this.createColors();
|
|
739
|
-
this.program =
|
|
736
|
+
this.program = yargs_0();
|
|
740
737
|
}
|
|
741
738
|
}
|
|
742
739
|
function defineConfig(config) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/cli",
|
|
3
|
-
"version": "1.4.0-
|
|
3
|
+
"version": "1.4.0-rc.0",
|
|
4
4
|
"description": "CLI for rspack",
|
|
5
5
|
"homepage": "https://rspack.rs",
|
|
6
6
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"yargs": "17.7.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@rslib/core": "0.
|
|
41
|
+
"@rslib/core": "0.10.0",
|
|
42
42
|
"@types/interpret": "^1.1.3",
|
|
43
43
|
"@types/rechoir": "^0.6.4",
|
|
44
44
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"execa": "^5.1.1",
|
|
49
49
|
"ts-node": "^10.9.2",
|
|
50
50
|
"typescript": "^5.8.3",
|
|
51
|
-
"@rspack/core": "1.4.0-
|
|
51
|
+
"@rspack/core": "1.4.0-rc.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@rspack/core": "^1.0.0-alpha || ^1.x"
|