How do I map next.config.js code samples in the Next docs to T3's implementation?
Next shows examples using module.exports like
but the config file generated by the T3 cli has:
How do I translate the code presented by the Next docs to the implementation used in T3?
3 Replies
Solution
as simple as this:
i would also go as far as typing it as well:
then you will get intellisense
That works well, thanks! Especially with the JsDoc type specifier.
Before your answer, I had resorted to defining the headers function outside config's definition:
But that's pretty kludgy for a single entry in the config declaration.
Yeh defintly not the prettiest solution