customize-cra icon indicating copy to clipboard operation
customize-cra copied to clipboard

add graphql loader

Open HeiShuXianSheng opened this issue 3 years ago • 0 comments

I use create-react-app. and i want to loading .graphql file,so i need webpack loader . First yarn add graphql-tag . Then,how can i add this graphql-loader with override webpack like this

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

HeiShuXianSheng avatar Dec 15 '21 10:12 HeiShuXianSheng