@rspack/cli 0.3.7 → 0.3.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/commands/build.js
CHANGED
package/dist/commands/preview.js
CHANGED
|
@@ -29,7 +29,7 @@ class PreviewCommand {
|
|
|
29
29
|
// find the possible devServer config
|
|
30
30
|
config = config.find(item => item.devServer) || config[0];
|
|
31
31
|
const devServerOptions = config.devServer;
|
|
32
|
-
|
|
32
|
+
const compiler = (0, core_1.rspack)({ entry: {} });
|
|
33
33
|
if (!compiler)
|
|
34
34
|
return;
|
|
35
35
|
try {
|
package/dist/rspack-cli.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import yargs from "yargs";
|
|
2
2
|
import { RspackBuildCLIOptions, RspackCLIColors, RspackCLILogger, RspackCLIOptions } from "./types";
|
|
3
|
-
import { RspackOptions, MultiCompiler,
|
|
3
|
+
import { RspackOptions, MultiCompiler, MultiRspackOptions, Stats, MultiStats, Compiler } from "@rspack/core";
|
|
4
4
|
import type { RspackPluginInstance, RspackPluginFunction } from "@rspack/core";
|
|
5
5
|
type Command = "serve" | "build";
|
|
6
6
|
export declare class RspackCLI {
|
|
7
7
|
colors: RspackCLIColors;
|
|
8
|
-
program: yargs.Argv
|
|
8
|
+
program: yargs.Argv;
|
|
9
9
|
constructor();
|
|
10
10
|
createCompiler(options: RspackBuildCLIOptions, rspackCommand: Command, callback?: (e: Error, res?: Stats | MultiStats) => void): Promise<MultiCompiler | Compiler | null>;
|
|
11
11
|
createColors(useColor?: boolean): RspackCLIColors;
|
|
@@ -9,7 +9,7 @@ const readPackageUp = (cwd = process.cwd()) => {
|
|
|
9
9
|
let currentDir = path_1.default.resolve(cwd);
|
|
10
10
|
let packageJsonPath = path_1.default.join(currentDir, "package.json");
|
|
11
11
|
while (!fs_1.default.existsSync(packageJsonPath)) {
|
|
12
|
-
|
|
12
|
+
const parentDir = path_1.default.dirname(currentDir);
|
|
13
13
|
if (parentDir === currentDir) {
|
|
14
14
|
return null;
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
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.8",
|
|
41
|
+
"@rspack/dev-server": "0.3.8"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "rimraf dist/ && tsc -b ./tsconfig.build.json --force",
|