From Next.js 12, you can now keep using ES modules by renaming the config file
to next.config.mjs. While this isn't exactly the same as using TypeScript,
at least you can keep the syntax consistent.
// next.config.mjs
export default {
images: {
domains: ['images.unsplash.com']
}
}