Gomah / nuxt-graphql-request

Easy Minimal GraphQL client integration with Nuxt.js.
https://nuxt-graphql-request.vercel.app
MIT License
196 stars 16 forks source link

Dev or production dependency? #32

Closed rchl closed 1 year ago

rchl commented 3 years ago

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: