Replies: 3 comments
-
|
The fragment is bundled because standalone fragments with |
Beta Was this translation helpful? Give feedback.
-
|
Hi ! Thanks for your reply. I use standalone fragments because i've been following fragment masking strategy recommended with client preset. If I remove SWC plugin, i'll see all graphql documents again in my bundle My goal was :
I thought this plugin would allow me to achieve these 2 targets ? If not, what would you recommend ? |
Beta Was this translation helpful? Give feedback.
-
|
are standalone fragments still needed when one uses strict persisted documents ? couldn't we just remove them from generated or are there edge cases that i'm not aware of ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi !
I've tried a simple POC.
It contains 2 queries and 1 fragment :
If i use following config :
(no
persisted documentin this config yet).i generate code, then build my front using
vitewith that config :I get these bits in my bundle :
I can see the 2 queries and the fragment as well. That's OK.
Now, if I add :
to my
codegen config,I execute
codegenagain, and then again build my app, I still get this bit un my bundle :Querieshave disappeared as expected.But I still see my
fragment, and don't understand why.It shouldn't be bundled in my app anymore.
Generated
persisted-documents.jsonincludes everything expected :I can share a reproduction repo if needed.
I don't know if it's an issue or not, maybe i'm missing something.
Any help will be greatly appreciated !
Beta Was this translation helpful? Give feedback.
All reactions