A babel plugin that minifies GraphQL query strings at compile time by removing unnecessary whitespace, newlines, and ensuring compact syntax. Current version 0.0.2, released once. Key differentiators: (1) WASM-based core makes it 3x faster than alternatives like babel-plugin-transform-compress-graphql, (2) removes more characters (e.g., spaces after argument types and fragment spreads) resulting in smaller bundles, (3) supports both tagged template literals (default `gql`) and magic comments (default `/* graphql */`) with customizable patterns. Suitable for optimizing GraphQL strings in JavaScript/TypeScript projects during bundling.
npm install babel-plugin-graphql-query-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows install, babel config with custom comment/function names, and how GraphQL strings are minified.
Use either /* graphql */ or gql tag; set custom patterns via 'comment' and 'function' options.
Ensure all GraphQL strings to be minified are in source files processed by babel.
N/A
N/A
Correct format: "plugins": [["babel-plugin-graphql-query-minifier", {}]]Run: npm install -D babel-plugin-graphql-query-minifier
Add the plugin to your babel config and ensure the file is included in babel's process.
No dependency data recorded yet.