Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react): allow for buildTargetWebpack to have an executor of @nx/webpack:webpack or @nx/rspack:rspack #30253

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
8 changes: 5 additions & 3 deletions packages/react/plugins/component-testing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,13 @@ function buildTargetWebpack(

if (
buildableProjectConfig.targets[parsed.target].executor !==
'@nx/webpack:webpack'
'@nx/webpack:webpack' &&
buildableProjectConfig.targets[parsed.target].executor !==
'@nx/rspack:rspack'
) {
throw new InvalidExecutorError(
`The '${parsed.target}' target of the '${parsed.project}' project is not using the '@nx/webpack:webpack' executor. ` +
`Please make sure to use '@nx/webpack:webpack' executor in that target to use Cypress Component Testing.`
`The '${parsed.target}' target of the '${parsed.project}' project is not using the '@nx/webpack:webpack' or '@nx/rspack:rspack' executor. ` +
`Please make sure to use '@nx/webpack:webpack' or '@nx/rspack:rspack' executor in that target to use Cypress Component Testing.`
);
}

Expand Down