diff --git a/packages/playwright/src/plugins/plugin.spec.ts b/packages/playwright/src/plugins/plugin.spec.ts index 4c83d5ab39e4b..1e9f75c95c670 100644 --- a/packages/playwright/src/plugins/plugin.spec.ts +++ b/packages/playwright/src/plugins/plugin.spec.ts @@ -61,6 +61,11 @@ describe('@nx/playwright/plugin', () => { "inputs": [ "default", "^production", + { + "externalDependencies": [ + "@playwright/test", + ], + }, ], "metadata": { "description": "Runs Playwright Tests", @@ -82,6 +87,11 @@ describe('@nx/playwright/plugin', () => { "inputs": [ "default", "^production", + { + "externalDependencies": [ + "@playwright/test", + ], + }, ], "metadata": { "description": "Runs Playwright Tests in CI", @@ -133,6 +143,11 @@ describe('@nx/playwright/plugin', () => { "inputs": [ "default", "^production", + { + "externalDependencies": [ + "@playwright/test", + ], + }, ], "metadata": { "description": "Runs Playwright Tests", @@ -157,6 +172,11 @@ describe('@nx/playwright/plugin', () => { "inputs": [ "default", "^production", + { + "externalDependencies": [ + "@playwright/test", + ], + }, ], "metadata": { "description": "Runs Playwright Tests in CI", @@ -230,6 +250,11 @@ describe('@nx/playwright/plugin', () => { "inputs": [ "default", "^production", + { + "externalDependencies": [ + "@playwright/test", + ], + }, ], "metadata": { "description": "Runs Playwright Tests in CI", @@ -249,6 +274,11 @@ describe('@nx/playwright/plugin', () => { "inputs": [ "default", "^production", + { + "externalDependencies": [ + "@playwright/test", + ], + }, ], "metadata": { "description": "Runs Playwright Tests in tests/run-me.spec.ts in CI", @@ -271,6 +301,11 @@ describe('@nx/playwright/plugin', () => { "inputs": [ "default", "^production", + { + "externalDependencies": [ + "@playwright/test", + ], + }, ], "metadata": { "description": "Runs Playwright Tests in tests/run-me-2.spec.ts in CI", diff --git a/packages/playwright/src/plugins/plugin.ts b/packages/playwright/src/plugins/plugin.ts index b27a4b4cc475d..c8057e54d7222 100644 --- a/packages/playwright/src/plugins/plugin.ts +++ b/packages/playwright/src/plugins/plugin.ts @@ -130,10 +130,12 @@ async function buildPlaywrightTargets( targets[options.targetName] = { ...baseTargetConfig, cache: true, - inputs: - 'production' in namedInputs + inputs: [ + ...('production' in namedInputs ? ['default', '^production'] - : ['default', '^default'], + : ['default', '^default']), + { externalDependencies: ['@playwright/test'] }, + ], outputs: getOutputs(projectRoot, playwrightConfig), }; @@ -141,10 +143,12 @@ async function buildPlaywrightTargets( const ciBaseTargetConfig: TargetConfiguration = { ...baseTargetConfig, cache: true, - inputs: - 'production' in namedInputs + inputs: [ + ...('production' in namedInputs ? ['default', '^production'] - : ['default', '^default'], + : ['default', '^default']), + { externalDependencies: ['@playwright/test'] }, + ], outputs: getOutputs(projectRoot, playwrightConfig), }; diff --git a/packages/remix/src/plugins/__snapshots__/plugin.spec.ts.snap b/packages/remix/src/plugins/__snapshots__/plugin.spec.ts.snap index 5c699c988a110..c62b4f292a5a9 100644 --- a/packages/remix/src/plugins/__snapshots__/plugin.spec.ts.snap +++ b/packages/remix/src/plugins/__snapshots__/plugin.spec.ts.snap @@ -15,6 +15,11 @@ exports[`@nx/remix/plugin non-root project should create nodes 1`] = ` "inputs": [ "production", "^production", + { + "externalDependencies": [ + "@remix-run/dev", + ], + }, ], "options": { "cwd": "my-app", @@ -54,6 +59,11 @@ exports[`@nx/remix/plugin non-root project should create nodes 1`] = ` "inputs": [ "production", "^production", + { + "externalDependencies": [ + "typescript", + ], + }, ], "options": { "cwd": "my-app", @@ -80,6 +90,11 @@ exports[`@nx/remix/plugin root project should create nodes 1`] = ` "inputs": [ "production", "^production", + { + "externalDependencies": [ + "@remix-run/dev", + ], + }, ], "options": { "cwd": ".", @@ -119,6 +134,11 @@ exports[`@nx/remix/plugin root project should create nodes 1`] = ` "inputs": [ "production", "^production", + { + "externalDependencies": [ + "typescript", + ], + }, ], "options": { "cwd": ".", diff --git a/packages/remix/src/plugins/plugin.ts b/packages/remix/src/plugins/plugin.ts index 1677a37ed0698..e244d5c74e55e 100644 --- a/packages/remix/src/plugins/plugin.ts +++ b/packages/remix/src/plugins/plugin.ts @@ -151,6 +151,7 @@ function buildTarget( ...('production' in namedInputs ? ['production', '^production'] : ['default', '^default']), + { externalDependencies: ['@remix-run/dev'] }, ], outputs: [serverBuildOutputPath, assetsBuildOutputPath], command: 'remix build', @@ -198,6 +199,7 @@ function typecheckTarget( ...('production' in namedInputs ? ['production', '^production'] : ['default', '^default']), + { externalDependencies: ['typescript'] }, ], options: { cwd: projectRoot, diff --git a/packages/rollup/src/plugins/__snapshots__/plugin.spec.ts.snap b/packages/rollup/src/plugins/__snapshots__/plugin.spec.ts.snap index fc1af6b0ad57b..c33b815791263 100644 --- a/packages/rollup/src/plugins/__snapshots__/plugin.spec.ts.snap +++ b/packages/rollup/src/plugins/__snapshots__/plugin.spec.ts.snap @@ -15,6 +15,11 @@ exports[`@nx/rollup/plugin non-root project should create nodes 1`] = ` "inputs": [ "production", "^production", + { + "externalDependencies": [ + "rollup", + ], + }, ], "options": { "cwd": "mylib", @@ -45,6 +50,11 @@ exports[`@nx/rollup/plugin root project should create nodes 1`] = ` "inputs": [ "production", "^production", + { + "externalDependencies": [ + "rollup", + ], + }, ], "options": { "cwd": ".", diff --git a/packages/rollup/src/plugins/plugin.ts b/packages/rollup/src/plugins/plugin.ts index 6c91222caf705..a65b15b6968ba 100644 --- a/packages/rollup/src/plugins/plugin.ts +++ b/packages/rollup/src/plugins/plugin.ts @@ -111,6 +111,7 @@ async function buildRollupTarget( ...('production' in namedInputs ? ['production', '^production'] : ['default', '^default']), + { externalDependencies: ['rollup'] }, ], outputs, };