diff --git a/packages/react/package.json b/packages/react/package.json index d8a0568ca77de..c904471494c36 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -38,7 +38,8 @@ "minimatch": "3.0.5", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", - "@nx/linter": "file:../linter" + "@nx/linter": "file:../linter", + "@nx/web": "file:../web" }, "publishConfig": { "access": "public" diff --git a/packages/react/src/generators/application/lib/add-cypress.ts b/packages/react/src/generators/application/lib/add-cypress.ts index ac5cfc1052cbf..2886adb0e480b 100644 --- a/packages/react/src/generators/application/lib/add-cypress.ts +++ b/packages/react/src/generators/application/lib/add-cypress.ts @@ -1,4 +1,5 @@ -import { ensurePackage, joinPathFragments, Tree } from '@nx/devkit'; +import { ensurePackage, Tree } from '@nx/devkit'; +import { webStaticServeGenerator } from '@nx/web'; import { nxVersion } from '../../../utils/versions'; import { NormalizedSchema } from '../schema'; @@ -7,7 +8,6 @@ export async function addCypress(host: Tree, options: NormalizedSchema) { return () => {}; } - const { webStaticServeGenerator } = ensurePackage('@nx/web', nxVersion); await webStaticServeGenerator(host, { buildTarget: `${options.projectName}:build`, targetName: 'serve-static',