Skip to content

vite errors from type only imports #76

@m1212e

Description

@m1212e

Vite throws this error:

SyntaxError: [vite] The requested module '@pothos/core' does not provide an export named 'MutationFieldsShape'

in the generated utils module. I think this is because the type imports are not marked as such, e.g.

import {
	type FieldOptionsFromKind,
	type InputFieldMap,
	type InterfaceParam,
	MutationFieldBuilder,
	type MutationFieldsShape,
	ObjectRef,
	QueryFieldBuilder,
	type QueryFieldsShape,
	type TypeParam
} from '@pothos/core';
import {
	type PrismaFieldOptions,
	type PrismaObjectTypeOptions,
	type RelatedFieldOptions
} from '@pothos/plugin-prisma';

instead of the current

import {
	FieldOptionsFromKind,
	InputFieldMap,
	InterfaceParam,
	MutationFieldBuilder,
	MutationFieldsShape,
	ObjectRef,
	QueryFieldBuilder,
	QueryFieldsShape,
	TypeParam
} from '@pothos/core';
import {
	PrismaFieldOptions,
	PrismaObjectTypeOptions,
	RelatedFieldOptions
} from '@pothos/plugin-prisma';

Would it be possible to adjust this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions