Skip to content

Commit

Permalink
feat(react): add @nx/web as a dependency since it is needed by cypres…
Browse files Browse the repository at this point in the history
…s/jest/etc.
  • Loading branch information
jaysoo committed Apr 19, 2023
1 parent 2e97962 commit 7436ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/generators/application/lib/add-cypress.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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',
Expand Down

0 comments on commit 7436ab7

Please sign in to comment.