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
Hola 👋 , I discovered an issue with @no_inline directive. Basically, it works well when you use it on a simple fragment (it generates the *$normalization.graphql.js file and corresponding requires as expected). However, when the fragment is used somewhere further away (say in __tests__ or in some other distant location) it still generates the normalization file nearby the fragment but the requires are pointing to a non-existing file.
I can imagine how this would work with Haste or artifacts directory without any issues, yes. So this issue might be more like a feature request: to support @no_inline with the default Relay OSS configuration (CommonJS, no artifacts directory).
Personally, I do not want to use the artifacts directory but I can imagine having one directory for these normalization files to simplify the whole situation (so the files are not all over the place).
josephsavona
changed the title
Relay 13: @no_inline directive doesn't work correctly for distant fragments
Relay 13: @no_inline directive doesn't work correctly for fragments in a different directory (non-Haste mode)
Jan 12, 2022
Hola 👋 , I discovered an issue with
@no_inline
directive. Basically, it works well when you use it on a simple fragment (it generates the*$normalization.graphql.js
file and corresponding requires as expected). However, when the fragment is used somewhere further away (say in__tests__
or in some other distant location) it still generates the normalization file nearby the fragment but the requires are pointing to a non-existing file.For example:
The requires are correct under
__generated__
but they are wrong under__tests__/__generated__
because the require looks like this:I hope it's understandable what I am trying to describe. 😬
The text was updated successfully, but these errors were encountered: