From a18adb7a988fe9debef3b98df2627d1460d170cf Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Thu, 10 Oct 2024 15:47:36 -0700 Subject: [PATCH] fix(react): depends on migration should ignore configs that point to @nx/react #28377 (#28382) ## Current Behavior Some executors using `@nx/webpack:webpack` point to a webpack config that is exported from the `@nx/react plugin. We do not want to try modify this. ## Expected Behavior Skip the migration if the webpack config points to the exported plugin from @nx/react. ## Related Issue(s) Fixes #28377 --- .../src/migrations/update-19-6-1/ensure-depends-on-for-mf.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.ts b/packages/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.ts index 6a5b54c3b3ebb..a675e249a1e4f 100644 --- a/packages/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.ts +++ b/packages/react/src/migrations/update-19-6-1/ensure-depends-on-for-mf.ts @@ -9,7 +9,7 @@ export default async function (tree: Tree) { '@nx/webpack:webpack', (options, projectName, targetName) => { const webpackConfig: string = options.webpackConfig; - if (!webpackConfig) { + if (!webpackConfig || webpackConfig === '@nx/react/plugins/webpack') { return; }