Open dr3 opened 1 week ago
Hey @dr3 did you just notice this behavior starting recently or has it been persisting for a long time?
Hey @dr3 did you just notice this behavior starting recently or has it been persisting for a long time?
@lynnshaoyu Ive tested on 14.1.0
and 18.1.0
and it happens on both
Im testing via referencing a fragment in a node_module by name and getting Undefined fragment ...
error
Then running this is to replace symlinks with actual files
cp -Lr node_modules/@component-library/apple node_modules/@component-library/appleCopy && rm node_modules/@component-library/apple && mv node_modules/@component-library/appleCopy node_modules/@component-library/apple
And the error disappears
Does node-linker=hoisted
fix the problem?
Issue
All files that are symlinked are ignored by relay-compiler.
This includes files found via
src
in single project repos andgeneratedSources
in multi project reposThis means that while its common to exclude
"**/node_modules/**"
, if you dont want to, and use pnpm (which uses symlinks) its impossible for relay to discover your filesExpected behaviour
Either by default, or via a flag, relay compiler sees and resolves symlinked files as if they were standard files