The Readme states the the module should be installed as a dev-dependency.
But if one follows that then it's no longer possible to do either:
import { gql } from 'nuxt-graphql-request';
or
import { gql } from 'graphql-request';
in a Vue component with only production dependencies, while handling the SSR request since both of those imports are not installed and the server bundle doesn't include stuff from node_modules.
So it seems to me that the module is a bit confused about that.
Note that:
There is a separate issue with types that prevents the first import variant from working because gql is not exported from types. But that can be solved by using the second variant.
The Readme states the the module should be installed as a dev-dependency.
But if one follows that then it's no longer possible to do either:
or
in a Vue component with only production dependencies, while handling the SSR request since both of those imports are not installed and the server bundle doesn't include stuff from
node_modules
.So it seems to me that the module is a bit confused about that.
Note that:
gql
is not exported from types. But that can be solved by using the second variant.