@nx/rspack 22.2.1 → 22.2.3

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": "22.2.1",
4
+ "version": "22.2.3",
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/devkit": "22.2.1",
28
- "@nx/js": "22.2.1",
29
- "@nx/module-federation": "22.2.1",
30
- "@nx/web": "22.2.1",
27
+ "@nx/devkit": "22.2.3",
28
+ "@nx/js": "22.2.3",
29
+ "@nx/module-federation": "22.2.3",
30
+ "@nx/web": "22.2.3",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.5.2",
33
33
  "@rspack/dev-server": "^1.1.4",
@@ -57,8 +57,8 @@
57
57
  "webpack-node-externals": "^3.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "nx": "22.2.1",
61
- "@nx/nest": "22.2.1"
60
+ "nx": "22.2.3",
61
+ "@nx/nest": "22.2.3"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@module-federation/enhanced": "^0.21.2",
@@ -228,9 +228,11 @@ function applyNxDependentConfig(options, config, { useNormalizedEntry } = {}) {
228
228
  };
229
229
  // When using TS solution setup, enable build mode to generate declaration files
230
230
  // This prevents TS6305 errors when declaration files are expected but missing
231
- // from module federation remote imports
231
+ // from module federation remote imports but disable emitting tsbuildinfo files
232
+ // so that tsc builds are not affected.
232
233
  if (isUsingTsSolution) {
233
234
  pluginConfig.typescript.build = true;
235
+ pluginConfig.typescript.mode = 'readonly';
234
236
  }
235
237
  plugins.push(new TsCheckerRspackPlugin(pluginConfig));
236
238
  }
@@ -348,11 +348,12 @@ function getClientEnvironment(mode) {
348
348
  return env;
349
349
  }, {});
350
350
  // Stringify all values so we can feed into rspack DefinePlugin
351
- const stringified = {
352
- 'process.env': Object.keys(raw).reduce((env, key) => {
353
- env[key] = JSON.stringify(raw[key]);
354
- return env;
355
- }, {}),
356
- };
351
+ const stringified = Object.keys(raw).reduce((env, key) => {
352
+ env[`process.env.${key}`] = JSON.stringify(raw[key]);
353
+ return env;
354
+ },
355
+ // Provide a fallback for process.env itself to handle cases where code
356
+ // accesses process.env directly (e.g., in Cypress component testing)
357
+ { 'process.env': '{}' });
357
358
  return { stringified };
358
359
  }
@@ -33,11 +33,12 @@ function getClientEnvironment(mode) {
33
33
  return env;
34
34
  }, {});
35
35
  // Stringify all values so we can feed into rspack DefinePlugin
36
- const stringified = {
37
- 'process.env': Object.keys(raw).reduce((env, key) => {
38
- env[key] = JSON.stringify(raw[key]);
39
- return env;
40
- }, {}),
41
- };
36
+ const stringified = Object.keys(raw).reduce((env, key) => {
37
+ env[`process.env.${key}`] = JSON.stringify(raw[key]);
38
+ return env;
39
+ },
40
+ // Provide a fallback for process.env itself to handle cases where code
41
+ // accesses process.env directly (e.g., in Cypress component testing)
42
+ { 'process.env': '{}' });
42
43
  return { stringified };
43
44
  }