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 w/o build step #9116
feat(core): ability to run local nx plugins w/o build step #9116
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/9d2pv8JGLsXfDhVWtb6bkz1pDGBq [Deployment for 48d2390 canceled] |
54a92f5
to
4a21a0a
Compare
14a8ccd
to
abab329
Compare
abab329
to
2dd17ff
Compare
2dd17ff
to
5b08f31
Compare
f1b9ae3
to
fbecd34
Compare
fbecd34
to
0fa39d0
Compare
0fa39d0
to
1536e31
Compare
1536e31
to
3d52075
Compare
879987d
to
e849baa
Compare
e849baa
to
07b3d3a
Compare
07b3d3a
to
5974d12
Compare
929f3c5
to
48d2390
Compare
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. |
Current Behavior
Nx plugins are loaded through a combination of
require.resolve
and require. 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 (sometimes this is done by symlinking outputs to node_modules).This complicates the setup for workspace executors, as devs must set up an automated build before the command. This can be done either using targetDependencies or a clever post-install script, but neither is 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 run after each change.
Expected Behavior
Created nx plugins' functionality is available to the CLI, in the same manner, that an installed plugin would be.
e.g. this should work
Related Issue(s)
Fixes #8824
Fixes #3231
Fixes #6926
Fixes #7271
Fixes #7939
Fixes #6712
Fixes #7166
Fixes #5548