luckycatfactory / esbuild-graphql-loader

An esbuild Plugin Allowing for GraphQL File imports
44 stars 8 forks source link

ESM support? #27

Open eric-burel opened 2 years ago

eric-burel commented 2 years ago

Hi, running on Node 16 and Esbuild 0.15 (via Tsup), the default export is not correctly defined.

I need to do:

import graphqlLoaderPluginPkg from '@luckycatfactory/esbuild-graphql-loader';
const graphqlLoaderPlugin = (graphqlLoaderPluginPkg as any).default

Similar issue with yaml: https://github.com/martonlederer/esbuild-plugin-yaml/issues/3

SagnikPradhan commented 7 months ago

This seems to work for me