@nx/rspack 21.2.3 → 21.2.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "21.2.3",
4
+ "version": "21.2.4",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/js": "21.2.3",
28
- "@nx/devkit": "21.2.3",
29
- "@nx/web": "21.2.3",
30
- "@nx/module-federation": "21.2.3",
27
+ "@nx/js": "21.2.4",
28
+ "@nx/devkit": "21.2.4",
29
+ "@nx/web": "21.2.4",
30
+ "@nx/module-federation": "21.2.4",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.3.8",
33
33
  "@rspack/dev-server": "^1.1.1",
@@ -58,6 +58,9 @@ function getDevServerOptions(root, serveOptions, buildOptions) {
58
58
  config.server.options = getSslConfig(root, serveOptions);
59
59
  }
60
60
  }
61
+ if (serveOptions.proxyConfig) {
62
+ config.proxy = getProxyConfig(root, serveOptions);
63
+ }
61
64
  return config;
62
65
  }
63
66
  function getSslConfig(root, options) {
@@ -66,3 +69,7 @@ function getSslConfig(root, options) {
66
69
  cert: (0, fs_1.readFileSync)(path.resolve(root, options.sslCert), 'utf-8'),
67
70
  };
68
71
  }
72
+ function getProxyConfig(root, options) {
73
+ const proxyPath = path.resolve(root, options.proxyConfig);
74
+ return require(proxyPath);
75
+ }
@@ -8,5 +8,6 @@ export interface DevServerExecutorSchema {
8
8
  ssl?: boolean;
9
9
  sslKey?: string;
10
10
  sslCert?: string;
11
+ proxyConfig?: string;
11
12
  publicHost?: string;
12
13
  }
@@ -37,6 +37,11 @@
37
37
  "type": "string",
38
38
  "description": "SSL certificate to use for serving `HTTPS`."
39
39
  },
40
+ "proxyConfig": {
41
+ "type": "string",
42
+ "description": "Path to proxy configuration file. For more information, see https://rspack.rs/config/dev-server#devserverproxy.",
43
+ "x-completion-type": "file"
44
+ },
40
45
  "publicHost": {
41
46
  "type": "string",
42
47
  "description": "Public URL where the application will be served."