datocms / cli

Official CLI to interact with DatoCMS projects!
MIT License
7 stars 7 forks source link

Configuration for using a different tsconfig file #7

Closed moshie closed 1 year ago

moshie commented 1 year ago

Currently if you have migrations alongside a NextJS project the tsconfig in the root is automatically used.

However in a NextJS project for instance it's not setup for the datocms cli (node) so you get errors like:

SyntaxError: Unexpected token 'export'

It would be nice to be able to pass a path to the cli to a specific tsconfig file.

Or alternatively fallback to a default one built into the cli as I don't see people wanting to change the tsconfig anyways? < my preferred solution (I created a PR for this)

stefanoverna commented 1 year ago

Thanks @moshie for the PR, but we'd rather go with the first option.

Starting from CLI v1.0.17, you can specify a custom tsconfig.json: