graphql-ast-types
graphql-ast-types copied to clipboard
Using this lib in browsers
Hi, thanks for this library :)
We have an issue using it in CRA app though, because the babel env preset is configured to target node only. Would you agree a PR adding the following to it?
"targets": {
"node": "6.10",
+ "browsers": ["last 2 versions"]
}
PS: we use it in react-admin for the grahql data providers.
Thanks for opening this issue. I'm glad you're finding it useful!
I think it's perfectly reasonable to add browser support but we'll need to bundle it for cases where babel isn't in the consumer pipeline. I'll take a look adding this to next branch.
Thanks for the attention 💯
In the meantime, I plugged the fork I made as a dependency of React Admin.
https://github.com/marmelab/react-admin/blob/18fcad87653c0035ff13bddcc8bddc4425c5ebdd/packages/ra-data-graphql-simple/package.json#L35
But this is a problem for our users that can't download dependencies from a GitHub repositories. https://github.com/marmelab/react-admin/issues/2398
Do you plan to release the update anytime soon? I might also publish a npm package as a temporary workaround if you are lacking of time.