-
Notifications
You must be signed in to change notification settings - Fork 12.8k
When monorepo like packages are linked through symlink and are not built editor cant resolve modules #34723
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
Comments
Have investigated this and currently we are not handling symlinks.. If the resolution happens to be looking at the output path for the referenced project, we make sure that the answer to fileExists and directory Exits is true so that the resolution uses the output file even when its not present. |
How hard is it to provide a flag here to traverse symlinks? I think this would enable a lot of monorepos to use this feature directly without resorting to the hack of the main field being |
This applies to yarn workspaces (since symlinks are used under the cover) and it would be extremely useful to have them supported. Currently we still have to build manually.. |
Update: nevermind, @sheetalkamat actually has a good fix for this and I've verified that this WORKS |
Component commits: 06fda26 Fix incorrect outDir usage instead of out 66f1a79 Handle symlinks of packages in mono repo like packages Fixes microsoft#34723
@sheetalkamat - I am trying this out and noticed that it doesn't work in the case of things that are imported from the outDir rather than the src (in the case of a monorepo):
For a quick way to verify this, I prepared a monorepo for you to check it out:
https://github.com/kenotron/TypeScriptMonoRepo/tree/ts3.7
Things work okay if you do "yarn && yarn build", but if I understand this feature, it is meant to address the case where you can start editing in VS Code with Intellisense even before having to build something because we're traversing source rather than output.
Originally posted by @kenotron in #32028 (comment)
The text was updated successfully, but these errors were encountered: