1.0.2 • Published 3 years ago

minify-graphql-loader v1.0.2

Weekly downloads
3,140
License
MIT
Repository
github
Last release
3 years ago

minify-graphql-loader

webpack loader to minify GraphQL queries, mutations and fragments, reducing your bundle's size

In this example, we decrease ~17,5% query's size

installing:

  • npm:
npm install --save-dev minify-graphql-loader
  • yarn:
yarn add --dev minify-graphql-loader

using

It must to be used in chain with a GraphQL loader:

// webpack.config.js
module.export = {
  // ...your config
  module: {
    rules: [
      // ...your rules
      {
        test: /\.(graphql|gql)$/,
        exclude: /node_modules/,
        use: [
          "graphql-tag/loader",
          "minify-graphql-loader"
          // it must to be the last item
        ]
      }
    ]
  }
};

Contributing

good things comes in small packages :blush:

  1. Leave a star :star:
  2. Share :handshake:

coding

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature' (follow this guide: Karma's Git Commit Msg)
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © Gabriel Prates

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.2.2

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago