A webpack loader that minifies GraphQL queries, mutations and fragments by stripping whitespace and reducing query length before bundling. Version 1.0.2 is the latest stable release. The loader must be chained after graphql-tag/loader (or similar) to first transform .gql/.graphql files into JavaScript, then minify them. Key differentiator: reduces bundle size by an average of ~17.5% per query. Targeted at Node.js >=10.0.0. The project is relatively stable with a small maintenance footprint.
npm install minify-graphql-loaderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Webpack configuration using minify-graphql-loader in chain with graphql-tag/loader to minify GraphQL imports.
Ensure use array has 'graphql-tag/loader' first, then 'minify-graphql-loader'.
Always pair with a GraphQL loader like graphql-tag/loader.
Install @types/graphql or use inline type declarations if needed.
Consider forking or using alternative like babel-plugin-minify-graphql.
Add 'graphql-tag/loader' before 'minify-graphql-loader' in webpack rules.
Run 'npm install --save-dev minify-graphql-loader' or 'yarn add --dev minify-graphql-loader'.
No dependency data recorded yet.