diff --git a/src/contentful-typescript-codegen.ts b/src/contentful-typescript-codegen.ts index 1a38e029..12dc0218 100644 --- a/src/contentful-typescript-codegen.ts +++ b/src/contentful-typescript-codegen.ts @@ -45,8 +45,8 @@ async function runCodegen(outputFile: string) { const contentTypes = await environment.getContentTypes({ limit: 1000 }) const locales = await environment.getLocales() const output = await render(contentTypes.items, locales.items) - const outputPath = path.resolve(process.cwd(), outputFile) + outputFileSync(outputPath, output) }