minify-graphql-loader
v1.0.2
Published
webpack loader to minify GraphQL queries and mutations
Downloads
15,318
Readme
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:
- Leave a star :star:
- Share :handshake:
coding
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
(follow this guide: Karma's Git Commit Msg) - Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
MIT © Gabriel Prates