graphql-query-compress
graphql-query-compress copied to clipboard
The compress method doesn't work using regular ES6 import statements
For the compress method to work, I had to use import * as compress from 'graphql-query-compress'. Simply doing import compress from 'graphql-query-compress' didn't work. I believe this is due to the fact that module.exports is used instead of export default in the src file of the method.
@imolorhe I sent a PR, I think will solve your problem.
@rse, can you look my PRs? 😄
You absolutely want to avoid default exports, always use named exports. It makes ESM/CJS interrop a lot easier and enables tree shaking if you end up exporting multiple things.