@nx/react 17.2.0-beta.11 → 17.2.0-beta.14

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": "17.2.0-beta.11",
3
+ "version": "17.2.0-beta.14",
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, 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": {
@@ -37,11 +37,11 @@
37
37
  "file-loader": "^6.2.0",
38
38
  "minimatch": "3.0.5",
39
39
  "tslib": "^2.3.0",
40
- "@nx/devkit": "17.2.0-beta.11",
41
- "@nx/js": "17.2.0-beta.11",
42
- "@nx/eslint": "17.2.0-beta.11",
43
- "@nx/web": "17.2.0-beta.11",
44
- "@nrwl/react": "17.2.0-beta.11"
40
+ "@nx/devkit": "17.2.0-beta.14",
41
+ "@nx/js": "17.2.0-beta.14",
42
+ "@nx/eslint": "17.2.0-beta.14",
43
+ "@nx/web": "17.2.0-beta.14",
44
+ "@nrwl/react": "17.2.0-beta.14"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -147,6 +147,9 @@ async function* moduleFederationDevServer(options, context) {
147
147
  if (remotePort >= portToUse) {
148
148
  return remotePort + 1;
149
149
  }
150
+ else {
151
+ return portToUse;
152
+ }
150
153
  }, options.staticRemotesPort);
151
154
  }
152
155
  await buildStaticRemotes(remotes, nxBin, context, options);
@@ -5,10 +5,12 @@ const devkit_1 = require("@nx/devkit");
5
5
  const web_1 = require("@nx/web");
6
6
  const versions_1 = require("../../../utils/versions");
7
7
  const has_webpack_plugin_1 = require("../../../utils/has-webpack-plugin");
8
+ const has_vite_plugin_1 = require("../../../utils/has-vite-plugin");
8
9
  async function addE2e(tree, options) {
9
10
  switch (options.e2eTestRunner) {
10
11
  case 'cypress': {
11
- if (!(0, has_webpack_plugin_1.hasWebpackPlugin)(tree)) {
12
+ if ((options.bundler === 'webpack' && !(0, has_webpack_plugin_1.hasWebpackPlugin)(tree)) ||
13
+ (options.bundler === 'vite' && !(0, has_vite_plugin_1.hasVitePlugin)(tree))) {
12
14
  (0, web_1.webStaticServeGenerator)(tree, {
13
15
  buildTarget: `${options.projectName}:build`,
14
16
  targetName: 'serve-static',
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export declare function hasVitePlugin(tree: Tree): boolean;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hasVitePlugin = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ function hasVitePlugin(tree) {
6
+ const nxJson = (0, devkit_1.readNxJson)(tree);
7
+ return !!nxJson.plugins?.some((p) => typeof p === 'string'
8
+ ? p === '@nx/vite/plugin'
9
+ : p.plugin === '@nx/vite/plugin');
10
+ }
11
+ exports.hasVitePlugin = hasVitePlugin;