@rspack/cli 0.4.3 → 0.4.4-canary-5eb224a-20231220085045

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.
@@ -128,6 +128,11 @@ class RspackCLI {
128
128
  main: defaultEntryPath
129
129
  };
130
130
  }
131
+ // to set output.path
132
+ item.output = item.output || {};
133
+ if (options['output-path']) {
134
+ item.output.path = path_1.default.resolve(process.cwd(), options['output-path']);
135
+ }
131
136
  if (options.analyze) {
132
137
  const { BundleAnalyzerPlugin } = await import("webpack-bundle-analyzer");
133
138
  ((_a = item.plugins) !== null && _a !== void 0 ? _a : (item.plugins = [])).push({
package/dist/types.d.ts CHANGED
@@ -30,6 +30,7 @@ export interface RspackBuildCLIOptions extends RspackCLIOptions {
30
30
  analyze?: boolean;
31
31
  env?: Record<string, any>;
32
32
  nodeEnv?: string;
33
+ "output-path"?: string;
33
34
  }
34
35
  export interface RspackPreviewCLIOptions extends RspackCLIOptions {
35
36
  dir?: string;
@@ -1,5 +1,5 @@
1
1
  import yargs from "yargs";
2
- export declare const commonOptions: (yargs: yargs.Argv<{}>) => yargs.Argv<yargs.Omit<{}, "config" | "env" | "entry" | "watch" | "mode" | "devtool" | "node-env" | "configName"> & yargs.InferredOptionTypes<{
2
+ export declare const commonOptions: (yargs: yargs.Argv<{}>) => yargs.Argv<yargs.Omit<{}, "config" | "env" | "entry" | "watch" | "mode" | "devtool" | "output-path" | "node-env" | "configName"> & yargs.InferredOptionTypes<{
3
3
  config: {
4
4
  g: boolean;
5
5
  type: "string";
@@ -11,6 +11,10 @@ export declare const commonOptions: (yargs: yargs.Argv<{}>) => yargs.Argv<yargs.
11
11
  string: true;
12
12
  describe: string;
13
13
  };
14
+ "output-path": {
15
+ type: "string";
16
+ describe: string;
17
+ };
14
18
  mode: {
15
19
  type: "string";
16
20
  describe: string;
@@ -14,6 +14,10 @@ const commonOptions = (yargs) => {
14
14
  string: true,
15
15
  describe: "entry file"
16
16
  },
17
+ "output-path": {
18
+ type: "string",
19
+ describe: "output path dir"
20
+ },
17
21
  mode: { type: "string", describe: "mode" },
18
22
  watch: {
19
23
  type: "boolean",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/cli",
3
- "version": "0.4.3",
3
+ "version": "0.4.4-canary-5eb224a-20231220085045",
4
4
  "license": "MIT",
5
5
  "description": "CLI for rspack",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "internal-ip": "6.2.0",
31
31
  "source-map-support": "^0.5.19",
32
32
  "ts-node": "10.9.1",
33
- "@rspack/core": "0.4.3"
33
+ "@rspack/core": "0.4.4-canary-5eb224a-20231220085045"
34
34
  },
35
35
  "dependencies": {
36
36
  "@discoveryjs/json-ext": "^0.5.7",
@@ -41,7 +41,7 @@
41
41
  "semver": "6.3.1",
42
42
  "webpack-bundle-analyzer": "4.6.1",
43
43
  "yargs": "17.6.2",
44
- "@rspack/dev-server": "0.4.3"
44
+ "@rspack/dev-server": "0.4.4-canary-5eb224a-20231220085045"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "rimraf dist/ && tsc -b ./tsconfig.build.json --force",