diff --git a/packages/openapi-generator/src/project.ts b/packages/openapi-generator/src/project.ts index 1064051c..edca4dba 100644 --- a/packages/openapi-generator/src/project.ts +++ b/packages/openapi-generator/src/project.ts @@ -123,12 +123,12 @@ export class Project { let typesEntryPoint = ''; - if (packageInfo['types']) { - typesEntryPoint = packageInfo['types']; - } - - if (packageInfo['typings']) { + if (packageInfo['source']) { + typesEntryPoint = packageInfo['source']; + } else if (packageInfo['typings']) { typesEntryPoint = packageInfo['typings']; + } else if (packageInfo['types']) { + typesEntryPoint = packageInfo['types']; } if (!typesEntryPoint) {