You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have a local (nx plugin) generator that imports from @nx/devkit it also compiles and executes the barrel file (index.ts/js) in your tmp folder. It doesn't matter if the tmp folder is ignored (git) / excluded (tsconfig).
When the imports of @nx/devkit are removed from the generator the console.log from the tmp folder is not shown anymore.
result:
The issue is very specific to index (barrel) files in the tmp folder. If I rename the folder to for example 'temp' or the file to main.ts the console.log is not displayed.
Expected Behavior
I would not expect the tmp/index.ts file to be compiled/executed when I run a generator.
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
Current Behavior
When you have a local (nx plugin) generator that imports from @nx/devkit it also compiles and executes the barrel file (index.ts/js) in your
tmp
folder. It doesn't matter if thetmp
folder is ignored (git) / excluded (tsconfig).To illustrate the issue I created an example repo (https://github.com/Roozenboom/nx-examples/tree/local-generator-tmp-index) that has a nx plugin with a simple generator and a
tmp/index.ts
file that only does a console.log. When the generator is executed the console.log is also displayed.When the imports of
@nx/devkit
are removed from the generator the console.log from the tmp folder is not shown anymore.result:
The issue is very specific to index (barrel) files in the tmp folder. If I rename the folder to for example 'temp' or the file to main.ts the console.log is not displayed.
Expected Behavior
I would not expect the
tmp/index.ts
file to be compiled/executed when I run a generator.GitHub Repo
nrwl/nx-examples#297
Steps to Reproduce
https://github.com/Roozenboom/nx-examples/tree/local-generator-tmp-index
yarn install
yarn nx g @nx-example/local-nx-plugin:example-generator test --dry-run
Files to check are:
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: