Skip to content

Import RequestOptions as type #1411

@AlanBreck

Description

@AlanBreck

I've been getting the following error with [email protected].

SyntaxError: [vite] The requested module 'graphql-request' does not provide an export named 'RequestOptions'

I believe the solution is to import RequestOptions as a type, e.g.

    this._additionalImports.push(
-      `${typeImport} { GraphQLClient, RequestOptions } from 'graphql-request';`,
+      `${typeImport} { GraphQLClient, type RequestOptions } from 'graphql-request';`,
    );

Source:

this._additionalImports.push(
`${typeImport} { GraphQLClient, RequestOptions } from 'graphql-request';`,
);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions