Skip to content

Commit 9cd7579

Browse files
authored
fix(core): ensure local plugin is transpiled when using index files (#30133)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> In some use cases the local plugins generators and executors are not transpiled, which causes an error when you execute them. see for example ![Screenshot 2025-02-21 at 09 07 10](https://github.com/user-attachments/assets/1fd03a4b-1ac4-4827-b240-b4ea88d491a2) This issue is introduced by this PR #29539 and is actually a regression of an error we had in NX 18, see #22958 ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> This PR fixes this issue by updating the if statement to register the typescript transpiler when this is not done yet. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #30132
1 parent 4bd6477 commit 9cd7579

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nx/src/project-graph/plugins/in-process-loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function readPluginPackageJson(
4242
localPluginPath.path,
4343
'package.json'
4444
);
45-
if (pluginTranspilerIsRegistered()) {
45+
if (!pluginTranspilerIsRegistered()) {
4646
registerPluginTSTranspiler();
4747
}
4848
return {

0 commit comments

Comments
 (0)