-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hello,
Thank you so much for a great Nuxt module been really enjoying using it.
I seem to have run into an issue in Nuxt 4 where we get rollup errors related to the graphql-server-resolver.d.ts
trying to be bundled by Rollup but it fails as it is a TS file and shouldn't be being bundled.
I believe the issue is that addTemplate
is being used to add this file to the Nitro server but according to this, it seems addServerTemplate
should be being used?
nuxt-graphql-server/src/module.ts
Lines 55 to 59 in 8a27144
}) | |
const resolverTypesTemplateName = 'types/graphql-server-resolver.d.ts' | |
const { dst: resolverTypeDefPath } = addTemplate({ | |
filename: resolverTypesTemplateName, | |
getContents: () => { |
Error:
[nitro 9:06:05 AM] ERROR RollupError: node_modules/.cache/nuxt/.nuxt/types/graphql-server-resolver.d.ts (3:7): Expected '{', got 'type' (Note that you need plugins to import files that are not JavaScript)
1: import { GraphQLResolveInfo } from 'graphql';
2: import { GraphQLContext } from '../../../../../server/graphql/context';
3: export type Maybe<T> = T | null;
^
4: export type InputMaybe<T> = Maybe<T>;
5: export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
[9:06:05 AM] ERROR node_modules/.cache/nuxt/.nuxt/types/graphql-server-resolver.d.ts (3:7): Expected '{', got 'type' (Note that you need plugins to import files that are not JavaScript)
[cause]: Expected '{', got 'type'
[9:06:05 AM] ERROR node_modules/.cache/nuxt/.nuxt/types/graphql-server-resolver.d.ts (3:7): Expected '{', got 'type' (Note that you need plugins to import files that are not JavaScript)
Metadata
Metadata
Assignees
Labels
No labels