-
Notifications
You must be signed in to change notification settings - Fork 136
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
Different behavior for same code: Single app & Monorepo #344
Comments
Isn't that because of the location-dependent behaviours? From the readme:
|
Probably yes, but I think it shouldn't affect detecting correct files because the same target file still has the same dependencies. Am I wrong? I have updated monorepo's examples with the options Next.js has "experimental.outputFileTracingRoot" and it still doesn't work perfectly for monorepos because of this issue... |
I think you're right, but this line seems to imply that the files it detects might be dependent on the cwd setting:
If that's the case, then we probably need to find the magical combination of callsite + cwd settings to give expected behaviour in any scenario. I'm really interested in seeing you succeed with this challenge for my own use-cases. Does the update you made to your examples give any different results to your initial reports? |
I'm working with monorepo of Next.js apps +
nx
and found some strange behavior, the filenext-i18next.config.js
(from thenext-i18next
package), which is used by an application, doesn't apply to the build.So I did some research and found that behavior for the package
@vercel/nft
is different when we run a script with the package to analyze files. I have written a small package with the same idea of files loading as thenext-i18next
package to show the issue and a few examples which are using the package.Script
Single application/package project
Monorepo from a project's root
Monorepo from an application's root
Path for the file
app.js
the same.Demo repos:
https://github.com/intpp/vercel-nft-demo
https://github.com/intpp/vercel-nft-workspace-demo
The text was updated successfully, but these errors were encountered: