Skip to content

Commit

Permalink
fix(testing): remove dependency on @nx/vite and @nx/webpack from @nx/…
Browse files Browse the repository at this point in the history
…playwright (#30023)
  • Loading branch information
AgentEnder authored Feb 13, 2025
1 parent b5df8c2 commit 9234241
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 7 additions & 1 deletion packages/playwright/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
"error",
{
"buildTargets": ["build-base"],
"ignoredDependencies": ["nx", "typescript", "@playwright/test"]
"ignoredDependencies": [
"nx",
"typescript",
"@playwright/test",
"@nx/webpack",
"@nx/vite"
]
}
]
}
Expand Down
2 changes: 0 additions & 2 deletions packages/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
"@phenomnomnominal/tsquery": "~5.0.1",
"@nx/devkit": "file:../devkit",
"@nx/eslint": "file:../eslint",
"@nx/webpack": "file:../webpack",
"@nx/vite": "file:../vite",
"@nx/js": "file:../js",
"tslib": "^2.3.0",
"minimatch": "9.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import type { ConfigurationResult } from 'nx/src/project-graph/utils/project-con
import { LoadedNxPlugin } from 'nx/src/project-graph/plugins/loaded-nx-plugin';
import { retrieveProjectConfigurations } from 'nx/src/project-graph/utils/retrieve-workspace-files';
import { ProjectConfigurationsError } from 'nx/src/project-graph/error-types';
import { createNodesV2 as webpackCreateNodesV2 } from '@nx/webpack/src/plugins/plugin';
import { createNodesV2 as viteCreateNodesV2 } from '@nx/vite/plugin';
import type { Node } from 'typescript';

export default async function (tree: Tree) {
Expand Down Expand Up @@ -129,8 +127,11 @@ export default async function (tree: Tree) {
? 'serveStaticTargetName'
: 'previewTargetName',
projectToMigrate.configFileType === 'webpack'
? webpackCreateNodesV2
: viteCreateNodesV2
? (
require('@nx/webpack/plugin') as typeof import('@nx/webpack/plugin')
).createNodesV2
: (require('@nx/vite/plugin') as typeof import('@nx/vite/plugin'))
.createNodesV2
)) ??
getServeStaticLikeTarget(
tree,
Expand Down

0 comments on commit 9234241

Please sign in to comment.