fix(react): allow for buildTargetWebpack to have an executor of @nx/webpack:webpack or @nx/rspack:rspack (#30253)
closed #30235 ## Current Behavior nxComponentTestingPreset for webpack cannot use rspack as an executor. ## Expected Behavior nxComponentTestingPreset for webpack can use webpack or rspack as an executor. ## Related Issue(s) #30235 Fixes #30235
This commit is contained in:
parent
438457ab12
commit
5f7d46354e
@ -237,11 +237,13 @@ function buildTargetWebpack(
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
buildableProjectConfig.targets[parsed.target].executor !==
|
buildableProjectConfig.targets[parsed.target].executor !==
|
||||||
'@nx/webpack:webpack'
|
'@nx/webpack:webpack' &&
|
||||||
|
buildableProjectConfig.targets[parsed.target].executor !==
|
||||||
|
'@nx/rspack:rspack'
|
||||||
) {
|
) {
|
||||||
throw new InvalidExecutorError(
|
throw new InvalidExecutorError(
|
||||||
`The '${parsed.target}' target of the '${parsed.project}' project is not using the '@nx/webpack:webpack' executor. ` +
|
`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' executor in that target to use Cypress Component Testing.`
|
`Please make sure to use '@nx/webpack:webpack' or '@nx/rspack:rspack' executor in that target to use Cypress Component Testing.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user