Skip to content

Commit 17923f4

Browse files
committed
change to dynamic import
1 parent c014484 commit 17923f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {getDMMF} from '@prisma/internals';
21
import {generateOpenApiSpec} from '../on-generate/generate-open-api-spec.js';
32
import {
43
defaultOptions,
@@ -16,6 +15,8 @@ export async function generateOpenApiSchema(
1615
throw new Error('Prisma schema must be a non-empty string.');
1716
}
1817

18+
// eslint-disable-next-line @typescript-eslint/naming-convention
19+
const {getDMMF} = await import('@prisma/internals');
1920
const dmmf = await getDMMF({datamodel: prismaSchema});
2021
const prismaOpenApiOptions: PrismaOpenApiOptions = {
2122
...defaultOptions,

0 commit comments

Comments
 (0)