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

feat(core): ability to run local nx plugins #9029

Closed
wants to merge 1 commit into from

Conversation

AgentEnder
Copy link
Member

@AgentEnder AgentEnder commented Feb 18, 2022

Current Behavior

Nx plugins are loaded through a combination of require.resolve and require. In order for this to work for plugins that were created and live as a project in the workspace, that project must be built and available via NODE_PATH (sometime's done by symlinking outputs to node_modules).

This complicates the setup for workspace executors, as dev's must setup some kind of automated build before the command. This can be done either using targetDependencies or a clever post install script, but neither are really ideal.

  • Using target dependencies, you have to set this up for every target name that a custom executor will be used for
  • Using post install scripts, or prepare npm scripts, means that the script has to be ran after each change.

Expected Behavior

Created nx plugins' functionality is available to the CLI, in the same manner that an installed plugin would be.

Related Issue(s)

Fixes #8824
Fixes #3231

@nx-cloud
Copy link

nx-cloud bot commented Feb 18, 2022

Nx Cloud Report

CI is running for commit fdf3de5.

📂 Click to track the progress, see the status, the terminal output, and the build insights.


Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Feb 18, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/GDhxAA47weuUmARykYBhJ3AtoSW7
✅ Preview: Canceled

[Deployment for fdf3de5 canceled]

@AgentEnder AgentEnder marked this pull request as ready for review February 22, 2022 18:16
@AgentEnder
Copy link
Member Author

CC @vsavkin @FrozenPandaz whenever either of you are ready to review ping me, I'd like to talk through some of the changes on this one.

@AgentEnder
Copy link
Member Author

Superceded by #9116

@AgentEnder AgentEnder closed this Feb 24, 2022
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant