arackaf / customize-cra

Override webpack configurations for create-react-app 2.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add graphql loader

HeiShuXianSheng opened this issue · 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',
    },
  ],
},