Next.js Discord

Discord Forum

next.config.ts

Answered
American posted this in #help-forum
Open in Discord
AmericanOP
Hello

The docs states that

You can use TypeScript and import types in your Next.js configuration by using next.config.ts.

But when I try to use it, I get this error:

Error: Configuring Next.js via 'next.config.ts' is not supported. Please replace the file with 'next.config.js' or 'next.config.mjs'
Answered by joulev
next.config.ts is only available from next 15
View full answer

5 Replies

Answer
it doesnt make sense that the documentation doesnt say anything about that, but it is what it is
this is also available as statement here
so u could try it out via next@canary
AmericanOP
I see, thank you!