@nx/react 19.8.2 → 19.8.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "19.8.2",
3
+ "version": "19.8.3",
4
4
  "private": false,
5
5
  "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -34,18 +34,18 @@
34
34
  "dependencies": {
35
35
  "@phenomnomnominal/tsquery": "~5.0.1",
36
36
  "@svgr/webpack": "^8.0.1",
37
- "chalk": "^4.1.0",
38
37
  "file-loader": "^6.2.0",
39
38
  "minimatch": "9.0.3",
39
+ "picocolors": "^1.1.0",
40
40
  "tslib": "^2.3.0",
41
41
  "@module-federation/enhanced": "~0.6.0",
42
- "@nx/devkit": "19.8.2",
43
- "@nx/js": "19.8.2",
44
- "@nx/eslint": "19.8.2",
45
- "@nx/web": "19.8.2",
42
+ "@nx/devkit": "19.8.3",
43
+ "@nx/js": "19.8.3",
44
+ "@nx/eslint": "19.8.3",
45
+ "@nx/web": "19.8.3",
46
46
  "express": "^4.19.2",
47
47
  "http-proxy-middleware": "^3.0.0",
48
- "@nrwl/react": "19.8.2"
48
+ "@nrwl/react": "19.8.3"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
@@ -19,7 +19,7 @@ const maybe_js_1 = require("../../utils/maybe-js");
19
19
  const install_common_dependencies_1 = require("./lib/install-common-dependencies");
20
20
  const create_ts_config_1 = require("../../utils/create-ts-config");
21
21
  const add_swc_dependencies_1 = require("@nx/js/src/utils/swc/add-swc-dependencies");
22
- const chalk = require("chalk");
22
+ const pc = require("picocolors");
23
23
  const show_possible_warnings_1 = require("./lib/show-possible-warnings");
24
24
  const add_e2e_1 = require("./lib/add-e2e");
25
25
  const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
@@ -227,7 +227,7 @@ async function applicationGeneratorInternal(host, schema) {
227
227
  tasks.push(routingTask);
228
228
  (0, set_defaults_1.setDefaults)(host, options);
229
229
  if (options.bundler === 'rspack' && options.style === 'styled-jsx') {
230
- devkit_1.logger.warn(`${chalk.bold('styled-jsx')} is not supported by ${chalk.bold('Rspack')}. We've added ${chalk.bold('babel-loader')} to your project, but using babel will slow down your build.`);
230
+ devkit_1.logger.warn(`${pc.bold('styled-jsx')} is not supported by ${pc.bold('Rspack')}. We've added ${pc.bold('babel-loader')} to your project, but using babel will slow down your build.`);
231
231
  tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, {}, { 'babel-loader': versions_1.babelLoaderVersion }));
232
232
  host.write((0, devkit_1.joinPathFragments)(options.appProjectRoot, 'rspack.config.js'), (0, devkit_1.stripIndents) `
233
233
  const { composePlugins, withNx, withReact } = require('@nx/rspack');
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.showPossibleWarnings = showPossibleWarnings;
4
- const chalk = require("chalk");
4
+ const pc = require("picocolors");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  function showPossibleWarnings(tree, options) {
7
7
  if (options.style === 'styled-jsx' && options.compiler === 'swc') {
8
- devkit_1.logger.warn(`styled-jsx may not work with SWC. Try using ${chalk.bold('nx g @nx/react:app --compiler=babel')} instead.`);
8
+ devkit_1.logger.warn(`styled-jsx may not work with SWC. Try using ${pc.bold('nx g @nx/react:app --compiler=babel')} instead.`);
9
9
  }
10
10
  }
@@ -65,6 +65,12 @@ async function setupSsrGenerator(tree, options) {
65
65
  if (projectConfig.targets.build.options?.outputPath) {
66
66
  projectConfig.targets.build.options.outputPath = (0, devkit_1.joinPathFragments)(originalOutputPath, 'browser');
67
67
  }
68
+ if (projectConfig.targets.build.executor === '@nx/rspack:rspack') {
69
+ options.bundler = 'rspack';
70
+ }
71
+ else if (projectConfig.targets.build.executor === '@nx/webpack:webpack') {
72
+ options.bundler = 'webpack';
73
+ }
68
74
  projectConfig.targets = {
69
75
  ...projectConfig.targets,
70
76
  server: {