Nextjs graphQL config with graph-tag

Viewed 167

I am stuck when trying to use the "file.gql". Here my next.config.js file

module.exports = {
  modules: {
   rules: [
   {
    test: /\.(graphql|gql)$/,
    exclude: /node_modules/,
    loader: 'graphql-tag/loader',
   },
 ]}
}

and this error message I got

Error log

Could you show me the right way to config this loader? thanks.

0 Answers
Related