Closed adrien3 closed 1 month ago
You should be doing this:
import graphqlLoaderPlugin from '@luckycatfactory/esbuild-graphql-loader';
const plugin = graphqlLoaderPlugin({ filterRegex: /\.(graphql|gql)$/ });
export default plugin;
Tried this out personally:
// schema.gql
type Post {
author: String!
name: String!
}
// main.ts
// @ts-ignore
import schema from './schema.gql';
console.log(schema);
Hello, I've tried many things but unfortunately, I can't integrate an external plugin (https://github.com/esbuild/community-plugins). My idea is to add https://github.com/luckycatfactory/esbuild-graphql-loader to the plugin so that my gql files are transformed into ts. However, I always get errors in my console.
However, when building, I have an error that comes up
Is this an error in the lib or in my implementation? Thanks in advance