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
At the moment, the exchange is a no-op when NODE_ENV is production. There are use cases where you want to keep this enabled in prod -- to analyse the requests/responses.
We could change the API of the exchange to be a higher order function that accepts a new config option enabled?: boolean which defaults to NODE_ENV !== 'production'.
This will allow people to control when the exchange is and isn't in affect.
Willing to PR if you think this is a good idea.
The text was updated successfully, but these errors were encountered:
Actually, thinking about this again, would it better to just remove the checks entirely and defer this to userland? E.g. the user simply puts a conditional in their exchanges array .
I think this removes any elements of surprise and it doesn't set a precedence. It also means we don't have a no-op pipe there when its off.
We're open for a PR to do this in @urql/devtools. The thing is that in Production you'll be lacking display names for your components since you are minified anyway.
At the moment, the exchange is a no-op when
NODE_ENV
is production. There are use cases where you want to keep this enabled in prod -- to analyse the requests/responses.We could change the API of the exchange to be a higher order function that accepts a new config option
enabled?: boolean
which defaults toNODE_ENV !== 'production'
.This will allow people to control when the exchange is and isn't in affect.
Willing to PR if you think this is a good idea.
The text was updated successfully, but these errors were encountered: