-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Webpack (and other executors) use the current target when generating a temporary tsconfig. #21395
Comments
Thanks for reporting this! Could you try running the build setting the |
hey @statop! 👋🏻 Have you tried running your builds with the |
I see. It seems you have a project depending on another project that's not a library. That said, we have a bug and are incorrectly handling this scenario. I'm pushing a fix for that. Once it's released, I'll let you know so you can try again with the env var. |
hey @statop! The fix was released in Nx 18.0.6. Could you give it another go using that version and running your build with |
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. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
If I use
@nx/webpack:webpack
in a target other than 'build' withbuildLibsFromSource: false
then it will use that other target when calculating the dependencies for generating the temporary tsonfig.Expected Behavior
If I use
@nx/webpack:webpack
in a target other than 'build' withbuildLibsFromSource: false
then it will use the 'build' target when calculating the dependencies for generating the temporary tsonfig.GitHub Repo
No response
Steps to Reproduce
@nx/webpack:webpack
in a target other than 'build' withbuildLibsFromSource: false
Note that the temporary tsconfig only contains mappings to the dist folder to dependencies that also have that target.
Nx Report
Failure Logs
No response
Package Manager Version
pnpm 8.14.3
Operating System
Additional Information
This problem exists with any executor that uses temporary tsconfigs.
The webpack dev server does this correctly, https://github.com/nrwl/nx/blob/master/packages/webpack/src/executors/dev-server/dev-server.impl.ts#L57
Alternatively, there needs to be a way to tell the executor what build target to use for calculating dependencies.
The text was updated successfully, but these errors were encountered: